diff --git a/java-securitycenter/google-cloud-securitycenter-bom/pom.xml b/java-securitycenter/google-cloud-securitycenter-bom/pom.xml index 8cef27b8e996..b7422eadc778 100644 --- a/java-securitycenter/google-cloud-securitycenter-bom/pom.xml +++ b/java-securitycenter/google-cloud-securitycenter-bom/pom.xml @@ -54,37 +54,37 @@ com.google.cloud google-cloud-securitycenter - 2.9.1 + 2.9.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-securitycenter-v1 - 2.9.1 + 2.9.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-securitycenter-v1beta1 - 0.104.1 + 0.104.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-securitycenter-v1p1beta1 - 0.104.1 + 0.104.1-SNAPSHOT com.google.api.grpc proto-google-cloud-securitycenter-v1 - 2.9.1 + 2.9.1-SNAPSHOT com.google.api.grpc proto-google-cloud-securitycenter-v1beta1 - 0.104.1 + 0.104.1-SNAPSHOT com.google.api.grpc proto-google-cloud-securitycenter-v1p1beta1 - 0.104.1 + 0.104.1-SNAPSHOT diff --git a/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientHttpJsonTest.java b/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientHttpJsonTest.java index 01ff50d82ecb..4571c8c77e39 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientHttpJsonTest.java +++ b/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientHttpJsonTest.java @@ -322,6 +322,7 @@ public void createFindingTest() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -399,6 +400,7 @@ public void createFindingTest2() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -2789,6 +2791,7 @@ public void setFindingStateTest() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -2868,6 +2871,7 @@ public void setFindingStateTest2() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -2945,6 +2949,7 @@ public void setMuteTest() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -3022,6 +3027,7 @@ public void setMuteTest2() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -3349,6 +3355,7 @@ public void updateFindingTest() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -3384,6 +3391,7 @@ public void updateFindingTest() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); Finding actualResponse = client.updateFinding(finding); @@ -3444,6 +3452,7 @@ public void updateFindingExceptionTest() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); client.updateFinding(finding); Assert.fail("No exception raised"); diff --git a/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientTest.java b/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientTest.java index e49af1ad6073..e06c74740a66 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientTest.java +++ b/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientTest.java @@ -313,6 +313,7 @@ public void createFindingTest() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); mockSecurityCenter.addResponse(expectedResponse); @@ -386,6 +387,7 @@ public void createFindingTest2() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); mockSecurityCenter.addResponse(expectedResponse); @@ -2560,6 +2562,7 @@ public void setFindingStateTest() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); mockSecurityCenter.addResponse(expectedResponse); @@ -2635,6 +2638,7 @@ public void setFindingStateTest2() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); mockSecurityCenter.addResponse(expectedResponse); @@ -2708,6 +2712,7 @@ public void setMuteTest() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); mockSecurityCenter.addResponse(expectedResponse); @@ -2780,6 +2785,7 @@ public void setMuteTest2() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); mockSecurityCenter.addResponse(expectedResponse); @@ -3062,6 +3068,7 @@ public void updateFindingTest() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); mockSecurityCenter.addResponse(expectedResponse); diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Database.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Database.java similarity index 73% rename from owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Database.java rename to java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Database.java index 7ba76605dcab..3fca4c22b6d2 100644 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Database.java +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Database.java @@ -1,9 +1,26 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/securitycenter/v1/database.proto package com.google.cloud.securitycenter.v1; /** + * + * *
  * Represents database access information, such as queries.
  * A database may be a sub-resource of an instance (as in the case of CloudSQL
@@ -16,15 +33,16 @@
  *
  * Protobuf type {@code google.cloud.securitycenter.v1.Database}
  */
-public final class Database extends
-    com.google.protobuf.GeneratedMessageV3 implements
+public final class Database extends com.google.protobuf.GeneratedMessageV3
+    implements
     // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Database)
     DatabaseOrBuilder {
-private static final long serialVersionUID = 0L;
+  private static final long serialVersionUID = 0L;
   // Use Database.newBuilder() to construct.
   private Database(com.google.protobuf.GeneratedMessageV3.Builder builder) {
     super(builder);
   }
+
   private Database() {
     name_ = "";
     displayName_ = "";
@@ -35,16 +53,15 @@ private Database() {
 
   @java.lang.Override
   @SuppressWarnings({"unused"})
-  protected java.lang.Object newInstance(
-      UnusedPrivateParameter unused) {
+  protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
     return new Database();
   }
 
   @java.lang.Override
-  public final com.google.protobuf.UnknownFieldSet
-  getUnknownFields() {
+  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
     return this.unknownFields;
   }
+
   private Database(
       com.google.protobuf.CodedInputStream input,
       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -64,46 +81,51 @@ private Database(
           case 0:
             done = true;
             break;
-          case 10: {
-            java.lang.String s = input.readStringRequireUtf8();
+          case 10:
+            {
+              java.lang.String s = input.readStringRequireUtf8();
 
-            name_ = s;
-            break;
-          }
-          case 18: {
-            java.lang.String s = input.readStringRequireUtf8();
+              name_ = s;
+              break;
+            }
+          case 18:
+            {
+              java.lang.String s = input.readStringRequireUtf8();
 
-            displayName_ = s;
-            break;
-          }
-          case 26: {
-            java.lang.String s = input.readStringRequireUtf8();
+              displayName_ = s;
+              break;
+            }
+          case 26:
+            {
+              java.lang.String s = input.readStringRequireUtf8();
 
-            userName_ = s;
-            break;
-          }
-          case 34: {
-            java.lang.String s = input.readStringRequireUtf8();
+              userName_ = s;
+              break;
+            }
+          case 34:
+            {
+              java.lang.String s = input.readStringRequireUtf8();
 
-            query_ = s;
-            break;
-          }
-          case 42: {
-            java.lang.String s = input.readStringRequireUtf8();
-            if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-              grantees_ = new com.google.protobuf.LazyStringArrayList();
-              mutable_bitField0_ |= 0x00000001;
+              query_ = s;
+              break;
             }
-            grantees_.add(s);
-            break;
-          }
-          default: {
-            if (!parseUnknownField(
-                input, unknownFields, extensionRegistry, tag)) {
-              done = true;
+          case 42:
+            {
+              java.lang.String s = input.readStringRequireUtf8();
+              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+                grantees_ = new com.google.protobuf.LazyStringArrayList();
+                mutable_bitField0_ |= 0x00000001;
+              }
+              grantees_.add(s);
+              break;
+            }
+          default:
+            {
+              if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
             }
-            break;
-          }
         }
       }
     } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -111,8 +133,7 @@ private Database(
     } catch (com.google.protobuf.UninitializedMessageException e) {
       throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
     } catch (java.io.IOException e) {
-      throw new com.google.protobuf.InvalidProtocolBufferException(
-          e).setUnfinishedMessage(this);
+      throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
     } finally {
       if (((mutable_bitField0_ & 0x00000001) != 0)) {
         grantees_ = grantees_.getUnmodifiableView();
@@ -121,28 +142,34 @@ private Database(
       makeExtensionsImmutable();
     }
   }
-  public static final com.google.protobuf.Descriptors.Descriptor
-      getDescriptor() {
-    return com.google.cloud.securitycenter.v1.DatabaseProto.internal_static_google_cloud_securitycenter_v1_Database_descriptor;
+
+  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+    return com.google.cloud.securitycenter.v1.DatabaseProto
+        .internal_static_google_cloud_securitycenter_v1_Database_descriptor;
   }
 
   @java.lang.Override
   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
       internalGetFieldAccessorTable() {
-    return com.google.cloud.securitycenter.v1.DatabaseProto.internal_static_google_cloud_securitycenter_v1_Database_fieldAccessorTable
+    return com.google.cloud.securitycenter.v1.DatabaseProto
+        .internal_static_google_cloud_securitycenter_v1_Database_fieldAccessorTable
         .ensureFieldAccessorsInitialized(
-            com.google.cloud.securitycenter.v1.Database.class, com.google.cloud.securitycenter.v1.Database.Builder.class);
+            com.google.cloud.securitycenter.v1.Database.class,
+            com.google.cloud.securitycenter.v1.Database.Builder.class);
   }
 
   public static final int NAME_FIELD_NUMBER = 1;
   private volatile java.lang.Object name_;
   /**
+   *
+   *
    * 
    * The full resource name of the database the user connected to, if it is
    * supported by CAI. (https://google.aip.dev/122#full-resource-names)
    * 
* * string name = 1; + * * @return The name. */ @java.lang.Override @@ -151,30 +178,30 @@ public java.lang.String getName() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** + * + * *
    * The full resource name of the database the user connected to, if it is
    * supported by CAI. (https://google.aip.dev/122#full-resource-names)
    * 
* * string name = 1; + * * @return The bytes for name. */ @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { + public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); name_ = b; return b; } else { @@ -185,11 +212,14 @@ public java.lang.String getName() { public static final int DISPLAY_NAME_FIELD_NUMBER = 2; private volatile java.lang.Object displayName_; /** + * + * *
    * The human readable name of the database the user connected to.
    * 
* * string display_name = 2; + * * @return The displayName. */ @java.lang.Override @@ -198,29 +228,29 @@ public java.lang.String getDisplayName() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); displayName_ = s; return s; } } /** + * + * *
    * The human readable name of the database the user connected to.
    * 
* * string display_name = 2; + * * @return The bytes for displayName. */ @java.lang.Override - public com.google.protobuf.ByteString - getDisplayNameBytes() { + public com.google.protobuf.ByteString getDisplayNameBytes() { java.lang.Object ref = displayName_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); displayName_ = b; return b; } else { @@ -231,12 +261,15 @@ public java.lang.String getDisplayName() { public static final int USER_NAME_FIELD_NUMBER = 3; private volatile java.lang.Object userName_; /** + * + * *
    * The username used to connect to the DB. This may not necessarily be an IAM
    * principal, and has no required format.
    * 
* * string user_name = 3; + * * @return The userName. */ @java.lang.Override @@ -245,30 +278,30 @@ public java.lang.String getUserName() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); userName_ = s; return s; } } /** + * + * *
    * The username used to connect to the DB. This may not necessarily be an IAM
    * principal, and has no required format.
    * 
* * string user_name = 3; + * * @return The bytes for userName. */ @java.lang.Override - public com.google.protobuf.ByteString - getUserNameBytes() { + public com.google.protobuf.ByteString getUserNameBytes() { java.lang.Object ref = userName_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); userName_ = b; return b; } else { @@ -279,11 +312,14 @@ public java.lang.String getUserName() { public static final int QUERY_FIELD_NUMBER = 4; private volatile java.lang.Object query_; /** + * + * *
    * The SQL statement associated with the relevant access.
    * 
* * string query = 4; + * * @return The query. */ @java.lang.Override @@ -292,29 +328,29 @@ public java.lang.String getQuery() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); query_ = s; return s; } } /** + * + * *
    * The SQL statement associated with the relevant access.
    * 
* * string query = 4; + * * @return The bytes for query. */ @java.lang.Override - public com.google.protobuf.ByteString - getQueryBytes() { + public com.google.protobuf.ByteString getQueryBytes() { java.lang.Object ref = query_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); query_ = b; return b; } else { @@ -325,37 +361,45 @@ public java.lang.String getQuery() { public static final int GRANTEES_FIELD_NUMBER = 5; private com.google.protobuf.LazyStringList grantees_; /** + * + * *
    * The target usernames/roles/groups of a SQL privilege grant (not an IAM
    * policy change).
    * 
* * repeated string grantees = 5; + * * @return A list containing the grantees. */ - public com.google.protobuf.ProtocolStringList - getGranteesList() { + public com.google.protobuf.ProtocolStringList getGranteesList() { return grantees_; } /** + * + * *
    * The target usernames/roles/groups of a SQL privilege grant (not an IAM
    * policy change).
    * 
* * repeated string grantees = 5; + * * @return The count of grantees. */ public int getGranteesCount() { return grantees_.size(); } /** + * + * *
    * The target usernames/roles/groups of a SQL privilege grant (not an IAM
    * policy change).
    * 
* * repeated string grantees = 5; + * * @param index The index of the element to return. * @return The grantees at the given index. */ @@ -363,21 +407,24 @@ public java.lang.String getGrantees(int index) { return grantees_.get(index); } /** + * + * *
    * The target usernames/roles/groups of a SQL privilege grant (not an IAM
    * policy change).
    * 
* * repeated string grantees = 5; + * * @param index The index of the value to return. * @return The bytes of the grantees at the given index. */ - public com.google.protobuf.ByteString - getGranteesBytes(int index) { + public com.google.protobuf.ByteString getGranteesBytes(int index) { return grantees_.getByteString(index); } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -389,8 +436,7 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } @@ -443,23 +489,19 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.securitycenter.v1.Database)) { return super.equals(obj); } - com.google.cloud.securitycenter.v1.Database other = (com.google.cloud.securitycenter.v1.Database) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getDisplayName() - .equals(other.getDisplayName())) return false; - if (!getUserName() - .equals(other.getUserName())) return false; - if (!getQuery() - .equals(other.getQuery())) return false; - if (!getGranteesList() - .equals(other.getGranteesList())) return false; + com.google.cloud.securitycenter.v1.Database other = + (com.google.cloud.securitycenter.v1.Database) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUserName().equals(other.getUserName())) return false; + if (!getQuery().equals(other.getQuery())) return false; + if (!getGranteesList().equals(other.getGranteesList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -488,97 +530,104 @@ public int hashCode() { return hash; } - public static com.google.cloud.securitycenter.v1.Database parseFrom( - java.nio.ByteBuffer data) + public static com.google.cloud.securitycenter.v1.Database parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static com.google.cloud.securitycenter.v1.Database parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static com.google.cloud.securitycenter.v1.Database parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static com.google.cloud.securitycenter.v1.Database parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static com.google.cloud.securitycenter.v1.Database parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static com.google.cloud.securitycenter.v1.Database parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static com.google.cloud.securitycenter.v1.Database parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static com.google.cloud.securitycenter.v1.Database parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - public static com.google.cloud.securitycenter.v1.Database parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + + public static com.google.cloud.securitycenter.v1.Database parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } + public static com.google.cloud.securitycenter.v1.Database parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } + public static com.google.cloud.securitycenter.v1.Database parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static com.google.cloud.securitycenter.v1.Database parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } + public Builder newBuilderForType() { + return newBuilder(); + } + public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } + public static Builder newBuilder(com.google.cloud.securitycenter.v1.Database prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** + * + * *
    * Represents database access information, such as queries.
    * A database may be a sub-resource of an instance (as in the case of CloudSQL
@@ -591,21 +640,23 @@ protected Builder newBuilderForType(
    *
    * Protobuf type {@code google.cloud.securitycenter.v1.Database}
    */
-  public static final class Builder extends
-      com.google.protobuf.GeneratedMessageV3.Builder implements
+  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+      implements
       // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Database)
       com.google.cloud.securitycenter.v1.DatabaseOrBuilder {
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return com.google.cloud.securitycenter.v1.DatabaseProto.internal_static_google_cloud_securitycenter_v1_Database_descriptor;
+    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+      return com.google.cloud.securitycenter.v1.DatabaseProto
+          .internal_static_google_cloud_securitycenter_v1_Database_descriptor;
     }
 
     @java.lang.Override
     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
         internalGetFieldAccessorTable() {
-      return com.google.cloud.securitycenter.v1.DatabaseProto.internal_static_google_cloud_securitycenter_v1_Database_fieldAccessorTable
+      return com.google.cloud.securitycenter.v1.DatabaseProto
+          .internal_static_google_cloud_securitycenter_v1_Database_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
-              com.google.cloud.securitycenter.v1.Database.class, com.google.cloud.securitycenter.v1.Database.Builder.class);
+              com.google.cloud.securitycenter.v1.Database.class,
+              com.google.cloud.securitycenter.v1.Database.Builder.class);
     }
 
     // Construct using com.google.cloud.securitycenter.v1.Database.newBuilder()
@@ -613,16 +664,15 @@ private Builder() {
       maybeForceBuilderInitialization();
     }
 
-    private Builder(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+    private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
       super(parent);
       maybeForceBuilderInitialization();
     }
+
     private void maybeForceBuilderInitialization() {
-      if (com.google.protobuf.GeneratedMessageV3
-              .alwaysUseFieldBuilders) {
-      }
+      if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
     }
+
     @java.lang.Override
     public Builder clear() {
       super.clear();
@@ -640,9 +690,9 @@ public Builder clear() {
     }
 
     @java.lang.Override
-    public com.google.protobuf.Descriptors.Descriptor
-        getDescriptorForType() {
-      return com.google.cloud.securitycenter.v1.DatabaseProto.internal_static_google_cloud_securitycenter_v1_Database_descriptor;
+    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+      return com.google.cloud.securitycenter.v1.DatabaseProto
+          .internal_static_google_cloud_securitycenter_v1_Database_descriptor;
     }
 
     @java.lang.Override
@@ -661,7 +711,8 @@ public com.google.cloud.securitycenter.v1.Database build() {
 
     @java.lang.Override
     public com.google.cloud.securitycenter.v1.Database buildPartial() {
-      com.google.cloud.securitycenter.v1.Database result = new com.google.cloud.securitycenter.v1.Database(this);
+      com.google.cloud.securitycenter.v1.Database result =
+          new com.google.cloud.securitycenter.v1.Database(this);
       int from_bitField0_ = bitField0_;
       result.name_ = name_;
       result.displayName_ = displayName_;
@@ -680,38 +731,39 @@ public com.google.cloud.securitycenter.v1.Database buildPartial() {
     public Builder clone() {
       return super.clone();
     }
+
     @java.lang.Override
     public Builder setField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        java.lang.Object value) {
+        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
       return super.setField(field, value);
     }
+
     @java.lang.Override
-    public Builder clearField(
-        com.google.protobuf.Descriptors.FieldDescriptor field) {
+    public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
       return super.clearField(field);
     }
+
     @java.lang.Override
-    public Builder clearOneof(
-        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+    public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
       return super.clearOneof(oneof);
     }
+
     @java.lang.Override
     public Builder setRepeatedField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        int index, java.lang.Object value) {
+        com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
       return super.setRepeatedField(field, index, value);
     }
+
     @java.lang.Override
     public Builder addRepeatedField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        java.lang.Object value) {
+        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
       return super.addRepeatedField(field, value);
     }
+
     @java.lang.Override
     public Builder mergeFrom(com.google.protobuf.Message other) {
       if (other instanceof com.google.cloud.securitycenter.v1.Database) {
-        return mergeFrom((com.google.cloud.securitycenter.v1.Database)other);
+        return mergeFrom((com.google.cloud.securitycenter.v1.Database) other);
       } else {
         super.mergeFrom(other);
         return this;
@@ -774,23 +826,26 @@ public Builder mergeFrom(
       }
       return this;
     }
+
     private int bitField0_;
 
     private java.lang.Object name_ = "";
     /**
+     *
+     *
      * 
      * The full resource name of the database the user connected to, if it is
      * supported by CAI. (https://google.aip.dev/122#full-resource-names)
      * 
* * string name = 1; + * * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; @@ -799,21 +854,22 @@ public java.lang.String getName() { } } /** + * + * *
      * The full resource name of the database the user connected to, if it is
      * supported by CAI. (https://google.aip.dev/122#full-resource-names)
      * 
* * string name = 1; + * * @return The bytes for name. */ - public com.google.protobuf.ByteString - getNameBytes() { + public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); name_ = b; return b; } else { @@ -821,57 +877,64 @@ public java.lang.String getName() { } } /** + * + * *
      * The full resource name of the database the user connected to, if it is
      * supported by CAI. (https://google.aip.dev/122#full-resource-names)
      * 
* * string name = 1; + * * @param value The name to set. * @return This builder for chaining. */ - public Builder setName( - java.lang.String value) { + public Builder setName(java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + name_ = value; onChanged(); return this; } /** + * + * *
      * The full resource name of the database the user connected to, if it is
      * supported by CAI. (https://google.aip.dev/122#full-resource-names)
      * 
* * string name = 1; + * * @return This builder for chaining. */ public Builder clearName() { - + name_ = getDefaultInstance().getName(); onChanged(); return this; } /** + * + * *
      * The full resource name of the database the user connected to, if it is
      * supported by CAI. (https://google.aip.dev/122#full-resource-names)
      * 
* * string name = 1; + * * @param value The bytes for name to set. * @return This builder for chaining. */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { + public Builder setNameBytes(com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; onChanged(); return this; @@ -879,18 +942,20 @@ public Builder setNameBytes( private java.lang.Object displayName_ = ""; /** + * + * *
      * The human readable name of the database the user connected to.
      * 
* * string display_name = 2; + * * @return The displayName. */ public java.lang.String getDisplayName() { java.lang.Object ref = displayName_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); displayName_ = s; return s; @@ -899,20 +964,21 @@ public java.lang.String getDisplayName() { } } /** + * + * *
      * The human readable name of the database the user connected to.
      * 
* * string display_name = 2; + * * @return The bytes for displayName. */ - public com.google.protobuf.ByteString - getDisplayNameBytes() { + public com.google.protobuf.ByteString getDisplayNameBytes() { java.lang.Object ref = displayName_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); displayName_ = b; return b; } else { @@ -920,54 +986,61 @@ public java.lang.String getDisplayName() { } } /** + * + * *
      * The human readable name of the database the user connected to.
      * 
* * string display_name = 2; + * * @param value The displayName to set. * @return This builder for chaining. */ - public Builder setDisplayName( - java.lang.String value) { + public Builder setDisplayName(java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + displayName_ = value; onChanged(); return this; } /** + * + * *
      * The human readable name of the database the user connected to.
      * 
* * string display_name = 2; + * * @return This builder for chaining. */ public Builder clearDisplayName() { - + displayName_ = getDefaultInstance().getDisplayName(); onChanged(); return this; } /** + * + * *
      * The human readable name of the database the user connected to.
      * 
* * string display_name = 2; + * * @param value The bytes for displayName to set. * @return This builder for chaining. */ - public Builder setDisplayNameBytes( - com.google.protobuf.ByteString value) { + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; onChanged(); return this; @@ -975,19 +1048,21 @@ public Builder setDisplayNameBytes( private java.lang.Object userName_ = ""; /** + * + * *
      * The username used to connect to the DB. This may not necessarily be an IAM
      * principal, and has no required format.
      * 
* * string user_name = 3; + * * @return The userName. */ public java.lang.String getUserName() { java.lang.Object ref = userName_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); userName_ = s; return s; @@ -996,21 +1071,22 @@ public java.lang.String getUserName() { } } /** + * + * *
      * The username used to connect to the DB. This may not necessarily be an IAM
      * principal, and has no required format.
      * 
* * string user_name = 3; + * * @return The bytes for userName. */ - public com.google.protobuf.ByteString - getUserNameBytes() { + public com.google.protobuf.ByteString getUserNameBytes() { java.lang.Object ref = userName_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); userName_ = b; return b; } else { @@ -1018,57 +1094,64 @@ public java.lang.String getUserName() { } } /** + * + * *
      * The username used to connect to the DB. This may not necessarily be an IAM
      * principal, and has no required format.
      * 
* * string user_name = 3; + * * @param value The userName to set. * @return This builder for chaining. */ - public Builder setUserName( - java.lang.String value) { + public Builder setUserName(java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + userName_ = value; onChanged(); return this; } /** + * + * *
      * The username used to connect to the DB. This may not necessarily be an IAM
      * principal, and has no required format.
      * 
* * string user_name = 3; + * * @return This builder for chaining. */ public Builder clearUserName() { - + userName_ = getDefaultInstance().getUserName(); onChanged(); return this; } /** + * + * *
      * The username used to connect to the DB. This may not necessarily be an IAM
      * principal, and has no required format.
      * 
* * string user_name = 3; + * * @param value The bytes for userName to set. * @return This builder for chaining. */ - public Builder setUserNameBytes( - com.google.protobuf.ByteString value) { + public Builder setUserNameBytes(com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + userName_ = value; onChanged(); return this; @@ -1076,18 +1159,20 @@ public Builder setUserNameBytes( private java.lang.Object query_ = ""; /** + * + * *
      * The SQL statement associated with the relevant access.
      * 
* * string query = 4; + * * @return The query. */ public java.lang.String getQuery() { java.lang.Object ref = query_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); query_ = s; return s; @@ -1096,20 +1181,21 @@ public java.lang.String getQuery() { } } /** + * + * *
      * The SQL statement associated with the relevant access.
      * 
* * string query = 4; + * * @return The bytes for query. */ - public com.google.protobuf.ByteString - getQueryBytes() { + public com.google.protobuf.ByteString getQueryBytes() { java.lang.Object ref = query_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); query_ = b; return b; } else { @@ -1117,98 +1203,115 @@ public java.lang.String getQuery() { } } /** + * + * *
      * The SQL statement associated with the relevant access.
      * 
* * string query = 4; + * * @param value The query to set. * @return This builder for chaining. */ - public Builder setQuery( - java.lang.String value) { + public Builder setQuery(java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + query_ = value; onChanged(); return this; } /** + * + * *
      * The SQL statement associated with the relevant access.
      * 
* * string query = 4; + * * @return This builder for chaining. */ public Builder clearQuery() { - + query_ = getDefaultInstance().getQuery(); onChanged(); return this; } /** + * + * *
      * The SQL statement associated with the relevant access.
      * 
* * string query = 4; + * * @param value The bytes for query to set. * @return This builder for chaining. */ - public Builder setQueryBytes( - com.google.protobuf.ByteString value) { + public Builder setQueryBytes(com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + query_ = value; onChanged(); return this; } - private com.google.protobuf.LazyStringList grantees_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private com.google.protobuf.LazyStringList grantees_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureGranteesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { grantees_ = new com.google.protobuf.LazyStringArrayList(grantees_); bitField0_ |= 0x00000001; - } + } } /** + * + * *
      * The target usernames/roles/groups of a SQL privilege grant (not an IAM
      * policy change).
      * 
* * repeated string grantees = 5; + * * @return A list containing the grantees. */ - public com.google.protobuf.ProtocolStringList - getGranteesList() { + public com.google.protobuf.ProtocolStringList getGranteesList() { return grantees_.getUnmodifiableView(); } /** + * + * *
      * The target usernames/roles/groups of a SQL privilege grant (not an IAM
      * policy change).
      * 
* * repeated string grantees = 5; + * * @return The count of grantees. */ public int getGranteesCount() { return grantees_.size(); } /** + * + * *
      * The target usernames/roles/groups of a SQL privilege grant (not an IAM
      * policy change).
      * 
* * repeated string grantees = 5; + * * @param index The index of the element to return. * @return The grantees at the given index. */ @@ -1216,85 +1319,95 @@ public java.lang.String getGrantees(int index) { return grantees_.get(index); } /** + * + * *
      * The target usernames/roles/groups of a SQL privilege grant (not an IAM
      * policy change).
      * 
* * repeated string grantees = 5; + * * @param index The index of the value to return. * @return The bytes of the grantees at the given index. */ - public com.google.protobuf.ByteString - getGranteesBytes(int index) { + public com.google.protobuf.ByteString getGranteesBytes(int index) { return grantees_.getByteString(index); } /** + * + * *
      * The target usernames/roles/groups of a SQL privilege grant (not an IAM
      * policy change).
      * 
* * repeated string grantees = 5; + * * @param index The index to set the value at. * @param value The grantees to set. * @return This builder for chaining. */ - public Builder setGrantees( - int index, java.lang.String value) { + public Builder setGrantees(int index, java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - ensureGranteesIsMutable(); + throw new NullPointerException(); + } + ensureGranteesIsMutable(); grantees_.set(index, value); onChanged(); return this; } /** + * + * *
      * The target usernames/roles/groups of a SQL privilege grant (not an IAM
      * policy change).
      * 
* * repeated string grantees = 5; + * * @param value The grantees to add. * @return This builder for chaining. */ - public Builder addGrantees( - java.lang.String value) { + public Builder addGrantees(java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - ensureGranteesIsMutable(); + throw new NullPointerException(); + } + ensureGranteesIsMutable(); grantees_.add(value); onChanged(); return this; } /** + * + * *
      * The target usernames/roles/groups of a SQL privilege grant (not an IAM
      * policy change).
      * 
* * repeated string grantees = 5; + * * @param values The grantees to add. * @return This builder for chaining. */ - public Builder addAllGrantees( - java.lang.Iterable values) { + public Builder addAllGrantees(java.lang.Iterable values) { ensureGranteesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, grantees_); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, grantees_); onChanged(); return this; } /** + * + * *
      * The target usernames/roles/groups of a SQL privilege grant (not an IAM
      * policy change).
      * 
* * repeated string grantees = 5; + * * @return This builder for chaining. */ public Builder clearGrantees() { @@ -1304,29 +1417,31 @@ public Builder clearGrantees() { return this; } /** + * + * *
      * The target usernames/roles/groups of a SQL privilege grant (not an IAM
      * policy change).
      * 
* * repeated string grantees = 5; + * * @param value The bytes of the grantees to add. * @return This builder for chaining. */ - public Builder addGranteesBytes( - com.google.protobuf.ByteString value) { + public Builder addGranteesBytes(com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); ensureGranteesIsMutable(); grantees_.add(value); onChanged(); return this; } + @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -1336,12 +1451,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Database) } // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Database) private static final com.google.cloud.securitycenter.v1.Database DEFAULT_INSTANCE; + static { DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Database(); } @@ -1350,16 +1465,16 @@ public static com.google.cloud.securitycenter.v1.Database getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Database parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Database(input, extensionRegistry); - } - }; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Database parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Database(input, extensionRegistry); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -1374,6 +1489,4 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.securitycenter.v1.Database getDefaultInstanceForType() { return DEFAULT_INSTANCE; } - } - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DatabaseOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DatabaseOrBuilder.java similarity index 73% rename from owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DatabaseOrBuilder.java rename to java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DatabaseOrBuilder.java index 11f4f0f36e98..f8b48e443ad7 100644 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DatabaseOrBuilder.java +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DatabaseOrBuilder.java @@ -1,138 +1,184 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/securitycenter/v1/database.proto package com.google.cloud.securitycenter.v1; -public interface DatabaseOrBuilder extends +public interface DatabaseOrBuilder + extends // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Database) com.google.protobuf.MessageOrBuilder { /** + * + * *
    * The full resource name of the database the user connected to, if it is
    * supported by CAI. (https://google.aip.dev/122#full-resource-names)
    * 
* * string name = 1; + * * @return The name. */ java.lang.String getName(); /** + * + * *
    * The full resource name of the database the user connected to, if it is
    * supported by CAI. (https://google.aip.dev/122#full-resource-names)
    * 
* * string name = 1; + * * @return The bytes for name. */ - com.google.protobuf.ByteString - getNameBytes(); + com.google.protobuf.ByteString getNameBytes(); /** + * + * *
    * The human readable name of the database the user connected to.
    * 
* * string display_name = 2; + * * @return The displayName. */ java.lang.String getDisplayName(); /** + * + * *
    * The human readable name of the database the user connected to.
    * 
* * string display_name = 2; + * * @return The bytes for displayName. */ - com.google.protobuf.ByteString - getDisplayNameBytes(); + com.google.protobuf.ByteString getDisplayNameBytes(); /** + * + * *
    * The username used to connect to the DB. This may not necessarily be an IAM
    * principal, and has no required format.
    * 
* * string user_name = 3; + * * @return The userName. */ java.lang.String getUserName(); /** + * + * *
    * The username used to connect to the DB. This may not necessarily be an IAM
    * principal, and has no required format.
    * 
* * string user_name = 3; + * * @return The bytes for userName. */ - com.google.protobuf.ByteString - getUserNameBytes(); + com.google.protobuf.ByteString getUserNameBytes(); /** + * + * *
    * The SQL statement associated with the relevant access.
    * 
* * string query = 4; + * * @return The query. */ java.lang.String getQuery(); /** + * + * *
    * The SQL statement associated with the relevant access.
    * 
* * string query = 4; + * * @return The bytes for query. */ - com.google.protobuf.ByteString - getQueryBytes(); + com.google.protobuf.ByteString getQueryBytes(); /** + * + * *
    * The target usernames/roles/groups of a SQL privilege grant (not an IAM
    * policy change).
    * 
* * repeated string grantees = 5; + * * @return A list containing the grantees. */ - java.util.List - getGranteesList(); + java.util.List getGranteesList(); /** + * + * *
    * The target usernames/roles/groups of a SQL privilege grant (not an IAM
    * policy change).
    * 
* * repeated string grantees = 5; + * * @return The count of grantees. */ int getGranteesCount(); /** + * + * *
    * The target usernames/roles/groups of a SQL privilege grant (not an IAM
    * policy change).
    * 
* * repeated string grantees = 5; + * * @param index The index of the element to return. * @return The grantees at the given index. */ java.lang.String getGrantees(int index); /** + * + * *
    * The target usernames/roles/groups of a SQL privilege grant (not an IAM
    * policy change).
    * 
* * repeated string grantees = 5; + * * @param index The index of the value to return. * @return The bytes of the grantees at the given index. */ - com.google.protobuf.ByteString - getGranteesBytes(int index); + com.google.protobuf.ByteString getGranteesBytes(int index); } diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DatabaseProto.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DatabaseProto.java new file mode 100644 index 000000000000..6561ea4e7443 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DatabaseProto.java @@ -0,0 +1,69 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/database.proto + +package com.google.cloud.securitycenter.v1; + +public final class DatabaseProto { + private DatabaseProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v1_Database_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_Database_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n-google/cloud/securitycenter/v1/databas" + + "e.proto\022\036google.cloud.securitycenter.v1\"" + + "b\n\010Database\022\014\n\004name\030\001 \001(\t\022\024\n\014display_nam" + + "e\030\002 \001(\t\022\021\n\tuser_name\030\003 \001(\t\022\r\n\005query\030\004 \001(" + + "\t\022\020\n\010grantees\030\005 \003(\tB\351\001\n\"com.google.cloud" + + ".securitycenter.v1B\rDatabaseProtoP\001ZLgoo" + + "gle.golang.org/genproto/googleapis/cloud" + + "/securitycenter/v1;securitycenter\252\002\036Goog" + + "le.Cloud.SecurityCenter.V1\312\002\036Google\\Clou" + + "d\\SecurityCenter\\V1\352\002!Google::Cloud::Sec" + + "urityCenter::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_cloud_securitycenter_v1_Database_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v1_Database_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_Database_descriptor, + new java.lang.String[] { + "Name", "DisplayName", "UserName", "Query", "Grantees", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Finding.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Finding.java index cd44fba1726e..831ecdc5588b 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Finding.java +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Finding.java @@ -452,6 +452,22 @@ private Finding( kubernetes_ = subBuilder.buildPartial(); } + break; + } + case 354: + { + com.google.cloud.securitycenter.v1.Database.Builder subBuilder = null; + if (database_ != null) { + subBuilder = database_.toBuilder(); + } + database_ = + input.readMessage( + com.google.cloud.securitycenter.v1.Database.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(database_); + database_ = subBuilder.buildPartial(); + } + break; } default: @@ -2344,8 +2360,8 @@ public int getExternalSystemsCount() { * * *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-   * information and external system finding fields.
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external
+   * system information and external system finding fields.
    * 
* * @@ -2370,8 +2386,8 @@ public boolean containsExternalSystems(java.lang.String key) { * * *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-   * information and external system finding fields.
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external
+   * system information and external system finding fields.
    * 
* * @@ -2387,8 +2403,8 @@ public boolean containsExternalSystems(java.lang.String key) { * * *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-   * information and external system finding fields.
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external
+   * system information and external system finding fields.
    * 
* * @@ -2409,8 +2425,8 @@ public com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrDef * * *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-   * information and external system finding fields.
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external
+   * system information and external system finding fields.
    * 
* * @@ -2763,9 +2779,9 @@ public int getContactsCount() { * * *
-   * Output only. Map containing the point of contacts for the given finding. The key
-   * represents the type of contact, while the value contains a list of all the
-   * contacts that pertain. Please refer to:
+   * Output only. Map containing the point of contacts for the given finding.
+   * The key represents the type of contact, while the value contains a list of
+   * all the contacts that pertain. Please refer to:
    * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
    *     {
    *       "security": {
@@ -2803,9 +2819,9 @@ public boolean containsContacts(java.lang.String key) {
    *
    *
    * 
-   * Output only. Map containing the point of contacts for the given finding. The key
-   * represents the type of contact, while the value contains a list of all the
-   * contacts that pertain. Please refer to:
+   * Output only. Map containing the point of contacts for the given finding.
+   * The key represents the type of contact, while the value contains a list of
+   * all the contacts that pertain. Please refer to:
    * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
    *     {
    *       "security": {
@@ -2834,9 +2850,9 @@ public boolean containsContacts(java.lang.String key) {
    *
    *
    * 
-   * Output only. Map containing the point of contacts for the given finding. The key
-   * represents the type of contact, while the value contains a list of all the
-   * contacts that pertain. Please refer to:
+   * Output only. Map containing the point of contacts for the given finding.
+   * The key represents the type of contact, while the value contains a list of
+   * all the contacts that pertain. Please refer to:
    * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
    *     {
    *       "security": {
@@ -2870,9 +2886,9 @@ public com.google.cloud.securitycenter.v1.ContactDetails getContactsOrDefault(
    *
    *
    * 
-   * Output only. Map containing the point of contacts for the given finding. The key
-   * represents the type of contact, while the value contains a list of all the
-   * contacts that pertain. Please refer to:
+   * Output only. Map containing the point of contacts for the given finding.
+   * The key represents the type of contact, while the value contains a list of
+   * all the contacts that pertain. Please refer to:
    * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
    *     {
    *       "security": {
@@ -3317,6 +3333,54 @@ public com.google.cloud.securitycenter.v1.KubernetesOrBuilder getKubernetesOrBui
     return getKubernetes();
   }
 
+  public static final int DATABASE_FIELD_NUMBER = 44;
+  private com.google.cloud.securitycenter.v1.Database database_;
+  /**
+   *
+   *
+   * 
+   * Database associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v1.Database database = 44; + * + * @return Whether the database field is set. + */ + @java.lang.Override + public boolean hasDatabase() { + return database_ != null; + } + /** + * + * + *
+   * Database associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v1.Database database = 44; + * + * @return The database. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.Database getDatabase() { + return database_ == null + ? com.google.cloud.securitycenter.v1.Database.getDefaultInstance() + : database_; + } + /** + * + * + *
+   * Database associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v1.Database database = 44; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.DatabaseOrBuilder getDatabaseOrBuilder() { + return getDatabase(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -3424,6 +3488,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (kubernetes_ != null) { output.writeMessage(43, getKubernetes()); } + if (database_ != null) { + output.writeMessage(44, getDatabase()); + } unknownFields.writeTo(output); } @@ -3554,6 +3621,9 @@ public int getSerializedSize() { if (kubernetes_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(43, getKubernetes()); } + if (database_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(44, getDatabase()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -3631,6 +3701,10 @@ public boolean equals(final java.lang.Object obj) { if (hasKubernetes()) { if (!getKubernetes().equals(other.getKubernetes())) return false; } + if (hasDatabase() != other.hasDatabase()) return false; + if (hasDatabase()) { + if (!getDatabase().equals(other.getDatabase())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -3740,6 +3814,10 @@ public int hashCode() { hash = (37 * hash) + KUBERNETES_FIELD_NUMBER; hash = (53 * hash) + getKubernetes().hashCode(); } + if (hasDatabase()) { + hash = (37 * hash) + DATABASE_FIELD_NUMBER; + hash = (53 * hash) + getDatabase().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -4043,6 +4121,12 @@ public Builder clear() { kubernetes_ = null; kubernetesBuilder_ = null; } + if (databaseBuilder_ == null) { + database_ = null; + } else { + database_ = null; + databaseBuilder_ = null; + } return this; } @@ -4185,6 +4269,11 @@ public com.google.cloud.securitycenter.v1.Finding buildPartial() { } else { result.kubernetes_ = kubernetesBuilder_.build(); } + if (databaseBuilder_ == null) { + result.database_ = database_; + } else { + result.database_ = databaseBuilder_.build(); + } onBuilt(); return result; } @@ -4450,6 +4539,9 @@ public Builder mergeFrom(com.google.cloud.securitycenter.v1.Finding other) { if (other.hasKubernetes()) { mergeKubernetes(other.getKubernetes()); } + if (other.hasDatabase()) { + mergeDatabase(other.getDatabase()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -7098,8 +7190,8 @@ public int getExternalSystemsCount() { * * *
-     * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-     * information and external system finding fields.
+     * Output only. Third party SIEM/SOAR fields within SCC, contains external
+     * system information and external system finding fields.
      * 
* * @@ -7124,8 +7216,8 @@ public boolean containsExternalSystems(java.lang.String key) { * * *
-     * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-     * information and external system finding fields.
+     * Output only. Third party SIEM/SOAR fields within SCC, contains external
+     * system information and external system finding fields.
      * 
* * @@ -7141,8 +7233,8 @@ public boolean containsExternalSystems(java.lang.String key) { * * *
-     * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-     * information and external system finding fields.
+     * Output only. Third party SIEM/SOAR fields within SCC, contains external
+     * system information and external system finding fields.
      * 
* * @@ -7163,8 +7255,8 @@ public com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrDef * * *
-     * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-     * information and external system finding fields.
+     * Output only. Third party SIEM/SOAR fields within SCC, contains external
+     * system information and external system finding fields.
      * 
* * @@ -7193,8 +7285,8 @@ public Builder clearExternalSystems() { * * *
-     * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-     * information and external system finding fields.
+     * Output only. Third party SIEM/SOAR fields within SCC, contains external
+     * system information and external system finding fields.
      * 
* * @@ -7218,8 +7310,8 @@ public Builder removeExternalSystems(java.lang.String key) { * * *
-     * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-     * information and external system finding fields.
+     * Output only. Third party SIEM/SOAR fields within SCC, contains external
+     * system information and external system finding fields.
      * 
* * @@ -7242,8 +7334,8 @@ public Builder putExternalSystems( * * *
-     * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-     * information and external system finding fields.
+     * Output only. Third party SIEM/SOAR fields within SCC, contains external
+     * system information and external system finding fields.
      * 
* * @@ -8504,9 +8596,9 @@ public int getContactsCount() { * * *
-     * Output only. Map containing the point of contacts for the given finding. The key
-     * represents the type of contact, while the value contains a list of all the
-     * contacts that pertain. Please refer to:
+     * Output only. Map containing the point of contacts for the given finding.
+     * The key represents the type of contact, while the value contains a list of
+     * all the contacts that pertain. Please refer to:
      * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
      *     {
      *       "security": {
@@ -8544,9 +8636,9 @@ public boolean containsContacts(java.lang.String key) {
      *
      *
      * 
-     * Output only. Map containing the point of contacts for the given finding. The key
-     * represents the type of contact, while the value contains a list of all the
-     * contacts that pertain. Please refer to:
+     * Output only. Map containing the point of contacts for the given finding.
+     * The key represents the type of contact, while the value contains a list of
+     * all the contacts that pertain. Please refer to:
      * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
      *     {
      *       "security": {
@@ -8575,9 +8667,9 @@ public boolean containsContacts(java.lang.String key) {
      *
      *
      * 
-     * Output only. Map containing the point of contacts for the given finding. The key
-     * represents the type of contact, while the value contains a list of all the
-     * contacts that pertain. Please refer to:
+     * Output only. Map containing the point of contacts for the given finding.
+     * The key represents the type of contact, while the value contains a list of
+     * all the contacts that pertain. Please refer to:
      * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
      *     {
      *       "security": {
@@ -8611,9 +8703,9 @@ public com.google.cloud.securitycenter.v1.ContactDetails getContactsOrDefault(
      *
      *
      * 
-     * Output only. Map containing the point of contacts for the given finding. The key
-     * represents the type of contact, while the value contains a list of all the
-     * contacts that pertain. Please refer to:
+     * Output only. Map containing the point of contacts for the given finding.
+     * The key represents the type of contact, while the value contains a list of
+     * all the contacts that pertain. Please refer to:
      * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
      *     {
      *       "security": {
@@ -8655,9 +8747,9 @@ public Builder clearContacts() {
      *
      *
      * 
-     * Output only. Map containing the point of contacts for the given finding. The key
-     * represents the type of contact, while the value contains a list of all the
-     * contacts that pertain. Please refer to:
+     * Output only. Map containing the point of contacts for the given finding.
+     * The key represents the type of contact, while the value contains a list of
+     * all the contacts that pertain. Please refer to:
      * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
      *     {
      *       "security": {
@@ -8694,9 +8786,9 @@ public Builder removeContacts(java.lang.String key) {
      *
      *
      * 
-     * Output only. Map containing the point of contacts for the given finding. The key
-     * represents the type of contact, while the value contains a list of all the
-     * contacts that pertain. Please refer to:
+     * Output only. Map containing the point of contacts for the given finding.
+     * The key represents the type of contact, while the value contains a list of
+     * all the contacts that pertain. Please refer to:
      * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
      *     {
      *       "security": {
@@ -8732,9 +8824,9 @@ public Builder putContacts(
      *
      *
      * 
-     * Output only. Map containing the point of contacts for the given finding. The key
-     * represents the type of contact, while the value contains a list of all the
-     * contacts that pertain. Please refer to:
+     * Output only. Map containing the point of contacts for the given finding.
+     * The key represents the type of contact, while the value contains a list of
+     * all the contacts that pertain. Please refer to:
      * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
      *     {
      *       "security": {
@@ -10435,6 +10527,192 @@ public com.google.cloud.securitycenter.v1.KubernetesOrBuilder getKubernetesOrBui
       return kubernetesBuilder_;
     }
 
+    private com.google.cloud.securitycenter.v1.Database database_;
+    private com.google.protobuf.SingleFieldBuilderV3<
+            com.google.cloud.securitycenter.v1.Database,
+            com.google.cloud.securitycenter.v1.Database.Builder,
+            com.google.cloud.securitycenter.v1.DatabaseOrBuilder>
+        databaseBuilder_;
+    /**
+     *
+     *
+     * 
+     * Database associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v1.Database database = 44; + * + * @return Whether the database field is set. + */ + public boolean hasDatabase() { + return databaseBuilder_ != null || database_ != null; + } + /** + * + * + *
+     * Database associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v1.Database database = 44; + * + * @return The database. + */ + public com.google.cloud.securitycenter.v1.Database getDatabase() { + if (databaseBuilder_ == null) { + return database_ == null + ? com.google.cloud.securitycenter.v1.Database.getDefaultInstance() + : database_; + } else { + return databaseBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Database associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v1.Database database = 44; + */ + public Builder setDatabase(com.google.cloud.securitycenter.v1.Database value) { + if (databaseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + database_ = value; + onChanged(); + } else { + databaseBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Database associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v1.Database database = 44; + */ + public Builder setDatabase( + com.google.cloud.securitycenter.v1.Database.Builder builderForValue) { + if (databaseBuilder_ == null) { + database_ = builderForValue.build(); + onChanged(); + } else { + databaseBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Database associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v1.Database database = 44; + */ + public Builder mergeDatabase(com.google.cloud.securitycenter.v1.Database value) { + if (databaseBuilder_ == null) { + if (database_ != null) { + database_ = + com.google.cloud.securitycenter.v1.Database.newBuilder(database_) + .mergeFrom(value) + .buildPartial(); + } else { + database_ = value; + } + onChanged(); + } else { + databaseBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Database associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v1.Database database = 44; + */ + public Builder clearDatabase() { + if (databaseBuilder_ == null) { + database_ = null; + onChanged(); + } else { + database_ = null; + databaseBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Database associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v1.Database database = 44; + */ + public com.google.cloud.securitycenter.v1.Database.Builder getDatabaseBuilder() { + + onChanged(); + return getDatabaseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Database associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v1.Database database = 44; + */ + public com.google.cloud.securitycenter.v1.DatabaseOrBuilder getDatabaseOrBuilder() { + if (databaseBuilder_ != null) { + return databaseBuilder_.getMessageOrBuilder(); + } else { + return database_ == null + ? com.google.cloud.securitycenter.v1.Database.getDefaultInstance() + : database_; + } + } + /** + * + * + *
+     * Database associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v1.Database database = 44; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.Database, + com.google.cloud.securitycenter.v1.Database.Builder, + com.google.cloud.securitycenter.v1.DatabaseOrBuilder> + getDatabaseFieldBuilder() { + if (databaseBuilder_ == null) { + databaseBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.Database, + com.google.cloud.securitycenter.v1.Database.Builder, + com.google.cloud.securitycenter.v1.DatabaseOrBuilder>( + getDatabase(), getParentForChildren(), isClean()); + database_ = null; + } + return databaseBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOrBuilder.java index 9d30c7bb1986..81c48623ab54 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOrBuilder.java +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOrBuilder.java @@ -663,8 +663,8 @@ com.google.protobuf.Value getSourcePropertiesOrDefault( * * *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-   * information and external system finding fields.
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external
+   * system information and external system finding fields.
    * 
* * @@ -676,8 +676,8 @@ com.google.protobuf.Value getSourcePropertiesOrDefault( * * *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-   * information and external system finding fields.
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external
+   * system information and external system finding fields.
    * 
* * @@ -693,8 +693,8 @@ com.google.protobuf.Value getSourcePropertiesOrDefault( * * *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-   * information and external system finding fields.
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external
+   * system information and external system finding fields.
    * 
* * @@ -707,8 +707,8 @@ com.google.protobuf.Value getSourcePropertiesOrDefault( * * *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-   * information and external system finding fields.
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external
+   * system information and external system finding fields.
    * 
* * @@ -725,8 +725,8 @@ com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrDefault( * * *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
-   * information and external system finding fields.
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external
+   * system information and external system finding fields.
    * 
* * @@ -950,9 +950,9 @@ com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrDefault( * * *
-   * Output only. Map containing the point of contacts for the given finding. The key
-   * represents the type of contact, while the value contains a list of all the
-   * contacts that pertain. Please refer to:
+   * Output only. Map containing the point of contacts for the given finding.
+   * The key represents the type of contact, while the value contains a list of
+   * all the contacts that pertain. Please refer to:
    * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
    *     {
    *       "security": {
@@ -977,9 +977,9 @@ com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrDefault(
    *
    *
    * 
-   * Output only. Map containing the point of contacts for the given finding. The key
-   * represents the type of contact, while the value contains a list of all the
-   * contacts that pertain. Please refer to:
+   * Output only. Map containing the point of contacts for the given finding.
+   * The key represents the type of contact, while the value contains a list of
+   * all the contacts that pertain. Please refer to:
    * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
    *     {
    *       "security": {
@@ -1007,9 +1007,9 @@ com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrDefault(
    *
    *
    * 
-   * Output only. Map containing the point of contacts for the given finding. The key
-   * represents the type of contact, while the value contains a list of all the
-   * contacts that pertain. Please refer to:
+   * Output only. Map containing the point of contacts for the given finding.
+   * The key represents the type of contact, while the value contains a list of
+   * all the contacts that pertain. Please refer to:
    * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
    *     {
    *       "security": {
@@ -1035,9 +1035,9 @@ com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrDefault(
    *
    *
    * 
-   * Output only. Map containing the point of contacts for the given finding. The key
-   * represents the type of contact, while the value contains a list of all the
-   * contacts that pertain. Please refer to:
+   * Output only. Map containing the point of contacts for the given finding.
+   * The key represents the type of contact, while the value contains a list of
+   * all the contacts that pertain. Please refer to:
    * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
    *     {
    *       "security": {
@@ -1067,9 +1067,9 @@ com.google.cloud.securitycenter.v1.ContactDetails getContactsOrDefault(
    *
    *
    * 
-   * Output only. Map containing the point of contacts for the given finding. The key
-   * represents the type of contact, while the value contains a list of all the
-   * contacts that pertain. Please refer to:
+   * Output only. Map containing the point of contacts for the given finding.
+   * The key represents the type of contact, while the value contains a list of
+   * all the contacts that pertain. Please refer to:
    * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
    *     {
    *       "security": {
@@ -1376,4 +1376,39 @@ com.google.cloud.securitycenter.v1.ContactDetails getContactsOrDefault(
    * .google.cloud.securitycenter.v1.Kubernetes kubernetes = 43;
    */
   com.google.cloud.securitycenter.v1.KubernetesOrBuilder getKubernetesOrBuilder();
+
+  /**
+   *
+   *
+   * 
+   * Database associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v1.Database database = 44; + * + * @return Whether the database field is set. + */ + boolean hasDatabase(); + /** + * + * + *
+   * Database associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v1.Database database = 44; + * + * @return The database. + */ + com.google.cloud.securitycenter.v1.Database getDatabase(); + /** + * + * + *
+   * Database associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v1.Database database = 44; + */ + com.google.cloud.securitycenter.v1.DatabaseOrBuilder getDatabaseOrBuilder(); } diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOuterClass.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOuterClass.java index 9c33d69415d4..633246196611 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOuterClass.java +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOuterClass.java @@ -61,88 +61,91 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "/cloud/securitycenter/v1/connection.prot" + "o\0324google/cloud/securitycenter/v1/contac" + "t_details.proto\032.google/cloud/securityce" - + "nter/v1/container.proto\0321google/cloud/se" - + "curitycenter/v1/exfiltration.proto\0324goog" - + "le/cloud/securitycenter/v1/external_syst" - + "em.proto\0320google/cloud/securitycenter/v1" - + "/iam_binding.proto\032.google/cloud/securit" - + "ycenter/v1/indicator.proto\032/google/cloud" - + "/securitycenter/v1/kubernetes.proto\0321goo" - + "gle/cloud/securitycenter/v1/mitre_attack" - + ".proto\032,google/cloud/securitycenter/v1/p" - + "rocess.proto\0323google/cloud/securitycente" - + "r/v1/security_marks.proto\0322google/cloud/" - + "securitycenter/v1/vulnerability.proto\032\034g" - + "oogle/protobuf/struct.proto\032\037google/prot" - + "obuf/timestamp.proto\"\310\023\n\007Finding\022\014\n\004name" - + "\030\001 \001(\t\022\016\n\006parent\030\002 \001(\t\022\025\n\rresource_name\030" - + "\003 \001(\t\022<\n\005state\030\004 \001(\0162-.google.cloud.secu" - + "ritycenter.v1.Finding.State\022\020\n\010category\030" - + "\005 \001(\t\022\024\n\014external_uri\030\006 \001(\t\022X\n\021source_pr" - + "operties\030\007 \003(\0132=.google.cloud.securityce" - + "nter.v1.Finding.SourcePropertiesEntry\022J\n" - + "\016security_marks\030\010 \001(\0132-.google.cloud.sec" - + "uritycenter.v1.SecurityMarksB\003\340A\003\022.\n\neve" - + "nt_time\030\t \001(\0132\032.google.protobuf.Timestam" - + "p\022/\n\013create_time\030\n \001(\0132\032.google.protobuf" - + ".Timestamp\022B\n\010severity\030\014 \001(\01620.google.cl" - + "oud.securitycenter.v1.Finding.Severity\022\026" - + "\n\016canonical_name\030\016 \001(\t\022:\n\004mute\030\017 \001(\0162,.g" - + "oogle.cloud.securitycenter.v1.Finding.Mu" - + "te\022K\n\rfinding_class\030\021 \001(\01624.google.cloud" - + ".securitycenter.v1.Finding.FindingClass\022" - + "<\n\tindicator\030\022 \001(\0132).google.cloud.securi" - + "tycenter.v1.Indicator\022D\n\rvulnerability\030\024" - + " \001(\0132-.google.cloud.securitycenter.v1.Vu" - + "lnerability\0229\n\020mute_update_time\030\025 \001(\0132\032." - + "google.protobuf.TimestampB\003\340A\003\022[\n\020extern" - + "al_systems\030\026 \003(\0132<.google.cloud.security" - + "center.v1.Finding.ExternalSystemsEntryB\003" - + "\340A\003\022A\n\014mitre_attack\030\031 \001(\0132+.google.cloud" - + ".securitycenter.v1.MitreAttack\0226\n\006access" - + "\030\032 \001(\0132&.google.cloud.securitycenter.v1." - + "Access\022?\n\013connections\030\037 \003(\0132*.google.clo" - + "ud.securitycenter.v1.Connection\022\026\n\016mute_" - + "initiator\030\034 \001(\t\022:\n\tprocesses\030\036 \003(\0132\'.goo" - + "gle.cloud.securitycenter.v1.Process\022L\n\010c" - + "ontacts\030! \003(\01325.google.cloud.securitycen" - + "ter.v1.Finding.ContactsEntryB\003\340A\003\022?\n\013com" - + "pliances\030\" \003(\0132*.google.cloud.securityce" - + "nter.v1.Compliance\022\023\n\013description\030% \001(\t\022" - + "B\n\014exfiltration\030& \001(\0132,.google.cloud.sec" - + "uritycenter.v1.Exfiltration\022@\n\014iam_bindi" - + "ngs\030\' \003(\0132*.google.cloud.securitycenter." - + "v1.IamBinding\022\022\n\nnext_steps\030( \001(\t\022=\n\ncon" - + "tainers\030* \003(\0132).google.cloud.securitycen" - + "ter.v1.Container\022>\n\nkubernetes\030+ \001(\0132*.g" - + "oogle.cloud.securitycenter.v1.Kubernetes" - + "\032O\n\025SourcePropertiesEntry\022\013\n\003key\030\001 \001(\t\022%" - + "\n\005value\030\002 \001(\0132\026.google.protobuf.Value:\0028" - + "\001\032f\n\024ExternalSystemsEntry\022\013\n\003key\030\001 \001(\t\022=" - + "\n\005value\030\002 \001(\0132..google.cloud.securitycen" - + "ter.v1.ExternalSystem:\0028\001\032_\n\rContactsEnt" - + "ry\022\013\n\003key\030\001 \001(\t\022=\n\005value\030\002 \001(\0132..google." - + "cloud.securitycenter.v1.ContactDetails:\002" - + "8\001\"8\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\n\n\006AC" - + "TIVE\020\001\022\014\n\010INACTIVE\020\002\"Q\n\010Severity\022\030\n\024SEVE" - + "RITY_UNSPECIFIED\020\000\022\014\n\010CRITICAL\020\001\022\010\n\004HIGH" - + "\020\002\022\n\n\006MEDIUM\020\003\022\007\n\003LOW\020\004\"C\n\004Mute\022\024\n\020MUTE_" - + "UNSPECIFIED\020\000\022\t\n\005MUTED\020\001\022\013\n\007UNMUTED\020\002\022\r\n" - + "\tUNDEFINED\020\004\"\202\001\n\014FindingClass\022\035\n\031FINDING" - + "_CLASS_UNSPECIFIED\020\000\022\n\n\006THREAT\020\001\022\021\n\rVULN" - + "ERABILITY\020\002\022\024\n\020MISCONFIGURATION\020\003\022\017\n\013OBS" - + "ERVATION\020\004\022\r\n\tSCC_ERROR\020\005:\333\001\352A\327\001\n%securi" - + "tycenter.googleapis.com/Finding\022@organiz" - + "ations/{organization}/sources/{source}/f" - + "indings/{finding}\0224folders/{folder}/sour" - + "ces/{source}/findings/{finding}\0226project" - + "s/{project}/sources/{source}/findings/{f" - + "inding}B\332\001\n\"com.google.cloud.securitycen" - + "ter.v1P\001ZLgoogle.golang.org/genproto/goo" - + "gleapis/cloud/securitycenter/v1;security" - + "center\252\002\036Google.Cloud.SecurityCenter.V1\312" - + "\002\036Google\\Cloud\\SecurityCenter\\V1\352\002!Googl" - + "e::Cloud::SecurityCenter::V1b\006proto3" + + "nter/v1/container.proto\032-google/cloud/se" + + "curitycenter/v1/database.proto\0321google/c" + + "loud/securitycenter/v1/exfiltration.prot" + + "o\0324google/cloud/securitycenter/v1/extern" + + "al_system.proto\0320google/cloud/securityce" + + "nter/v1/iam_binding.proto\032.google/cloud/" + + "securitycenter/v1/indicator.proto\032/googl" + + "e/cloud/securitycenter/v1/kubernetes.pro" + + "to\0321google/cloud/securitycenter/v1/mitre" + + "_attack.proto\032,google/cloud/securitycent" + + "er/v1/process.proto\0323google/cloud/securi" + + "tycenter/v1/security_marks.proto\0322google" + + "/cloud/securitycenter/v1/vulnerability.p" + + "roto\032\034google/protobuf/struct.proto\032\037goog" + + "le/protobuf/timestamp.proto\"\204\024\n\007Finding\022" + + "\014\n\004name\030\001 \001(\t\022\016\n\006parent\030\002 \001(\t\022\025\n\rresourc" + + "e_name\030\003 \001(\t\022<\n\005state\030\004 \001(\0162-.google.clo" + + "ud.securitycenter.v1.Finding.State\022\020\n\010ca" + + "tegory\030\005 \001(\t\022\024\n\014external_uri\030\006 \001(\t\022X\n\021so" + + "urce_properties\030\007 \003(\0132=.google.cloud.sec" + + "uritycenter.v1.Finding.SourcePropertiesE" + + "ntry\022J\n\016security_marks\030\010 \001(\0132-.google.cl" + + "oud.securitycenter.v1.SecurityMarksB\003\340A\003" + + "\022.\n\nevent_time\030\t \001(\0132\032.google.protobuf.T" + + "imestamp\022/\n\013create_time\030\n \001(\0132\032.google.p" + + "rotobuf.Timestamp\022B\n\010severity\030\014 \001(\01620.go" + + "ogle.cloud.securitycenter.v1.Finding.Sev" + + "erity\022\026\n\016canonical_name\030\016 \001(\t\022:\n\004mute\030\017 " + + "\001(\0162,.google.cloud.securitycenter.v1.Fin" + + "ding.Mute\022K\n\rfinding_class\030\021 \001(\01624.googl" + + "e.cloud.securitycenter.v1.Finding.Findin" + + "gClass\022<\n\tindicator\030\022 \001(\0132).google.cloud" + + ".securitycenter.v1.Indicator\022D\n\rvulnerab" + + "ility\030\024 \001(\0132-.google.cloud.securitycente" + + "r.v1.Vulnerability\0229\n\020mute_update_time\030\025" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022[\n" + + "\020external_systems\030\026 \003(\0132<.google.cloud.s" + + "ecuritycenter.v1.Finding.ExternalSystems" + + "EntryB\003\340A\003\022A\n\014mitre_attack\030\031 \001(\0132+.googl" + + "e.cloud.securitycenter.v1.MitreAttack\0226\n" + + "\006access\030\032 \001(\0132&.google.cloud.securitycen" + + "ter.v1.Access\022?\n\013connections\030\037 \003(\0132*.goo" + + "gle.cloud.securitycenter.v1.Connection\022\026" + + "\n\016mute_initiator\030\034 \001(\t\022:\n\tprocesses\030\036 \003(" + + "\0132\'.google.cloud.securitycenter.v1.Proce" + + "ss\022L\n\010contacts\030! \003(\01325.google.cloud.secu" + + "ritycenter.v1.Finding.ContactsEntryB\003\340A\003" + + "\022?\n\013compliances\030\" \003(\0132*.google.cloud.sec" + + "uritycenter.v1.Compliance\022\023\n\013description" + + "\030% \001(\t\022B\n\014exfiltration\030& \001(\0132,.google.cl" + + "oud.securitycenter.v1.Exfiltration\022@\n\014ia" + + "m_bindings\030\' \003(\0132*.google.cloud.security" + + "center.v1.IamBinding\022\022\n\nnext_steps\030( \001(\t" + + "\022=\n\ncontainers\030* \003(\0132).google.cloud.secu" + + "ritycenter.v1.Container\022>\n\nkubernetes\030+ " + + "\001(\0132*.google.cloud.securitycenter.v1.Kub" + + "ernetes\022:\n\010database\030, \001(\0132(.google.cloud" + + ".securitycenter.v1.Database\032O\n\025SourcePro" + + "pertiesEntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(\013" + + "2\026.google.protobuf.Value:\0028\001\032f\n\024External" + + "SystemsEntry\022\013\n\003key\030\001 \001(\t\022=\n\005value\030\002 \001(\013" + + "2..google.cloud.securitycenter.v1.Extern" + + "alSystem:\0028\001\032_\n\rContactsEntry\022\013\n\003key\030\001 \001" + + "(\t\022=\n\005value\030\002 \001(\0132..google.cloud.securit" + + "ycenter.v1.ContactDetails:\0028\001\"8\n\005State\022\025" + + "\n\021STATE_UNSPECIFIED\020\000\022\n\n\006ACTIVE\020\001\022\014\n\010INA" + + "CTIVE\020\002\"Q\n\010Severity\022\030\n\024SEVERITY_UNSPECIF" + + "IED\020\000\022\014\n\010CRITICAL\020\001\022\010\n\004HIGH\020\002\022\n\n\006MEDIUM\020" + + "\003\022\007\n\003LOW\020\004\"C\n\004Mute\022\024\n\020MUTE_UNSPECIFIED\020\000" + + "\022\t\n\005MUTED\020\001\022\013\n\007UNMUTED\020\002\022\r\n\tUNDEFINED\020\004\"" + + "\202\001\n\014FindingClass\022\035\n\031FINDING_CLASS_UNSPEC" + + "IFIED\020\000\022\n\n\006THREAT\020\001\022\021\n\rVULNERABILITY\020\002\022\024" + + "\n\020MISCONFIGURATION\020\003\022\017\n\013OBSERVATION\020\004\022\r\n" + + "\tSCC_ERROR\020\005:\333\001\352A\327\001\n%securitycenter.goog" + + "leapis.com/Finding\022@organizations/{organ" + + "ization}/sources/{source}/findings/{find" + + "ing}\0224folders/{folder}/sources/{source}/" + + "findings/{finding}\0226projects/{project}/s" + + "ources/{source}/findings/{finding}B\332\001\n\"c" + + "om.google.cloud.securitycenter.v1P\001ZLgoo" + + "gle.golang.org/genproto/googleapis/cloud" + + "/securitycenter/v1;securitycenter\252\002\036Goog" + + "le.Cloud.SecurityCenter.V1\312\002\036Google\\Clou" + + "d\\SecurityCenter\\V1\352\002!Google::Cloud::Sec" + + "urityCenter::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -155,6 +158,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.securitycenter.v1.ConnectionProto.getDescriptor(), com.google.cloud.securitycenter.v1.ContactDetailsProto.getDescriptor(), com.google.cloud.securitycenter.v1.ContainerProto.getDescriptor(), + com.google.cloud.securitycenter.v1.DatabaseProto.getDescriptor(), com.google.cloud.securitycenter.v1.ExfiltrationProto.getDescriptor(), com.google.cloud.securitycenter.v1.ExternalSystemProto.getDescriptor(), com.google.cloud.securitycenter.v1.IamBindingProto.getDescriptor(), @@ -204,6 +208,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "NextSteps", "Containers", "Kubernetes", + "Database", }); internal_static_google_cloud_securitycenter_v1_Finding_SourcePropertiesEntry_descriptor = internal_static_google_cloud_securitycenter_v1_Finding_descriptor.getNestedTypes().get(0); @@ -242,6 +247,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.securitycenter.v1.ConnectionProto.getDescriptor(); com.google.cloud.securitycenter.v1.ContactDetailsProto.getDescriptor(); com.google.cloud.securitycenter.v1.ContainerProto.getDescriptor(); + com.google.cloud.securitycenter.v1.DatabaseProto.getDescriptor(); com.google.cloud.securitycenter.v1.ExfiltrationProto.getDescriptor(); com.google.cloud.securitycenter.v1.ExternalSystemProto.getDescriptor(); com.google.cloud.securitycenter.v1.IamBindingProto.getDescriptor(); diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/database.proto b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/database.proto similarity index 100% rename from owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/database.proto rename to java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/database.proto diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/finding.proto b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/finding.proto index 6c6043b5b242..8fbd9421f55d 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/finding.proto +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/finding.proto @@ -23,6 +23,7 @@ import "google/cloud/securitycenter/v1/compliance.proto"; import "google/cloud/securitycenter/v1/connection.proto"; import "google/cloud/securitycenter/v1/contact_details.proto"; import "google/cloud/securitycenter/v1/container.proto"; +import "google/cloud/securitycenter/v1/database.proto"; import "google/cloud/securitycenter/v1/exfiltration.proto"; import "google/cloud/securitycenter/v1/external_system.proto"; import "google/cloud/securitycenter/v1/iam_binding.proto"; @@ -257,11 +258,13 @@ message Finding { Vulnerability vulnerability = 20; // Output only. The most recent time this finding was muted or unmuted. - google.protobuf.Timestamp mute_update_time = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp mute_update_time = 21 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Third party SIEM/SOAR fields within SCC, contains external system - // information and external system finding fields. - map external_systems = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Third party SIEM/SOAR fields within SCC, contains external + // system information and external system finding fields. + map external_systems = 22 + [(google.api.field_behavior) = OUTPUT_ONLY]; // MITRE ATT&CK tactics and techniques related to this finding. // See: https://attack.mitre.org @@ -283,9 +286,9 @@ message Finding { // Represents operating system processes associated with the Finding. repeated Process processes = 30; - // Output only. Map containing the point of contacts for the given finding. The key - // represents the type of contact, while the value contains a list of all the - // contacts that pertain. Please refer to: + // Output only. Map containing the point of contacts for the given finding. + // The key represents the type of contact, while the value contains a list of + // all the contacts that pertain. Please refer to: // https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories // // { @@ -300,7 +303,8 @@ message Finding { // ] // } // } - map contacts = 33 [(google.api.field_behavior) = OUTPUT_ONLY]; + map contacts = 33 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Contains compliance information for security standards associated to the // finding. @@ -324,4 +328,7 @@ message Finding { // Kubernetes resources associated with the finding. Kubernetes kubernetes = 43; + + // Database associated with the finding. + Database database = 44; } diff --git a/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterClient.java b/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterClient.java deleted file mode 100644 index 6ac462844c37..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterClient.java +++ /dev/null @@ -1,5564 +0,0 @@ -/* - * Copyright 2022 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.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.httpjson.longrunning.OperationsClient; -import com.google.api.gax.longrunning.OperationFuture; -import com.google.api.gax.paging.AbstractFixedSizeCollection; -import com.google.api.gax.paging.AbstractPage; -import com.google.api.gax.paging.AbstractPagedListResponse; -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; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: V1 APIs for Security Center service. - * - *

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
- *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
- *   Source source = Source.newBuilder().build();
- *   Source response = securityCenterClient.createSource(parent, source);
- * }
- * }
- * - *

Note: close() needs to be called on the SecurityCenterClient object to clean up resources such - * as threads. In the example above, try-with-resources is used, which automatically calls close(). - * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
- * - *

See the individual methods for example code. - * - *

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

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

To customize credentials: - * - *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * SecurityCenterSettings securityCenterSettings =
- *     SecurityCenterSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * SecurityCenterClient securityCenterClient = SecurityCenterClient.create(securityCenterSettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * SecurityCenterSettings securityCenterSettings =
- *     SecurityCenterSettings.newBuilder().setEndpoint(myEndpoint).build();
- * SecurityCenterClient securityCenterClient = SecurityCenterClient.create(securityCenterSettings);
- * }
- * - *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over - * the wire: - * - *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * SecurityCenterSettings securityCenterSettings =
- *     SecurityCenterSettings.newBuilder()
- *         .setTransportChannelProvider(
- *             SecurityCenterSettings.defaultHttpJsonTransportProviderBuilder().build())
- *         .build();
- * SecurityCenterClient securityCenterClient = SecurityCenterClient.create(securityCenterSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@Generated("by gapic-generator-java") -public class SecurityCenterClient implements BackgroundResource { - private final SecurityCenterSettings settings; - private final SecurityCenterStub stub; - private final OperationsClient httpJsonOperationsClient; - private final com.google.longrunning.OperationsClient operationsClient; - - /** Constructs an instance of SecurityCenterClient with default settings. */ - public static final SecurityCenterClient create() throws IOException { - return create(SecurityCenterSettings.newBuilder().build()); - } - - /** - * Constructs an instance of SecurityCenterClient, using the given settings. The channels are - * created based on the settings passed in, or defaults for any settings that are not set. - */ - public static final SecurityCenterClient create(SecurityCenterSettings settings) - throws IOException { - return new SecurityCenterClient(settings); - } - - /** - * Constructs an instance of SecurityCenterClient, using the given stub for making calls. This is - * for advanced usage - prefer using create(SecurityCenterSettings). - */ - public static final SecurityCenterClient create(SecurityCenterStub stub) { - return new SecurityCenterClient(stub); - } - - /** - * Constructs an instance of SecurityCenterClient, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected SecurityCenterClient(SecurityCenterSettings settings) throws IOException { - this.settings = settings; - this.stub = ((SecurityCenterStubSettings) settings.getStubSettings()).createStub(); - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - protected SecurityCenterClient(SecurityCenterStub stub) { - this.settings = null; - this.stub = stub; - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - public final SecurityCenterSettings getSettings() { - return settings; - } - - public SecurityCenterStub getStub() { - return stub; - } - - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - public final com.google.longrunning.OperationsClient getOperationsClient() { - return operationsClient; - } - - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - @BetaApi - public final OperationsClient getHttpJsonOperationsClient() { - return httpJsonOperationsClient; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either - * an organization, folder or project. The findings matched by the filter will be muted after the - * LRO is done. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ResourceName parent = FolderName.of("[FOLDER]");
-   *   BulkMuteFindingsResponse response = securityCenterClient.bulkMuteFindingsAsync(parent).get();
-   * }
-   * }
- * - * @param parent Required. The parent, at which bulk action needs to be applied. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture bulkMuteFindingsAsync( - ResourceName parent) { - BulkMuteFindingsRequest request = - BulkMuteFindingsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return bulkMuteFindingsAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either - * an organization, folder or project. The findings matched by the filter will be muted after the - * LRO is done. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   String parent = FolderName.of("[FOLDER]").toString();
-   *   BulkMuteFindingsResponse response = securityCenterClient.bulkMuteFindingsAsync(parent).get();
-   * }
-   * }
- * - * @param parent Required. The parent, at which bulk action needs to be applied. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture bulkMuteFindingsAsync( - String parent) { - BulkMuteFindingsRequest request = - BulkMuteFindingsRequest.newBuilder().setParent(parent).build(); - return bulkMuteFindingsAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either - * an organization, folder or project. The findings matched by the filter will be muted after the - * LRO is done. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   BulkMuteFindingsRequest request =
-   *       BulkMuteFindingsRequest.newBuilder()
-   *           .setParent(FolderName.of("[FOLDER]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setMuteAnnotation("muteAnnotation-2111042008")
-   *           .build();
-   *   BulkMuteFindingsResponse response = securityCenterClient.bulkMuteFindingsAsync(request).get();
-   * }
-   * }
- * - * @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 OperationFuture bulkMuteFindingsAsync( - BulkMuteFindingsRequest request) { - return bulkMuteFindingsOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either - * an organization, folder or project. The findings matched by the filter will be muted after the - * LRO is done. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   BulkMuteFindingsRequest request =
-   *       BulkMuteFindingsRequest.newBuilder()
-   *           .setParent(FolderName.of("[FOLDER]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setMuteAnnotation("muteAnnotation-2111042008")
-   *           .build();
-   *   OperationFuture future =
-   *       securityCenterClient.bulkMuteFindingsOperationCallable().futureCall(request);
-   *   // Do something.
-   *   BulkMuteFindingsResponse response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - bulkMuteFindingsOperationCallable() { - return stub.bulkMuteFindingsOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either - * an organization, folder or project. The findings matched by the filter will be muted after the - * LRO is done. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   BulkMuteFindingsRequest request =
-   *       BulkMuteFindingsRequest.newBuilder()
-   *           .setParent(FolderName.of("[FOLDER]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setMuteAnnotation("muteAnnotation-2111042008")
-   *           .build();
-   *   ApiFuture future =
-   *       securityCenterClient.bulkMuteFindingsCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable bulkMuteFindingsCallable() { - return stub.bulkMuteFindingsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a source. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
-   *   Source source = Source.newBuilder().build();
-   *   Source response = securityCenterClient.createSource(parent, source);
-   * }
-   * }
- * - * @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 Source createSource(OrganizationName parent, Source source) { - CreateSourceRequest request = - CreateSourceRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setSource(source) - .build(); - return createSource(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a source. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
-   *   Source source = Source.newBuilder().build();
-   *   Source response = securityCenterClient.createSource(parent, source);
-   * }
-   * }
- * - * @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 Source createSource(String parent, Source source) { - CreateSourceRequest request = - CreateSourceRequest.newBuilder().setParent(parent).setSource(source).build(); - return createSource(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a source. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   CreateSourceRequest request =
-   *       CreateSourceRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setSource(Source.newBuilder().build())
-   *           .build();
-   *   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 Source createSource(CreateSourceRequest request) { - return createSourceCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a source. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   CreateSourceRequest request =
-   *       CreateSourceRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setSource(Source.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = securityCenterClient.createSourceCallable().futureCall(request);
-   *   // Do something.
-   *   Source response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createSourceCallable() { - return stub.createSourceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a finding. The corresponding source must exist for finding creation to succeed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
-   *   String findingId = "findingId439150212";
-   *   Finding finding = Finding.newBuilder().build();
-   *   Finding response = securityCenterClient.createFinding(parent, findingId, finding);
-   * }
-   * }
- * - * @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 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. - /** - * Creates a finding. The corresponding source must exist for finding creation to succeed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   String parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString();
-   *   String findingId = "findingId439150212";
-   *   Finding finding = Finding.newBuilder().build();
-   *   Finding response = securityCenterClient.createFinding(parent, findingId, finding);
-   * }
-   * }
- * - * @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 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. - /** - * Creates a finding. The corresponding source must exist for finding creation to succeed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   CreateFindingRequest request =
-   *       CreateFindingRequest.newBuilder()
-   *           .setParent(
-   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
-   *           .setFindingId("findingId439150212")
-   *           .setFinding(Finding.newBuilder().build())
-   *           .build();
-   *   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 Finding createFinding(CreateFindingRequest request) { - return createFindingCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a finding. The corresponding source must exist for finding creation to succeed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   CreateFindingRequest request =
-   *       CreateFindingRequest.newBuilder()
-   *           .setParent(
-   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
-   *           .setFindingId("findingId439150212")
-   *           .setFinding(Finding.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = securityCenterClient.createFindingCallable().futureCall(request);
-   *   // Do something.
-   *   Finding response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createFindingCallable() { - return stub.createFindingCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a mute config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   FolderName parent = FolderName.of("[FOLDER]");
-   *   MuteConfig muteConfig = MuteConfig.newBuilder().build();
-   *   MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig);
-   * }
-   * }
- * - * @param parent Required. Resource name of the new mute configs's parent. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". - * @param muteConfig Required. The mute config being created. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final MuteConfig createMuteConfig(FolderName parent, MuteConfig muteConfig) { - CreateMuteConfigRequest request = - CreateMuteConfigRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setMuteConfig(muteConfig) - .build(); - return createMuteConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a mute config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
-   *   MuteConfig muteConfig = MuteConfig.newBuilder().build();
-   *   MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig);
-   * }
-   * }
- * - * @param parent Required. Resource name of the new mute configs's parent. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". - * @param muteConfig Required. The mute config being created. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final MuteConfig createMuteConfig(OrganizationName parent, MuteConfig muteConfig) { - CreateMuteConfigRequest request = - CreateMuteConfigRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setMuteConfig(muteConfig) - .build(); - return createMuteConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a mute config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   MuteConfig muteConfig = MuteConfig.newBuilder().build();
-   *   MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig);
-   * }
-   * }
- * - * @param parent Required. Resource name of the new mute configs's parent. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". - * @param muteConfig Required. The mute config being created. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final MuteConfig createMuteConfig(ProjectName parent, MuteConfig muteConfig) { - CreateMuteConfigRequest request = - CreateMuteConfigRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setMuteConfig(muteConfig) - .build(); - return createMuteConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a mute config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
-   *   MuteConfig muteConfig = MuteConfig.newBuilder().build();
-   *   MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig);
-   * }
-   * }
- * - * @param parent Required. Resource name of the new mute configs's parent. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". - * @param muteConfig Required. The mute config being created. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final MuteConfig createMuteConfig(String parent, MuteConfig muteConfig) { - CreateMuteConfigRequest request = - CreateMuteConfigRequest.newBuilder().setParent(parent).setMuteConfig(muteConfig).build(); - return createMuteConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a mute config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   FolderName parent = FolderName.of("[FOLDER]");
-   *   MuteConfig muteConfig = MuteConfig.newBuilder().build();
-   *   String muteConfigId = "muteConfigId1689669942";
-   *   MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig, muteConfigId);
-   * }
-   * }
- * - * @param parent Required. Resource name of the new mute configs's parent. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". - * @param muteConfig Required. The mute config being created. - * @param muteConfigId Required. Unique identifier provided by the client within the parent scope. - * It must consist of lower case letters, numbers, and hyphen, with the first character a - * letter, the last a letter or a number, and a 63 character maximum. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final MuteConfig createMuteConfig( - FolderName parent, MuteConfig muteConfig, String muteConfigId) { - CreateMuteConfigRequest request = - CreateMuteConfigRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setMuteConfig(muteConfig) - .setMuteConfigId(muteConfigId) - .build(); - return createMuteConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a mute config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
-   *   MuteConfig muteConfig = MuteConfig.newBuilder().build();
-   *   String muteConfigId = "muteConfigId1689669942";
-   *   MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig, muteConfigId);
-   * }
-   * }
- * - * @param parent Required. Resource name of the new mute configs's parent. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". - * @param muteConfig Required. The mute config being created. - * @param muteConfigId Required. Unique identifier provided by the client within the parent scope. - * It must consist of lower case letters, numbers, and hyphen, with the first character a - * letter, the last a letter or a number, and a 63 character maximum. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final MuteConfig createMuteConfig( - OrganizationName parent, MuteConfig muteConfig, String muteConfigId) { - CreateMuteConfigRequest request = - CreateMuteConfigRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setMuteConfig(muteConfig) - .setMuteConfigId(muteConfigId) - .build(); - return createMuteConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a mute config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   MuteConfig muteConfig = MuteConfig.newBuilder().build();
-   *   String muteConfigId = "muteConfigId1689669942";
-   *   MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig, muteConfigId);
-   * }
-   * }
- * - * @param parent Required. Resource name of the new mute configs's parent. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". - * @param muteConfig Required. The mute config being created. - * @param muteConfigId Required. Unique identifier provided by the client within the parent scope. - * It must consist of lower case letters, numbers, and hyphen, with the first character a - * letter, the last a letter or a number, and a 63 character maximum. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final MuteConfig createMuteConfig( - ProjectName parent, MuteConfig muteConfig, String muteConfigId) { - CreateMuteConfigRequest request = - CreateMuteConfigRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setMuteConfig(muteConfig) - .setMuteConfigId(muteConfigId) - .build(); - return createMuteConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a mute config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
-   *   MuteConfig muteConfig = MuteConfig.newBuilder().build();
-   *   String muteConfigId = "muteConfigId1689669942";
-   *   MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig, muteConfigId);
-   * }
-   * }
- * - * @param parent Required. Resource name of the new mute configs's parent. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". - * @param muteConfig Required. The mute config being created. - * @param muteConfigId Required. Unique identifier provided by the client within the parent scope. - * It must consist of lower case letters, numbers, and hyphen, with the first character a - * letter, the last a letter or a number, and a 63 character maximum. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final MuteConfig createMuteConfig( - String parent, MuteConfig muteConfig, String muteConfigId) { - CreateMuteConfigRequest request = - CreateMuteConfigRequest.newBuilder() - .setParent(parent) - .setMuteConfig(muteConfig) - .setMuteConfigId(muteConfigId) - .build(); - return createMuteConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a mute config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   CreateMuteConfigRequest request =
-   *       CreateMuteConfigRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setMuteConfig(MuteConfig.newBuilder().build())
-   *           .setMuteConfigId("muteConfigId1689669942")
-   *           .build();
-   *   MuteConfig response = securityCenterClient.createMuteConfig(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 MuteConfig createMuteConfig(CreateMuteConfigRequest request) { - return createMuteConfigCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a mute config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   CreateMuteConfigRequest request =
-   *       CreateMuteConfigRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setMuteConfig(MuteConfig.newBuilder().build())
-   *           .setMuteConfigId("muteConfigId1689669942")
-   *           .build();
-   *   ApiFuture future =
-   *       securityCenterClient.createMuteConfigCallable().futureCall(request);
-   *   // Do something.
-   *   MuteConfig response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createMuteConfigCallable() { - return stub.createMuteConfigCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a notification config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
-   *   NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
-   *   NotificationConfig response =
-   *       securityCenterClient.createNotificationConfig(parent, notificationConfig);
-   * }
-   * }
- * - * @param parent Required. Resource name of the new notification config's parent. Its format is - * "organizations/[organization_id]". - * @param notificationConfig Required. The notification config being created. The name and the - * service account 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 NotificationConfig createNotificationConfig( - OrganizationName parent, NotificationConfig notificationConfig) { - CreateNotificationConfigRequest request = - CreateNotificationConfigRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setNotificationConfig(notificationConfig) - .build(); - return createNotificationConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a notification config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
-   *   NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
-   *   NotificationConfig response =
-   *       securityCenterClient.createNotificationConfig(parent, notificationConfig);
-   * }
-   * }
- * - * @param parent Required. Resource name of the new notification config's parent. Its format is - * "organizations/[organization_id]". - * @param notificationConfig Required. The notification config being created. The name and the - * service account 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 NotificationConfig createNotificationConfig( - String parent, NotificationConfig notificationConfig) { - CreateNotificationConfigRequest request = - CreateNotificationConfigRequest.newBuilder() - .setParent(parent) - .setNotificationConfig(notificationConfig) - .build(); - return createNotificationConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a notification config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
-   *   String configId = "configId-580140035";
-   *   NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
-   *   NotificationConfig response =
-   *       securityCenterClient.createNotificationConfig(parent, configId, notificationConfig);
-   * }
-   * }
- * - * @param parent Required. Resource name of the new notification config's parent. Its format is - * "organizations/[organization_id]". - * @param configId Required. Unique identifier provided by the client within the parent scope. It - * must be between 1 and 128 characters, and contains alphanumeric characters, underscores or - * hyphens only. - * @param notificationConfig Required. The notification config being created. The name and the - * service account 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 NotificationConfig createNotificationConfig( - OrganizationName parent, String configId, NotificationConfig notificationConfig) { - CreateNotificationConfigRequest request = - CreateNotificationConfigRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setConfigId(configId) - .setNotificationConfig(notificationConfig) - .build(); - return createNotificationConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a notification config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
-   *   String configId = "configId-580140035";
-   *   NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
-   *   NotificationConfig response =
-   *       securityCenterClient.createNotificationConfig(parent, configId, notificationConfig);
-   * }
-   * }
- * - * @param parent Required. Resource name of the new notification config's parent. Its format is - * "organizations/[organization_id]". - * @param configId Required. Unique identifier provided by the client within the parent scope. It - * must be between 1 and 128 characters, and contains alphanumeric characters, underscores or - * hyphens only. - * @param notificationConfig Required. The notification config being created. The name and the - * service account 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 NotificationConfig createNotificationConfig( - String parent, String configId, NotificationConfig notificationConfig) { - CreateNotificationConfigRequest request = - CreateNotificationConfigRequest.newBuilder() - .setParent(parent) - .setConfigId(configId) - .setNotificationConfig(notificationConfig) - .build(); - return createNotificationConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a notification config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   CreateNotificationConfigRequest request =
-   *       CreateNotificationConfigRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setConfigId("configId-580140035")
-   *           .setNotificationConfig(NotificationConfig.newBuilder().build())
-   *           .build();
-   *   NotificationConfig response = securityCenterClient.createNotificationConfig(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 NotificationConfig createNotificationConfig( - CreateNotificationConfigRequest request) { - return createNotificationConfigCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a notification config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   CreateNotificationConfigRequest request =
-   *       CreateNotificationConfigRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setConfigId("configId-580140035")
-   *           .setNotificationConfig(NotificationConfig.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       securityCenterClient.createNotificationConfigCallable().futureCall(request);
-   *   // Do something.
-   *   NotificationConfig response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - createNotificationConfigCallable() { - return stub.createNotificationConfigCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an existing mute config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   MuteConfigName name =
-   *       MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]");
-   *   securityCenterClient.deleteMuteConfig(name);
-   * }
-   * }
- * - * @param name Required. Name of the mute config to delete. Its format is - * organizations/{organization}/muteConfigs/{config_id}, - * folders/{folder}/muteConfigs/{config_id}, or projects/{project}/muteConfigs/{config_id} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteMuteConfig(MuteConfigName name) { - DeleteMuteConfigRequest request = - DeleteMuteConfigRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteMuteConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an existing mute config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   String name =
-   *       MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]").toString();
-   *   securityCenterClient.deleteMuteConfig(name);
-   * }
-   * }
- * - * @param name Required. Name of the mute config to delete. Its format is - * organizations/{organization}/muteConfigs/{config_id}, - * folders/{folder}/muteConfigs/{config_id}, or projects/{project}/muteConfigs/{config_id} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteMuteConfig(String name) { - DeleteMuteConfigRequest request = DeleteMuteConfigRequest.newBuilder().setName(name).build(); - deleteMuteConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an existing mute config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   DeleteMuteConfigRequest request =
-   *       DeleteMuteConfigRequest.newBuilder()
-   *           .setName(
-   *               MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]")
-   *                   .toString())
-   *           .build();
-   *   securityCenterClient.deleteMuteConfig(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 void deleteMuteConfig(DeleteMuteConfigRequest request) { - deleteMuteConfigCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an existing mute config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   DeleteMuteConfigRequest request =
-   *       DeleteMuteConfigRequest.newBuilder()
-   *           .setName(
-   *               MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future = securityCenterClient.deleteMuteConfigCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteMuteConfigCallable() { - return stub.deleteMuteConfigCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a notification config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   NotificationConfigName name =
-   *       NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]");
-   *   securityCenterClient.deleteNotificationConfig(name);
-   * }
-   * }
- * - * @param name Required. Name of the notification config to delete. Its format is - * "organizations/[organization_id]/notificationConfigs/[config_id]". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteNotificationConfig(NotificationConfigName name) { - DeleteNotificationConfigRequest request = - DeleteNotificationConfigRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - deleteNotificationConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a notification config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   String name = NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]").toString();
-   *   securityCenterClient.deleteNotificationConfig(name);
-   * }
-   * }
- * - * @param name Required. Name of the notification config to delete. Its format is - * "organizations/[organization_id]/notificationConfigs/[config_id]". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteNotificationConfig(String name) { - DeleteNotificationConfigRequest request = - DeleteNotificationConfigRequest.newBuilder().setName(name).build(); - deleteNotificationConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a notification config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   DeleteNotificationConfigRequest request =
-   *       DeleteNotificationConfigRequest.newBuilder()
-   *           .setName(
-   *               NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]").toString())
-   *           .build();
-   *   securityCenterClient.deleteNotificationConfig(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 void deleteNotificationConfig(DeleteNotificationConfigRequest request) { - deleteNotificationConfigCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a notification config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   DeleteNotificationConfigRequest request =
-   *       DeleteNotificationConfigRequest.newBuilder()
-   *           .setName(
-   *               NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       securityCenterClient.deleteNotificationConfigCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable - deleteNotificationConfigCallable() { - return stub.deleteNotificationConfigCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets a big query export. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   BigQueryExportName name =
-   *       BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]");
-   *   BigQueryExport response = securityCenterClient.getBigQueryExport(name);
-   * }
-   * }
- * - * @param name Required. Name of the big query export to retrieve. Its format is - * organizations/{organization}/bigQueryExports/{export_id}, - * folders/{folder}/bigQueryExports/{export_id}, or - * projects/{project}/bigQueryExports/{export_id} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BigQueryExport getBigQueryExport(BigQueryExportName name) { - GetBigQueryExportRequest request = - GetBigQueryExportRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getBigQueryExport(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets a big query export. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   String name =
-   *       BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]").toString();
-   *   BigQueryExport response = securityCenterClient.getBigQueryExport(name);
-   * }
-   * }
- * - * @param name Required. Name of the big query export to retrieve. Its format is - * organizations/{organization}/bigQueryExports/{export_id}, - * folders/{folder}/bigQueryExports/{export_id}, or - * projects/{project}/bigQueryExports/{export_id} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BigQueryExport getBigQueryExport(String name) { - GetBigQueryExportRequest request = GetBigQueryExportRequest.newBuilder().setName(name).build(); - return getBigQueryExport(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets a big query export. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   GetBigQueryExportRequest request =
-   *       GetBigQueryExportRequest.newBuilder()
-   *           .setName(
-   *               BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]")
-   *                   .toString())
-   *           .build();
-   *   BigQueryExport response = securityCenterClient.getBigQueryExport(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 BigQueryExport getBigQueryExport(GetBigQueryExportRequest request) { - return getBigQueryExportCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets a big query export. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   GetBigQueryExportRequest request =
-   *       GetBigQueryExportRequest.newBuilder()
-   *           .setName(
-   *               BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future =
-   *       securityCenterClient.getBigQueryExportCallable().futureCall(request);
-   *   // Do something.
-   *   BigQueryExport response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getBigQueryExportCallable() { - return stub.getBigQueryExportCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the access control policy on the specified Source. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
-   *   Policy response = securityCenterClient.getIamPolicy(resource);
-   * }
-   * }
- * - * @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 Policy getIamPolicy(ResourceName resource) { - GetIamPolicyRequest request = - GetIamPolicyRequest.newBuilder() - .setResource(resource == null ? null : resource.toString()) - .build(); - return getIamPolicy(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the access control policy on the specified Source. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   String resource = FolderName.of("[FOLDER]").toString();
-   *   Policy response = securityCenterClient.getIamPolicy(resource);
-   * }
-   * }
- * - * @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 Policy getIamPolicy(String resource) { - GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(resource).build(); - return getIamPolicy(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the access control policy on the specified Source. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   GetIamPolicyRequest request =
-   *       GetIamPolicyRequest.newBuilder()
-   *           .setResource(
-   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
-   *           .setOptions(GetPolicyOptions.newBuilder().build())
-   *           .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: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   GetIamPolicyRequest request =
-   *       GetIamPolicyRequest.newBuilder()
-   *           .setResource(
-   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
-   *           .setOptions(GetPolicyOptions.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = securityCenterClient.getIamPolicyCallable().futureCall(request);
-   *   // Do something.
-   *   Policy response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getIamPolicyCallable() { - return stub.getIamPolicyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets a mute config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   MuteConfigName name =
-   *       MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]");
-   *   MuteConfig response = securityCenterClient.getMuteConfig(name);
-   * }
-   * }
- * - * @param name Required. Name of the mute config to retrieve. Its format is - * organizations/{organization}/muteConfigs/{config_id}, - * folders/{folder}/muteConfigs/{config_id}, or projects/{project}/muteConfigs/{config_id} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final MuteConfig getMuteConfig(MuteConfigName name) { - GetMuteConfigRequest request = - GetMuteConfigRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getMuteConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets a mute config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   String name =
-   *       MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]").toString();
-   *   MuteConfig response = securityCenterClient.getMuteConfig(name);
-   * }
-   * }
- * - * @param name Required. Name of the mute config to retrieve. Its format is - * organizations/{organization}/muteConfigs/{config_id}, - * folders/{folder}/muteConfigs/{config_id}, or projects/{project}/muteConfigs/{config_id} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final MuteConfig getMuteConfig(String name) { - GetMuteConfigRequest request = GetMuteConfigRequest.newBuilder().setName(name).build(); - return getMuteConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets a mute config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   GetMuteConfigRequest request =
-   *       GetMuteConfigRequest.newBuilder()
-   *           .setName(
-   *               MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]")
-   *                   .toString())
-   *           .build();
-   *   MuteConfig response = securityCenterClient.getMuteConfig(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 MuteConfig getMuteConfig(GetMuteConfigRequest request) { - return getMuteConfigCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets a mute config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   GetMuteConfigRequest request =
-   *       GetMuteConfigRequest.newBuilder()
-   *           .setName(
-   *               MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future =
-   *       securityCenterClient.getMuteConfigCallable().futureCall(request);
-   *   // Do something.
-   *   MuteConfig response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getMuteConfigCallable() { - return stub.getMuteConfigCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets a notification config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   NotificationConfigName name =
-   *       NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]");
-   *   NotificationConfig response = securityCenterClient.getNotificationConfig(name);
-   * }
-   * }
- * - * @param name Required. Name of the notification config to get. Its format is - * "organizations/[organization_id]/notificationConfigs/[config_id]". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final NotificationConfig getNotificationConfig(NotificationConfigName name) { - GetNotificationConfigRequest request = - GetNotificationConfigRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getNotificationConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets a notification config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   String name = NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]").toString();
-   *   NotificationConfig response = securityCenterClient.getNotificationConfig(name);
-   * }
-   * }
- * - * @param name Required. Name of the notification config to get. Its format is - * "organizations/[organization_id]/notificationConfigs/[config_id]". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final NotificationConfig getNotificationConfig(String name) { - GetNotificationConfigRequest request = - GetNotificationConfigRequest.newBuilder().setName(name).build(); - return getNotificationConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets a notification config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   GetNotificationConfigRequest request =
-   *       GetNotificationConfigRequest.newBuilder()
-   *           .setName(
-   *               NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]").toString())
-   *           .build();
-   *   NotificationConfig response = securityCenterClient.getNotificationConfig(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 NotificationConfig getNotificationConfig(GetNotificationConfigRequest request) { - return getNotificationConfigCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets a notification config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   GetNotificationConfigRequest request =
-   *       GetNotificationConfigRequest.newBuilder()
-   *           .setName(
-   *               NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       securityCenterClient.getNotificationConfigCallable().futureCall(request);
-   *   // Do something.
-   *   NotificationConfig response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - getNotificationConfigCallable() { - return stub.getNotificationConfigCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the settings for an organization. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   OrganizationSettingsName name = OrganizationSettingsName.of("[ORGANIZATION]");
-   *   OrganizationSettings response = securityCenterClient.getOrganizationSettings(name);
-   * }
-   * }
- * - * @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 OrganizationSettings getOrganizationSettings(OrganizationSettingsName name) { - GetOrganizationSettingsRequest request = - GetOrganizationSettingsRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getOrganizationSettings(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the settings for an organization. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   String name = OrganizationSettingsName.of("[ORGANIZATION]").toString();
-   *   OrganizationSettings response = securityCenterClient.getOrganizationSettings(name);
-   * }
-   * }
- * - * @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 OrganizationSettings getOrganizationSettings(String name) { - GetOrganizationSettingsRequest request = - GetOrganizationSettingsRequest.newBuilder().setName(name).build(); - return getOrganizationSettings(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the settings for an organization. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   GetOrganizationSettingsRequest request =
-   *       GetOrganizationSettingsRequest.newBuilder()
-   *           .setName(OrganizationSettingsName.of("[ORGANIZATION]").toString())
-   *           .build();
-   *   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 OrganizationSettings getOrganizationSettings( - GetOrganizationSettingsRequest request) { - return getOrganizationSettingsCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the settings for an organization. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   GetOrganizationSettingsRequest request =
-   *       GetOrganizationSettingsRequest.newBuilder()
-   *           .setName(OrganizationSettingsName.of("[ORGANIZATION]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       securityCenterClient.getOrganizationSettingsCallable().futureCall(request);
-   *   // Do something.
-   *   OrganizationSettings response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - getOrganizationSettingsCallable() { - return stub.getOrganizationSettingsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets a source. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   SourceName name = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
-   *   Source response = securityCenterClient.getSource(name);
-   * }
-   * }
- * - * @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 Source getSource(SourceName name) { - GetSourceRequest request = - GetSourceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getSource(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets a source. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   String name = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString();
-   *   Source response = securityCenterClient.getSource(name);
-   * }
-   * }
- * - * @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 Source getSource(String name) { - GetSourceRequest request = GetSourceRequest.newBuilder().setName(name).build(); - return getSource(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets a source. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   GetSourceRequest request =
-   *       GetSourceRequest.newBuilder()
-   *           .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
-   *           .build();
-   *   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 Source getSource(GetSourceRequest request) { - return getSourceCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets a source. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   GetSourceRequest request =
-   *       GetSourceRequest.newBuilder()
-   *           .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
-   *           .build();
-   *   ApiFuture future = securityCenterClient.getSourceCallable().futureCall(request);
-   *   // Do something.
-   *   Source response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getSourceCallable() { - return stub.getSourceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Filters an organization's assets and groups them by their specified properties. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   GroupAssetsRequest request =
-   *       GroupAssetsRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setGroupBy("groupBy293428022")
-   *           .setCompareDuration(Duration.newBuilder().build())
-   *           .setReadTime(Timestamp.newBuilder().build())
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .build();
-   *   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 GroupAssetsPagedResponse groupAssets(GroupAssetsRequest request) { - return groupAssetsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Filters an organization's assets and groups them by their specified properties. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   GroupAssetsRequest request =
-   *       GroupAssetsRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setGroupBy("groupBy293428022")
-   *           .setCompareDuration(Duration.newBuilder().build())
-   *           .setReadTime(Timestamp.newBuilder().build())
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .build();
-   *   ApiFuture future =
-   *       securityCenterClient.groupAssetsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (GroupResult element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - groupAssetsPagedCallable() { - return stub.groupAssetsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Filters an organization's assets and groups them by their specified properties. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   GroupAssetsRequest request =
-   *       GroupAssetsRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setGroupBy("groupBy293428022")
-   *           .setCompareDuration(Duration.newBuilder().build())
-   *           .setReadTime(Timestamp.newBuilder().build())
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .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, - * /v1/folders/{folder_id}/sources/-/findings, /v1/projects/{project_id}/sources/-/findings - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
-   *   String groupBy = "groupBy293428022";
-   *   for (GroupResult element : securityCenterClient.groupFindings(parent, groupBy).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Name of the source to groupBy. Its format is - * "organizations/[organization_id]/sources/[source_id]", - * folders/[folder_id]/sources/[source_id], or projects/[project_id]/sources/[source_id]. To - * groupBy across all sources provide a source_id of `-`. For example: - * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, or - * projects/{project_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 - *
  • severity - *
- *

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); - } - - // 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, - * /v1/folders/{folder_id}/sources/-/findings, /v1/projects/{project_id}/sources/-/findings - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   String parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString();
-   *   String groupBy = "groupBy293428022";
-   *   for (GroupResult element : securityCenterClient.groupFindings(parent, groupBy).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Name of the source to groupBy. Its format is - * "organizations/[organization_id]/sources/[source_id]", - * folders/[folder_id]/sources/[source_id], or projects/[project_id]/sources/[source_id]. To - * groupBy across all sources provide a source_id of `-`. For example: - * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, or - * projects/{project_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 - *
  • severity - *
- *

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(String parent, String groupBy) { - GroupFindingsRequest request = - GroupFindingsRequest.newBuilder().setParent(parent).setGroupBy(groupBy).build(); - return groupFindings(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, - * /v1/folders/{folder_id}/sources/-/findings, /v1/projects/{project_id}/sources/-/findings - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   GroupFindingsRequest request =
-   *       GroupFindingsRequest.newBuilder()
-   *           .setParent(
-   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setGroupBy("groupBy293428022")
-   *           .setReadTime(Timestamp.newBuilder().build())
-   *           .setCompareDuration(Duration.newBuilder().build())
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .build();
-   *   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 GroupFindingsPagedResponse groupFindings(GroupFindingsRequest request) { - return groupFindingsPagedCallable().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, - * /v1/folders/{folder_id}/sources/-/findings, /v1/projects/{project_id}/sources/-/findings - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   GroupFindingsRequest request =
-   *       GroupFindingsRequest.newBuilder()
-   *           .setParent(
-   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setGroupBy("groupBy293428022")
-   *           .setReadTime(Timestamp.newBuilder().build())
-   *           .setCompareDuration(Duration.newBuilder().build())
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .build();
-   *   ApiFuture future =
-   *       securityCenterClient.groupFindingsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (GroupResult element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - groupFindingsPagedCallable() { - return stub.groupFindingsPagedCallable(); - } - - // 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, - * /v1/folders/{folder_id}/sources/-/findings, /v1/projects/{project_id}/sources/-/findings - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   GroupFindingsRequest request =
-   *       GroupFindingsRequest.newBuilder()
-   *           .setParent(
-   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setGroupBy("groupBy293428022")
-   *           .setReadTime(Timestamp.newBuilder().build())
-   *           .setCompareDuration(Duration.newBuilder().build())
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .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. - /** - * Lists an organization's assets. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ListAssetsRequest request =
-   *       ListAssetsRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setReadTime(Timestamp.newBuilder().build())
-   *           .setCompareDuration(Duration.newBuilder().build())
-   *           .setFieldMask(FieldMask.newBuilder().build())
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .build();
-   *   for (ListAssetsResponse.ListAssetsResult element :
-   *       securityCenterClient.listAssets(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 ListAssetsPagedResponse listAssets(ListAssetsRequest request) { - return listAssetsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists an organization's assets. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ListAssetsRequest request =
-   *       ListAssetsRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setReadTime(Timestamp.newBuilder().build())
-   *           .setCompareDuration(Duration.newBuilder().build())
-   *           .setFieldMask(FieldMask.newBuilder().build())
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .build();
-   *   ApiFuture future =
-   *       securityCenterClient.listAssetsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (ListAssetsResponse.ListAssetsResult element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listAssetsPagedCallable() { - return stub.listAssetsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists an organization's assets. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ListAssetsRequest request =
-   *       ListAssetsRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setReadTime(Timestamp.newBuilder().build())
-   *           .setCompareDuration(Duration.newBuilder().build())
-   *           .setFieldMask(FieldMask.newBuilder().build())
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .build();
-   *   while (true) {
-   *     ListAssetsResponse response = securityCenterClient.listAssetsCallable().call(request);
-   *     for (ListAssetsResponse.ListAssetsResult element : response.getListAssetsResultsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listAssetsCallable() { - return stub.listAssetsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists an organization or source's findings. - * - *

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

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ListFindingsRequest request =
-   *       ListFindingsRequest.newBuilder()
-   *           .setParent(
-   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setReadTime(Timestamp.newBuilder().build())
-   *           .setCompareDuration(Duration.newBuilder().build())
-   *           .setFieldMask(FieldMask.newBuilder().build())
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .build();
-   *   for (ListFindingsResponse.ListFindingsResult element :
-   *       securityCenterClient.listFindings(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 ListFindingsPagedResponse listFindings(ListFindingsRequest request) { - return listFindingsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists an organization or source's findings. - * - *

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

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ListFindingsRequest request =
-   *       ListFindingsRequest.newBuilder()
-   *           .setParent(
-   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setReadTime(Timestamp.newBuilder().build())
-   *           .setCompareDuration(Duration.newBuilder().build())
-   *           .setFieldMask(FieldMask.newBuilder().build())
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .build();
-   *   ApiFuture future =
-   *       securityCenterClient.listFindingsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (ListFindingsResponse.ListFindingsResult element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listFindingsPagedCallable() { - return stub.listFindingsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists an organization or source's findings. - * - *

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

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ListFindingsRequest request =
-   *       ListFindingsRequest.newBuilder()
-   *           .setParent(
-   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setReadTime(Timestamp.newBuilder().build())
-   *           .setCompareDuration(Duration.newBuilder().build())
-   *           .setFieldMask(FieldMask.newBuilder().build())
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .build();
-   *   while (true) {
-   *     ListFindingsResponse response = securityCenterClient.listFindingsCallable().call(request);
-   *     for (ListFindingsResponse.ListFindingsResult element :
-   *         response.getListFindingsResultsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listFindingsCallable() { - return stub.listFindingsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists mute configs. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   FolderName parent = FolderName.of("[FOLDER]");
-   *   for (MuteConfig element : securityCenterClient.listMuteConfigs(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent, which owns the collection of mute configs. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListMuteConfigsPagedResponse listMuteConfigs(FolderName parent) { - ListMuteConfigsRequest request = - ListMuteConfigsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listMuteConfigs(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists mute configs. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
-   *   for (MuteConfig element : securityCenterClient.listMuteConfigs(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent, which owns the collection of mute configs. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListMuteConfigsPagedResponse listMuteConfigs(OrganizationName parent) { - ListMuteConfigsRequest request = - ListMuteConfigsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listMuteConfigs(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists mute configs. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   for (MuteConfig element : securityCenterClient.listMuteConfigs(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent, which owns the collection of mute configs. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListMuteConfigsPagedResponse listMuteConfigs(ProjectName parent) { - ListMuteConfigsRequest request = - ListMuteConfigsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listMuteConfigs(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists mute configs. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
-   *   for (MuteConfig element : securityCenterClient.listMuteConfigs(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent, which owns the collection of mute configs. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListMuteConfigsPagedResponse listMuteConfigs(String parent) { - ListMuteConfigsRequest request = ListMuteConfigsRequest.newBuilder().setParent(parent).build(); - return listMuteConfigs(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists mute configs. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ListMuteConfigsRequest request =
-   *       ListMuteConfigsRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (MuteConfig element : securityCenterClient.listMuteConfigs(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 ListMuteConfigsPagedResponse listMuteConfigs(ListMuteConfigsRequest request) { - return listMuteConfigsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists mute configs. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ListMuteConfigsRequest request =
-   *       ListMuteConfigsRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       securityCenterClient.listMuteConfigsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (MuteConfig element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listMuteConfigsPagedCallable() { - return stub.listMuteConfigsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists mute configs. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ListMuteConfigsRequest request =
-   *       ListMuteConfigsRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListMuteConfigsResponse response =
-   *         securityCenterClient.listMuteConfigsCallable().call(request);
-   *     for (MuteConfig element : response.getMuteConfigsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listMuteConfigsCallable() { - return stub.listMuteConfigsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists notification configs. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
-   *   for (NotificationConfig element :
-   *       securityCenterClient.listNotificationConfigs(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Name of the organization to list notification configs. Its format is - * "organizations/[organization_id]". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListNotificationConfigsPagedResponse listNotificationConfigs( - OrganizationName parent) { - ListNotificationConfigsRequest request = - ListNotificationConfigsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listNotificationConfigs(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists notification configs. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
-   *   for (NotificationConfig element :
-   *       securityCenterClient.listNotificationConfigs(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Name of the organization to list notification configs. Its format is - * "organizations/[organization_id]". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListNotificationConfigsPagedResponse listNotificationConfigs(String parent) { - ListNotificationConfigsRequest request = - ListNotificationConfigsRequest.newBuilder().setParent(parent).build(); - return listNotificationConfigs(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists notification configs. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ListNotificationConfigsRequest request =
-   *       ListNotificationConfigsRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .build();
-   *   for (NotificationConfig element :
-   *       securityCenterClient.listNotificationConfigs(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 ListNotificationConfigsPagedResponse listNotificationConfigs( - ListNotificationConfigsRequest request) { - return listNotificationConfigsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists notification configs. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ListNotificationConfigsRequest request =
-   *       ListNotificationConfigsRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .build();
-   *   ApiFuture future =
-   *       securityCenterClient.listNotificationConfigsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (NotificationConfig element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listNotificationConfigsPagedCallable() { - return stub.listNotificationConfigsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists notification configs. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ListNotificationConfigsRequest request =
-   *       ListNotificationConfigsRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .build();
-   *   while (true) {
-   *     ListNotificationConfigsResponse response =
-   *         securityCenterClient.listNotificationConfigsCallable().call(request);
-   *     for (NotificationConfig element : response.getNotificationConfigsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listNotificationConfigsCallable() { - return stub.listNotificationConfigsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all sources belonging to an organization. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   FolderName parent = FolderName.of("[FOLDER]");
-   *   for (Source element : securityCenterClient.listSources(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Resource name of the parent of sources to list. Its format should be - * "organizations/[organization_id], folders/[folder_id], or projects/[project_id]". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListSourcesPagedResponse listSources(FolderName parent) { - ListSourcesRequest request = - ListSourcesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listSources(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all sources belonging to an organization. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
-   *   for (Source element : securityCenterClient.listSources(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Resource name of the parent of sources to list. Its format should be - * "organizations/[organization_id], folders/[folder_id], or projects/[project_id]". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListSourcesPagedResponse listSources(OrganizationName parent) { - ListSourcesRequest request = - ListSourcesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listSources(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all sources belonging to an organization. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   for (Source element : securityCenterClient.listSources(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Resource name of the parent of sources to list. Its format should be - * "organizations/[organization_id], folders/[folder_id], or projects/[project_id]". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListSourcesPagedResponse listSources(ProjectName parent) { - ListSourcesRequest request = - ListSourcesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listSources(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all sources belonging to an organization. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
-   *   for (Source element : securityCenterClient.listSources(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Resource name of the parent of sources to list. Its format should be - * "organizations/[organization_id], folders/[folder_id], or projects/[project_id]". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListSourcesPagedResponse listSources(String parent) { - ListSourcesRequest request = ListSourcesRequest.newBuilder().setParent(parent).build(); - return listSources(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all sources belonging to an organization. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ListSourcesRequest request =
-   *       ListSourcesRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .build();
-   *   for (Source element : securityCenterClient.listSources(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 ListSourcesPagedResponse listSources(ListSourcesRequest request) { - return listSourcesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all sources belonging to an organization. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ListSourcesRequest request =
-   *       ListSourcesRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .build();
-   *   ApiFuture future =
-   *       securityCenterClient.listSourcesPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Source element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listSourcesPagedCallable() { - return stub.listSourcesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all sources belonging to an organization. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ListSourcesRequest request =
-   *       ListSourcesRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .build();
-   *   while (true) {
-   *     ListSourcesResponse response = securityCenterClient.listSourcesCallable().call(request);
-   *     for (Source element : response.getSourcesList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listSourcesCallable() { - return stub.listSourcesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Runs asset discovery. The discovery is tracked with a long-running operation. - * - *

This API can only be called with limited frequency for an organization. If it is called too - * frequently the caller will receive a TOO_MANY_REQUESTS error. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
-   *   RunAssetDiscoveryResponse response =
-   *       securityCenterClient.runAssetDiscoveryAsync(parent).get();
-   * }
-   * }
- * - * @param parent Required. Name of the organization to run asset discovery for. Its format is - * "organizations/[organization_id]". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture runAssetDiscoveryAsync( - OrganizationName parent) { - RunAssetDiscoveryRequest request = - RunAssetDiscoveryRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return runAssetDiscoveryAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Runs asset discovery. The discovery is tracked with a long-running operation. - * - *

This API can only be called with limited frequency for an organization. If it is called too - * frequently the caller will receive a TOO_MANY_REQUESTS error. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
-   *   RunAssetDiscoveryResponse response =
-   *       securityCenterClient.runAssetDiscoveryAsync(parent).get();
-   * }
-   * }
- * - * @param parent Required. Name of the organization to run asset discovery for. Its format is - * "organizations/[organization_id]". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture runAssetDiscoveryAsync( - String parent) { - RunAssetDiscoveryRequest request = - RunAssetDiscoveryRequest.newBuilder().setParent(parent).build(); - return runAssetDiscoveryAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Runs asset discovery. The discovery is tracked with a long-running operation. - * - *

This API can only be called with limited frequency for an organization. If it is called too - * frequently the caller will receive a TOO_MANY_REQUESTS error. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   RunAssetDiscoveryRequest request =
-   *       RunAssetDiscoveryRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .build();
-   *   RunAssetDiscoveryResponse response =
-   *       securityCenterClient.runAssetDiscoveryAsync(request).get();
-   * }
-   * }
- * - * @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 OperationFuture runAssetDiscoveryAsync( - RunAssetDiscoveryRequest request) { - return runAssetDiscoveryOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Runs asset discovery. The discovery is tracked with a long-running operation. - * - *

This API can only be called with limited frequency for an organization. If it is called too - * frequently the caller will receive a TOO_MANY_REQUESTS error. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   RunAssetDiscoveryRequest request =
-   *       RunAssetDiscoveryRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .build();
-   *   OperationFuture future =
-   *       securityCenterClient.runAssetDiscoveryOperationCallable().futureCall(request);
-   *   // Do something.
-   *   RunAssetDiscoveryResponse response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - runAssetDiscoveryOperationCallable() { - return stub.runAssetDiscoveryOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Runs asset discovery. The discovery is tracked with a long-running operation. - * - *

This API can only be called with limited frequency for an organization. If it is called too - * frequently the caller will receive a TOO_MANY_REQUESTS error. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   RunAssetDiscoveryRequest request =
-   *       RunAssetDiscoveryRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       securityCenterClient.runAssetDiscoveryCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable runAssetDiscoveryCallable() { - return stub.runAssetDiscoveryCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the state of a finding. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   FindingName name =
-   *       FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]");
-   *   Finding.State state = Finding.State.forNumber(0);
-   *   Timestamp startTime = Timestamp.newBuilder().build();
-   *   Finding response = securityCenterClient.setFindingState(name, state, startTime);
-   * }
-   * }
- * - * @param name Required. The relative resource name of the finding. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: - * "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}". - * @param state Required. The desired State of the finding. - * @param startTime Required. The time at which the updated state takes effect. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Finding setFindingState(FindingName name, Finding.State state, Timestamp startTime) { - SetFindingStateRequest request = - SetFindingStateRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .setState(state) - .setStartTime(startTime) - .build(); - return setFindingState(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the state of a finding. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   String name =
-   *       FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]")
-   *           .toString();
-   *   Finding.State state = Finding.State.forNumber(0);
-   *   Timestamp startTime = Timestamp.newBuilder().build();
-   *   Finding response = securityCenterClient.setFindingState(name, state, startTime);
-   * }
-   * }
- * - * @param name Required. The relative resource name of the finding. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: - * "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}". - * @param state Required. The desired State of the finding. - * @param startTime Required. The time at which the updated state takes effect. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Finding setFindingState(String name, Finding.State state, Timestamp startTime) { - SetFindingStateRequest request = - SetFindingStateRequest.newBuilder() - .setName(name) - .setState(state) - .setStartTime(startTime) - .build(); - return setFindingState(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the state of a finding. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   SetFindingStateRequest request =
-   *       SetFindingStateRequest.newBuilder()
-   *           .setName(
-   *               FindingName.ofOrganizationSourceFindingName(
-   *                       "[ORGANIZATION]", "[SOURCE]", "[FINDING]")
-   *                   .toString())
-   *           .setStartTime(Timestamp.newBuilder().build())
-   *           .build();
-   *   Finding response = securityCenterClient.setFindingState(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 Finding setFindingState(SetFindingStateRequest request) { - return setFindingStateCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the state of a finding. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   SetFindingStateRequest request =
-   *       SetFindingStateRequest.newBuilder()
-   *           .setName(
-   *               FindingName.ofOrganizationSourceFindingName(
-   *                       "[ORGANIZATION]", "[SOURCE]", "[FINDING]")
-   *                   .toString())
-   *           .setStartTime(Timestamp.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       securityCenterClient.setFindingStateCallable().futureCall(request);
-   *   // Do something.
-   *   Finding response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable setFindingStateCallable() { - return stub.setFindingStateCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the mute state of a finding. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   FindingName name =
-   *       FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]");
-   *   Finding.Mute mute = Finding.Mute.forNumber(0);
-   *   Finding response = securityCenterClient.setMute(name, mute);
-   * }
-   * }
- * - * @param name Required. The relative resource name of the finding. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: - * "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}", - * "folders/{folder_id}/sources/{source_id}/finding/{finding_id}", - * "projects/{project_id}/sources/{source_id}/finding/{finding_id}". - * @param mute Required. The desired state of the Mute. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Finding setMute(FindingName name, Finding.Mute mute) { - SetMuteRequest request = - SetMuteRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .setMute(mute) - .build(); - return setMute(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the mute state of a finding. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   String name =
-   *       FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]")
-   *           .toString();
-   *   Finding.Mute mute = Finding.Mute.forNumber(0);
-   *   Finding response = securityCenterClient.setMute(name, mute);
-   * }
-   * }
- * - * @param name Required. The relative resource name of the finding. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: - * "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}", - * "folders/{folder_id}/sources/{source_id}/finding/{finding_id}", - * "projects/{project_id}/sources/{source_id}/finding/{finding_id}". - * @param mute Required. The desired state of the Mute. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Finding setMute(String name, Finding.Mute mute) { - SetMuteRequest request = SetMuteRequest.newBuilder().setName(name).setMute(mute).build(); - return setMute(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the mute state of a finding. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   SetMuteRequest request =
-   *       SetMuteRequest.newBuilder()
-   *           .setName(
-   *               FindingName.ofOrganizationSourceFindingName(
-   *                       "[ORGANIZATION]", "[SOURCE]", "[FINDING]")
-   *                   .toString())
-   *           .build();
-   *   Finding response = securityCenterClient.setMute(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 Finding setMute(SetMuteRequest request) { - return setMuteCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the mute state of a finding. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   SetMuteRequest request =
-   *       SetMuteRequest.newBuilder()
-   *           .setName(
-   *               FindingName.ofOrganizationSourceFindingName(
-   *                       "[ORGANIZATION]", "[SOURCE]", "[FINDING]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future = securityCenterClient.setMuteCallable().futureCall(request);
-   *   // Do something.
-   *   Finding response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable setMuteCallable() { - return stub.setMuteCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Sets the access control policy on the specified Source. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
-   *   Policy policy = Policy.newBuilder().build();
-   *   Policy response = securityCenterClient.setIamPolicy(resource, policy);
-   * }
-   * }
- * - * @param resource REQUIRED: The resource for which the policy is being specified. See the - * operation documentation for the appropriate value for this field. - * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the - * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud - * Platform services (such as Projects) might reject them. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Policy setIamPolicy(ResourceName resource, Policy policy) { - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder() - .setResource(resource == null ? null : resource.toString()) - .setPolicy(policy) - .build(); - return setIamPolicy(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Sets the access control policy on the specified Source. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   String resource = FolderName.of("[FOLDER]").toString();
-   *   Policy policy = Policy.newBuilder().build();
-   *   Policy response = securityCenterClient.setIamPolicy(resource, policy);
-   * }
-   * }
- * - * @param resource REQUIRED: The resource for which the policy is being specified. See the - * operation documentation for the appropriate value for this field. - * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the - * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud - * Platform services (such as Projects) might reject them. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Policy setIamPolicy(String resource, Policy policy) { - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder().setResource(resource).setPolicy(policy).build(); - return setIamPolicy(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Sets the access control policy on the specified Source. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   SetIamPolicyRequest request =
-   *       SetIamPolicyRequest.newBuilder()
-   *           .setResource(
-   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
-   *           .setPolicy(Policy.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   Policy response = securityCenterClient.setIamPolicy(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 setIamPolicy(SetIamPolicyRequest request) { - return setIamPolicyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Sets the access control policy on the specified Source. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   SetIamPolicyRequest request =
-   *       SetIamPolicyRequest.newBuilder()
-   *           .setResource(
-   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
-   *           .setPolicy(Policy.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = securityCenterClient.setIamPolicyCallable().futureCall(request);
-   *   // Do something.
-   *   Policy response = future.get();
-   * }
-   * }
- */ - 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: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
-   *   List 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: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   String resource = FolderName.of("[FOLDER]").toString();
-   *   List 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( - 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: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   TestIamPermissionsRequest request =
-   *       TestIamPermissionsRequest.newBuilder()
-   *           .setResource(
-   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
-   *           .addAllPermissions(new ArrayList())
-   *           .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: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   TestIamPermissionsRequest request =
-   *       TestIamPermissionsRequest.newBuilder()
-   *           .setResource(
-   *               SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
-   *           .addAllPermissions(new ArrayList())
-   *           .build();
-   *   ApiFuture future =
-   *       securityCenterClient.testIamPermissionsCallable().futureCall(request);
-   *   // Do something.
-   *   TestIamPermissionsResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - testIamPermissionsCallable() { - return stub.testIamPermissionsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates external system. This is for a given finding. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ExternalSystem externalSystem = ExternalSystem.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   ExternalSystem response =
-   *       securityCenterClient.updateExternalSystem(externalSystem, updateMask);
-   * }
-   * }
- * - * @param externalSystem Required. The external system resource to update. - * @param updateMask The FieldMask to use when updating the external system resource. - *

If empty all mutable fields will be updated. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ExternalSystem updateExternalSystem( - ExternalSystem externalSystem, FieldMask updateMask) { - UpdateExternalSystemRequest request = - UpdateExternalSystemRequest.newBuilder() - .setExternalSystem(externalSystem) - .setUpdateMask(updateMask) - .build(); - return updateExternalSystem(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates external system. This is for a given finding. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   UpdateExternalSystemRequest request =
-   *       UpdateExternalSystemRequest.newBuilder()
-   *           .setExternalSystem(ExternalSystem.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ExternalSystem response = securityCenterClient.updateExternalSystem(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 ExternalSystem updateExternalSystem(UpdateExternalSystemRequest request) { - return updateExternalSystemCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates external system. This is for a given finding. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   UpdateExternalSystemRequest request =
-   *       UpdateExternalSystemRequest.newBuilder()
-   *           .setExternalSystem(ExternalSystem.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       securityCenterClient.updateExternalSystemCallable().futureCall(request);
-   *   // Do something.
-   *   ExternalSystem response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - updateExternalSystemCallable() { - return stub.updateExternalSystemCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates or updates a finding. The corresponding source must exist for a finding creation to - * succeed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   Finding finding = Finding.newBuilder().build();
-   *   Finding response = securityCenterClient.updateFinding(finding);
-   * }
-   * }
- * - * @param finding Required. The finding resource to update or create if it does not already exist. - * parent, security_marks, and update_time will be ignored. - *

In the case of creation, the finding id portion of the name must be alphanumeric and - * less than or equal to 32 characters and greater than 0 characters in length. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Finding updateFinding(Finding finding) { - UpdateFindingRequest request = UpdateFindingRequest.newBuilder().setFinding(finding).build(); - return updateFinding(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates or updates a finding. The corresponding source must exist for a finding creation to - * succeed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   UpdateFindingRequest request =
-   *       UpdateFindingRequest.newBuilder()
-   *           .setFinding(Finding.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   Finding response = securityCenterClient.updateFinding(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 Finding updateFinding(UpdateFindingRequest request) { - return updateFindingCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates or updates a finding. The corresponding source must exist for a finding creation to - * succeed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   UpdateFindingRequest request =
-   *       UpdateFindingRequest.newBuilder()
-   *           .setFinding(Finding.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = securityCenterClient.updateFindingCallable().futureCall(request);
-   *   // Do something.
-   *   Finding response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateFindingCallable() { - return stub.updateFindingCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a mute config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   MuteConfig muteConfig = MuteConfig.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   MuteConfig response = securityCenterClient.updateMuteConfig(muteConfig, updateMask);
-   * }
-   * }
- * - * @param muteConfig Required. The mute config being updated. - * @param updateMask The list of fields to be updated. If empty all mutable fields will be - * updated. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final MuteConfig updateMuteConfig(MuteConfig muteConfig, FieldMask updateMask) { - UpdateMuteConfigRequest request = - UpdateMuteConfigRequest.newBuilder() - .setMuteConfig(muteConfig) - .setUpdateMask(updateMask) - .build(); - return updateMuteConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a mute config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   UpdateMuteConfigRequest request =
-   *       UpdateMuteConfigRequest.newBuilder()
-   *           .setMuteConfig(MuteConfig.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   MuteConfig response = securityCenterClient.updateMuteConfig(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 MuteConfig updateMuteConfig(UpdateMuteConfigRequest request) { - return updateMuteConfigCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a mute config. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   UpdateMuteConfigRequest request =
-   *       UpdateMuteConfigRequest.newBuilder()
-   *           .setMuteConfig(MuteConfig.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       securityCenterClient.updateMuteConfigCallable().futureCall(request);
-   *   // Do something.
-   *   MuteConfig response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateMuteConfigCallable() { - return stub.updateMuteConfigCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a notification config. The following update fields are allowed: description, - * pubsub_topic, streaming_config.filter - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
-   *   NotificationConfig response =
-   *       securityCenterClient.updateNotificationConfig(notificationConfig);
-   * }
-   * }
- * - * @param notificationConfig Required. The notification config to update. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final NotificationConfig updateNotificationConfig(NotificationConfig notificationConfig) { - UpdateNotificationConfigRequest request = - UpdateNotificationConfigRequest.newBuilder() - .setNotificationConfig(notificationConfig) - .build(); - return updateNotificationConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a notification config. The following update fields are allowed: description, - * pubsub_topic, streaming_config.filter - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   NotificationConfig response =
-   *       securityCenterClient.updateNotificationConfig(notificationConfig, updateMask);
-   * }
-   * }
- * - * @param notificationConfig Required. The notification config to update. - * @param updateMask The FieldMask to use when updating the notification config. - *

If empty all mutable fields will be updated. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final NotificationConfig updateNotificationConfig( - NotificationConfig notificationConfig, FieldMask updateMask) { - UpdateNotificationConfigRequest request = - UpdateNotificationConfigRequest.newBuilder() - .setNotificationConfig(notificationConfig) - .setUpdateMask(updateMask) - .build(); - return updateNotificationConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a notification config. The following update fields are allowed: description, - * pubsub_topic, streaming_config.filter - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   UpdateNotificationConfigRequest request =
-   *       UpdateNotificationConfigRequest.newBuilder()
-   *           .setNotificationConfig(NotificationConfig.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   NotificationConfig response = securityCenterClient.updateNotificationConfig(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 NotificationConfig updateNotificationConfig( - UpdateNotificationConfigRequest request) { - return updateNotificationConfigCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a notification config. The following update fields are allowed: description, - * pubsub_topic, streaming_config.filter - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   UpdateNotificationConfigRequest request =
-   *       UpdateNotificationConfigRequest.newBuilder()
-   *           .setNotificationConfig(NotificationConfig.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       securityCenterClient.updateNotificationConfigCallable().futureCall(request);
-   *   // Do something.
-   *   NotificationConfig response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - updateNotificationConfigCallable() { - return stub.updateNotificationConfigCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an organization's settings. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   OrganizationSettings organizationSettings = OrganizationSettings.newBuilder().build();
-   *   OrganizationSettings response =
-   *       securityCenterClient.updateOrganizationSettings(organizationSettings);
-   * }
-   * }
- * - * @param organizationSettings Required. The organization settings resource to update. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OrganizationSettings updateOrganizationSettings( - OrganizationSettings organizationSettings) { - UpdateOrganizationSettingsRequest request = - UpdateOrganizationSettingsRequest.newBuilder() - .setOrganizationSettings(organizationSettings) - .build(); - return updateOrganizationSettings(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an organization's settings. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   UpdateOrganizationSettingsRequest request =
-   *       UpdateOrganizationSettingsRequest.newBuilder()
-   *           .setOrganizationSettings(OrganizationSettings.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   OrganizationSettings response = securityCenterClient.updateOrganizationSettings(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 updateOrganizationSettings( - UpdateOrganizationSettingsRequest request) { - return updateOrganizationSettingsCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an organization's settings. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   UpdateOrganizationSettingsRequest request =
-   *       UpdateOrganizationSettingsRequest.newBuilder()
-   *           .setOrganizationSettings(OrganizationSettings.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       securityCenterClient.updateOrganizationSettingsCallable().futureCall(request);
-   *   // Do something.
-   *   OrganizationSettings response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - updateOrganizationSettingsCallable() { - return stub.updateOrganizationSettingsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a source. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   Source source = Source.newBuilder().build();
-   *   Source response = securityCenterClient.updateSource(source);
-   * }
-   * }
- * - * @param source Required. The source resource to update. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Source updateSource(Source source) { - UpdateSourceRequest request = UpdateSourceRequest.newBuilder().setSource(source).build(); - return updateSource(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a source. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   UpdateSourceRequest request =
-   *       UpdateSourceRequest.newBuilder()
-   *           .setSource(Source.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   Source response = securityCenterClient.updateSource(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 updateSource(UpdateSourceRequest request) { - return updateSourceCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a source. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   UpdateSourceRequest request =
-   *       UpdateSourceRequest.newBuilder()
-   *           .setSource(Source.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = securityCenterClient.updateSourceCallable().futureCall(request);
-   *   // Do something.
-   *   Source response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateSourceCallable() { - return stub.updateSourceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates security marks. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   SecurityMarks securityMarks = SecurityMarks.newBuilder().build();
-   *   SecurityMarks response = securityCenterClient.updateSecurityMarks(securityMarks);
-   * }
-   * }
- * - * @param securityMarks Required. The security marks resource to update. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final SecurityMarks updateSecurityMarks(SecurityMarks securityMarks) { - UpdateSecurityMarksRequest request = - UpdateSecurityMarksRequest.newBuilder().setSecurityMarks(securityMarks).build(); - return updateSecurityMarks(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates security marks. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   UpdateSecurityMarksRequest request =
-   *       UpdateSecurityMarksRequest.newBuilder()
-   *           .setSecurityMarks(SecurityMarks.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setStartTime(Timestamp.newBuilder().build())
-   *           .build();
-   *   SecurityMarks response = securityCenterClient.updateSecurityMarks(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 SecurityMarks updateSecurityMarks(UpdateSecurityMarksRequest request) { - return updateSecurityMarksCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates security marks. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   UpdateSecurityMarksRequest request =
-   *       UpdateSecurityMarksRequest.newBuilder()
-   *           .setSecurityMarks(SecurityMarks.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setStartTime(Timestamp.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       securityCenterClient.updateSecurityMarksCallable().futureCall(request);
-   *   // Do something.
-   *   SecurityMarks response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - updateSecurityMarksCallable() { - return stub.updateSecurityMarksCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a big query export. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   FolderName parent = FolderName.of("[FOLDER]");
-   *   BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build();
-   *   String bigQueryExportId = "bigQueryExportId1024198583";
-   *   BigQueryExport response =
-   *       securityCenterClient.createBigQueryExport(parent, bigQueryExport, bigQueryExportId);
-   * }
-   * }
- * - * @param parent Required. Resource name of the new big query export's parent. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". - * @param bigQueryExport Required. The big query export being created. - * @param bigQueryExportId Required. Unique identifier provided by the client within the parent - * scope. It must consist of lower case letters, numbers, and hyphen, with the first character - * a letter, the last a letter or a number, and a 63 character maximum. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BigQueryExport createBigQueryExport( - FolderName parent, BigQueryExport bigQueryExport, String bigQueryExportId) { - CreateBigQueryExportRequest request = - CreateBigQueryExportRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setBigQueryExport(bigQueryExport) - .setBigQueryExportId(bigQueryExportId) - .build(); - return createBigQueryExport(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a big query export. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
-   *   BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build();
-   *   String bigQueryExportId = "bigQueryExportId1024198583";
-   *   BigQueryExport response =
-   *       securityCenterClient.createBigQueryExport(parent, bigQueryExport, bigQueryExportId);
-   * }
-   * }
- * - * @param parent Required. Resource name of the new big query export's parent. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". - * @param bigQueryExport Required. The big query export being created. - * @param bigQueryExportId Required. Unique identifier provided by the client within the parent - * scope. It must consist of lower case letters, numbers, and hyphen, with the first character - * a letter, the last a letter or a number, and a 63 character maximum. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BigQueryExport createBigQueryExport( - OrganizationName parent, BigQueryExport bigQueryExport, String bigQueryExportId) { - CreateBigQueryExportRequest request = - CreateBigQueryExportRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setBigQueryExport(bigQueryExport) - .setBigQueryExportId(bigQueryExportId) - .build(); - return createBigQueryExport(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a big query export. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build();
-   *   String bigQueryExportId = "bigQueryExportId1024198583";
-   *   BigQueryExport response =
-   *       securityCenterClient.createBigQueryExport(parent, bigQueryExport, bigQueryExportId);
-   * }
-   * }
- * - * @param parent Required. Resource name of the new big query export's parent. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". - * @param bigQueryExport Required. The big query export being created. - * @param bigQueryExportId Required. Unique identifier provided by the client within the parent - * scope. It must consist of lower case letters, numbers, and hyphen, with the first character - * a letter, the last a letter or a number, and a 63 character maximum. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BigQueryExport createBigQueryExport( - ProjectName parent, BigQueryExport bigQueryExport, String bigQueryExportId) { - CreateBigQueryExportRequest request = - CreateBigQueryExportRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setBigQueryExport(bigQueryExport) - .setBigQueryExportId(bigQueryExportId) - .build(); - return createBigQueryExport(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a big query export. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
-   *   BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build();
-   *   String bigQueryExportId = "bigQueryExportId1024198583";
-   *   BigQueryExport response =
-   *       securityCenterClient.createBigQueryExport(parent, bigQueryExport, bigQueryExportId);
-   * }
-   * }
- * - * @param parent Required. Resource name of the new big query export's parent. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". - * @param bigQueryExport Required. The big query export being created. - * @param bigQueryExportId Required. Unique identifier provided by the client within the parent - * scope. It must consist of lower case letters, numbers, and hyphen, with the first character - * a letter, the last a letter or a number, and a 63 character maximum. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BigQueryExport createBigQueryExport( - String parent, BigQueryExport bigQueryExport, String bigQueryExportId) { - CreateBigQueryExportRequest request = - CreateBigQueryExportRequest.newBuilder() - .setParent(parent) - .setBigQueryExport(bigQueryExport) - .setBigQueryExportId(bigQueryExportId) - .build(); - return createBigQueryExport(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a big query export. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   CreateBigQueryExportRequest request =
-   *       CreateBigQueryExportRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setBigQueryExport(BigQueryExport.newBuilder().build())
-   *           .setBigQueryExportId("bigQueryExportId1024198583")
-   *           .build();
-   *   BigQueryExport response = securityCenterClient.createBigQueryExport(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 BigQueryExport createBigQueryExport(CreateBigQueryExportRequest request) { - return createBigQueryExportCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a big query export. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   CreateBigQueryExportRequest request =
-   *       CreateBigQueryExportRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setBigQueryExport(BigQueryExport.newBuilder().build())
-   *           .setBigQueryExportId("bigQueryExportId1024198583")
-   *           .build();
-   *   ApiFuture future =
-   *       securityCenterClient.createBigQueryExportCallable().futureCall(request);
-   *   // Do something.
-   *   BigQueryExport response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - createBigQueryExportCallable() { - return stub.createBigQueryExportCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an existing big query export. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   BigQueryExportName name =
-   *       BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]");
-   *   securityCenterClient.deleteBigQueryExport(name);
-   * }
-   * }
- * - * @param name Required. Name of the big query export to delete. Its format is - * organizations/{organization}/bigQueryExports/{export_id}, - * folders/{folder}/bigQueryExports/{export_id}, or - * projects/{project}/bigQueryExports/{export_id} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteBigQueryExport(BigQueryExportName name) { - DeleteBigQueryExportRequest request = - DeleteBigQueryExportRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - deleteBigQueryExport(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an existing big query export. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   String name =
-   *       BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]").toString();
-   *   securityCenterClient.deleteBigQueryExport(name);
-   * }
-   * }
- * - * @param name Required. Name of the big query export to delete. Its format is - * organizations/{organization}/bigQueryExports/{export_id}, - * folders/{folder}/bigQueryExports/{export_id}, or - * projects/{project}/bigQueryExports/{export_id} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteBigQueryExport(String name) { - DeleteBigQueryExportRequest request = - DeleteBigQueryExportRequest.newBuilder().setName(name).build(); - deleteBigQueryExport(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an existing big query export. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   DeleteBigQueryExportRequest request =
-   *       DeleteBigQueryExportRequest.newBuilder()
-   *           .setName(
-   *               BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]")
-   *                   .toString())
-   *           .build();
-   *   securityCenterClient.deleteBigQueryExport(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 void deleteBigQueryExport(DeleteBigQueryExportRequest request) { - deleteBigQueryExportCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an existing big query export. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   DeleteBigQueryExportRequest request =
-   *       DeleteBigQueryExportRequest.newBuilder()
-   *           .setName(
-   *               BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future =
-   *       securityCenterClient.deleteBigQueryExportCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteBigQueryExportCallable() { - return stub.deleteBigQueryExportCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a BigQuery export. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   BigQueryExport response =
-   *       securityCenterClient.updateBigQueryExport(bigQueryExport, updateMask);
-   * }
-   * }
- * - * @param bigQueryExport Required. The BigQuery export being updated. - * @param updateMask The list of fields to be updated. If empty all mutable fields will be - * updated. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BigQueryExport updateBigQueryExport( - BigQueryExport bigQueryExport, FieldMask updateMask) { - UpdateBigQueryExportRequest request = - UpdateBigQueryExportRequest.newBuilder() - .setBigQueryExport(bigQueryExport) - .setUpdateMask(updateMask) - .build(); - return updateBigQueryExport(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a BigQuery export. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   UpdateBigQueryExportRequest request =
-   *       UpdateBigQueryExportRequest.newBuilder()
-   *           .setBigQueryExport(BigQueryExport.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   BigQueryExport response = securityCenterClient.updateBigQueryExport(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 BigQueryExport updateBigQueryExport(UpdateBigQueryExportRequest request) { - return updateBigQueryExportCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a BigQuery export. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   UpdateBigQueryExportRequest request =
-   *       UpdateBigQueryExportRequest.newBuilder()
-   *           .setBigQueryExport(BigQueryExport.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       securityCenterClient.updateBigQueryExportCallable().futureCall(request);
-   *   // Do something.
-   *   BigQueryExport response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - updateBigQueryExportCallable() { - return stub.updateBigQueryExportCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports - * under that level are also returned e.g. if requesting BigQuery exports under a folder, then all - * BigQuery exports immediately under the folder plus the ones created under the projects within - * the folder are returned. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   FolderName parent = FolderName.of("[FOLDER]");
-   *   for (BigQueryExport element : securityCenterClient.listBigQueryExports(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent, which owns the collection of BigQuery exports. Its format - * is "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListBigQueryExportsPagedResponse listBigQueryExports(FolderName parent) { - ListBigQueryExportsRequest request = - ListBigQueryExportsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listBigQueryExports(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports - * under that level are also returned e.g. if requesting BigQuery exports under a folder, then all - * BigQuery exports immediately under the folder plus the ones created under the projects within - * the folder are returned. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
-   *   for (BigQueryExport element : securityCenterClient.listBigQueryExports(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent, which owns the collection of BigQuery exports. Its format - * is "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListBigQueryExportsPagedResponse listBigQueryExports(OrganizationName parent) { - ListBigQueryExportsRequest request = - ListBigQueryExportsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listBigQueryExports(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports - * under that level are also returned e.g. if requesting BigQuery exports under a folder, then all - * BigQuery exports immediately under the folder plus the ones created under the projects within - * the folder are returned. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   for (BigQueryExport element : securityCenterClient.listBigQueryExports(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent, which owns the collection of BigQuery exports. Its format - * is "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListBigQueryExportsPagedResponse listBigQueryExports(ProjectName parent) { - ListBigQueryExportsRequest request = - ListBigQueryExportsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listBigQueryExports(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports - * under that level are also returned e.g. if requesting BigQuery exports under a folder, then all - * BigQuery exports immediately under the folder plus the ones created under the projects within - * the folder are returned. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
-   *   for (BigQueryExport element : securityCenterClient.listBigQueryExports(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent, which owns the collection of BigQuery exports. Its format - * is "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListBigQueryExportsPagedResponse listBigQueryExports(String parent) { - ListBigQueryExportsRequest request = - ListBigQueryExportsRequest.newBuilder().setParent(parent).build(); - return listBigQueryExports(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports - * under that level are also returned e.g. if requesting BigQuery exports under a folder, then all - * BigQuery exports immediately under the folder plus the ones created under the projects within - * the folder are returned. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ListBigQueryExportsRequest request =
-   *       ListBigQueryExportsRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (BigQueryExport element :
-   *       securityCenterClient.listBigQueryExports(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 ListBigQueryExportsPagedResponse listBigQueryExports( - ListBigQueryExportsRequest request) { - return listBigQueryExportsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports - * under that level are also returned e.g. if requesting BigQuery exports under a folder, then all - * BigQuery exports immediately under the folder plus the ones created under the projects within - * the folder are returned. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ListBigQueryExportsRequest request =
-   *       ListBigQueryExportsRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       securityCenterClient.listBigQueryExportsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (BigQueryExport element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listBigQueryExportsPagedCallable() { - return stub.listBigQueryExportsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports - * under that level are also returned e.g. if requesting BigQuery exports under a folder, then all - * BigQuery exports immediately under the folder plus the ones created under the projects within - * the folder are returned. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ListBigQueryExportsRequest request =
-   *       ListBigQueryExportsRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListBigQueryExportsResponse response =
-   *         securityCenterClient.listBigQueryExportsCallable().call(request);
-   *     for (BigQueryExport element : response.getBigQueryExportsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listBigQueryExportsCallable() { - return stub.listBigQueryExportsCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); - } - - public static class GroupAssetsPagedResponse - extends AbstractPagedListResponse< - GroupAssetsRequest, GroupAssetsResponse, GroupResult, GroupAssetsPage, - GroupAssetsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - GroupAssetsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, input -> new GroupAssetsPagedResponse(input), MoreExecutors.directExecutor()); - } - - private GroupAssetsPagedResponse(GroupAssetsPage page) { - super(page, GroupAssetsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class GroupAssetsPage - extends AbstractPage { - - private GroupAssetsPage( - PageContext context, - GroupAssetsResponse response) { - super(context, response); - } - - private static GroupAssetsPage createEmptyPage() { - return new GroupAssetsPage(null, null); - } - - @Override - protected GroupAssetsPage createPage( - PageContext context, - GroupAssetsResponse response) { - return new GroupAssetsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class GroupAssetsFixedSizeCollection - extends AbstractFixedSizeCollection< - GroupAssetsRequest, GroupAssetsResponse, GroupResult, GroupAssetsPage, - GroupAssetsFixedSizeCollection> { - - private GroupAssetsFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static GroupAssetsFixedSizeCollection createEmptyCollection() { - return new GroupAssetsFixedSizeCollection(null, 0); - } - - @Override - protected GroupAssetsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new GroupAssetsFixedSizeCollection(pages, collectionSize); - } - } - - public static class GroupFindingsPagedResponse - extends AbstractPagedListResponse< - GroupFindingsRequest, GroupFindingsResponse, GroupResult, GroupFindingsPage, - GroupFindingsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - GroupFindingsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new GroupFindingsPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private GroupFindingsPagedResponse(GroupFindingsPage page) { - super(page, GroupFindingsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class GroupFindingsPage - extends AbstractPage< - GroupFindingsRequest, GroupFindingsResponse, GroupResult, GroupFindingsPage> { - - private GroupFindingsPage( - PageContext context, - GroupFindingsResponse response) { - super(context, response); - } - - private static GroupFindingsPage createEmptyPage() { - return new GroupFindingsPage(null, null); - } - - @Override - protected GroupFindingsPage createPage( - PageContext context, - GroupFindingsResponse response) { - return new GroupFindingsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class GroupFindingsFixedSizeCollection - extends AbstractFixedSizeCollection< - GroupFindingsRequest, GroupFindingsResponse, GroupResult, GroupFindingsPage, - GroupFindingsFixedSizeCollection> { - - private GroupFindingsFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static GroupFindingsFixedSizeCollection createEmptyCollection() { - return new GroupFindingsFixedSizeCollection(null, 0); - } - - @Override - protected GroupFindingsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new GroupFindingsFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListAssetsPagedResponse - extends AbstractPagedListResponse< - ListAssetsRequest, ListAssetsResponse, ListAssetsResponse.ListAssetsResult, - ListAssetsPage, ListAssetsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext - context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListAssetsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, input -> new ListAssetsPagedResponse(input), MoreExecutors.directExecutor()); - } - - private ListAssetsPagedResponse(ListAssetsPage page) { - super(page, ListAssetsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListAssetsPage - extends AbstractPage< - ListAssetsRequest, ListAssetsResponse, ListAssetsResponse.ListAssetsResult, - ListAssetsPage> { - - private ListAssetsPage( - PageContext - context, - ListAssetsResponse response) { - super(context, response); - } - - private static ListAssetsPage createEmptyPage() { - return new ListAssetsPage(null, null); - } - - @Override - protected ListAssetsPage createPage( - PageContext - context, - ListAssetsResponse response) { - return new ListAssetsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext - context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListAssetsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListAssetsRequest, ListAssetsResponse, ListAssetsResponse.ListAssetsResult, - ListAssetsPage, ListAssetsFixedSizeCollection> { - - private ListAssetsFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListAssetsFixedSizeCollection createEmptyCollection() { - return new ListAssetsFixedSizeCollection(null, 0); - } - - @Override - protected ListAssetsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListAssetsFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListFindingsPagedResponse - extends AbstractPagedListResponse< - ListFindingsRequest, ListFindingsResponse, ListFindingsResponse.ListFindingsResult, - ListFindingsPage, ListFindingsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext< - ListFindingsRequest, ListFindingsResponse, ListFindingsResponse.ListFindingsResult> - context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListFindingsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListFindingsPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListFindingsPagedResponse(ListFindingsPage page) { - super(page, ListFindingsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListFindingsPage - extends AbstractPage< - ListFindingsRequest, ListFindingsResponse, ListFindingsResponse.ListFindingsResult, - ListFindingsPage> { - - private ListFindingsPage( - PageContext< - ListFindingsRequest, ListFindingsResponse, ListFindingsResponse.ListFindingsResult> - context, - ListFindingsResponse response) { - super(context, response); - } - - private static ListFindingsPage createEmptyPage() { - return new ListFindingsPage(null, null); - } - - @Override - protected ListFindingsPage createPage( - PageContext< - ListFindingsRequest, ListFindingsResponse, ListFindingsResponse.ListFindingsResult> - context, - ListFindingsResponse response) { - return new ListFindingsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext< - ListFindingsRequest, ListFindingsResponse, ListFindingsResponse.ListFindingsResult> - context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListFindingsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListFindingsRequest, ListFindingsResponse, ListFindingsResponse.ListFindingsResult, - ListFindingsPage, ListFindingsFixedSizeCollection> { - - private ListFindingsFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListFindingsFixedSizeCollection createEmptyCollection() { - return new ListFindingsFixedSizeCollection(null, 0); - } - - @Override - protected ListFindingsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListFindingsFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListMuteConfigsPagedResponse - extends AbstractPagedListResponse< - ListMuteConfigsRequest, ListMuteConfigsResponse, MuteConfig, ListMuteConfigsPage, - ListMuteConfigsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListMuteConfigsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListMuteConfigsPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListMuteConfigsPagedResponse(ListMuteConfigsPage page) { - super(page, ListMuteConfigsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListMuteConfigsPage - extends AbstractPage< - ListMuteConfigsRequest, ListMuteConfigsResponse, MuteConfig, ListMuteConfigsPage> { - - private ListMuteConfigsPage( - PageContext context, - ListMuteConfigsResponse response) { - super(context, response); - } - - private static ListMuteConfigsPage createEmptyPage() { - return new ListMuteConfigsPage(null, null); - } - - @Override - protected ListMuteConfigsPage createPage( - PageContext context, - ListMuteConfigsResponse response) { - return new ListMuteConfigsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListMuteConfigsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListMuteConfigsRequest, ListMuteConfigsResponse, MuteConfig, ListMuteConfigsPage, - ListMuteConfigsFixedSizeCollection> { - - private ListMuteConfigsFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListMuteConfigsFixedSizeCollection createEmptyCollection() { - return new ListMuteConfigsFixedSizeCollection(null, 0); - } - - @Override - protected ListMuteConfigsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListMuteConfigsFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListNotificationConfigsPagedResponse - extends AbstractPagedListResponse< - ListNotificationConfigsRequest, ListNotificationConfigsResponse, NotificationConfig, - ListNotificationConfigsPage, ListNotificationConfigsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext< - ListNotificationConfigsRequest, ListNotificationConfigsResponse, NotificationConfig> - context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListNotificationConfigsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListNotificationConfigsPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListNotificationConfigsPagedResponse(ListNotificationConfigsPage page) { - super(page, ListNotificationConfigsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListNotificationConfigsPage - extends AbstractPage< - ListNotificationConfigsRequest, ListNotificationConfigsResponse, NotificationConfig, - ListNotificationConfigsPage> { - - private ListNotificationConfigsPage( - PageContext< - ListNotificationConfigsRequest, ListNotificationConfigsResponse, NotificationConfig> - context, - ListNotificationConfigsResponse response) { - super(context, response); - } - - private static ListNotificationConfigsPage createEmptyPage() { - return new ListNotificationConfigsPage(null, null); - } - - @Override - protected ListNotificationConfigsPage createPage( - PageContext< - ListNotificationConfigsRequest, ListNotificationConfigsResponse, NotificationConfig> - context, - ListNotificationConfigsResponse response) { - return new ListNotificationConfigsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext< - ListNotificationConfigsRequest, ListNotificationConfigsResponse, NotificationConfig> - context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListNotificationConfigsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListNotificationConfigsRequest, ListNotificationConfigsResponse, NotificationConfig, - ListNotificationConfigsPage, ListNotificationConfigsFixedSizeCollection> { - - private ListNotificationConfigsFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListNotificationConfigsFixedSizeCollection createEmptyCollection() { - return new ListNotificationConfigsFixedSizeCollection(null, 0); - } - - @Override - protected ListNotificationConfigsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListNotificationConfigsFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListSourcesPagedResponse - extends AbstractPagedListResponse< - ListSourcesRequest, ListSourcesResponse, Source, ListSourcesPage, - ListSourcesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListSourcesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, input -> new ListSourcesPagedResponse(input), MoreExecutors.directExecutor()); - } - - private ListSourcesPagedResponse(ListSourcesPage page) { - super(page, ListSourcesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListSourcesPage - extends AbstractPage { - - private ListSourcesPage( - PageContext context, - ListSourcesResponse response) { - super(context, response); - } - - private static ListSourcesPage createEmptyPage() { - return new ListSourcesPage(null, null); - } - - @Override - protected ListSourcesPage createPage( - PageContext context, - ListSourcesResponse response) { - return new ListSourcesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListSourcesFixedSizeCollection - extends AbstractFixedSizeCollection< - ListSourcesRequest, ListSourcesResponse, Source, ListSourcesPage, - ListSourcesFixedSizeCollection> { - - private ListSourcesFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListSourcesFixedSizeCollection createEmptyCollection() { - return new ListSourcesFixedSizeCollection(null, 0); - } - - @Override - protected ListSourcesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListSourcesFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListBigQueryExportsPagedResponse - extends AbstractPagedListResponse< - ListBigQueryExportsRequest, ListBigQueryExportsResponse, BigQueryExport, - ListBigQueryExportsPage, ListBigQueryExportsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext - context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListBigQueryExportsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListBigQueryExportsPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListBigQueryExportsPagedResponse(ListBigQueryExportsPage page) { - super(page, ListBigQueryExportsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListBigQueryExportsPage - extends AbstractPage< - ListBigQueryExportsRequest, ListBigQueryExportsResponse, BigQueryExport, - ListBigQueryExportsPage> { - - private ListBigQueryExportsPage( - PageContext - context, - ListBigQueryExportsResponse response) { - super(context, response); - } - - private static ListBigQueryExportsPage createEmptyPage() { - return new ListBigQueryExportsPage(null, null); - } - - @Override - protected ListBigQueryExportsPage createPage( - PageContext - context, - ListBigQueryExportsResponse response) { - return new ListBigQueryExportsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext - context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListBigQueryExportsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListBigQueryExportsRequest, ListBigQueryExportsResponse, BigQueryExport, - ListBigQueryExportsPage, ListBigQueryExportsFixedSizeCollection> { - - private ListBigQueryExportsFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListBigQueryExportsFixedSizeCollection createEmptyCollection() { - return new ListBigQueryExportsFixedSizeCollection(null, 0); - } - - @Override - protected ListBigQueryExportsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListBigQueryExportsFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterSettings.java b/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterSettings.java deleted file mode 100644 index 3a52e77408b3..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterSettings.java +++ /dev/null @@ -1,653 +0,0 @@ -/* - * Copyright 2022 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 static com.google.cloud.securitycenter.v1.SecurityCenterClient.GroupAssetsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.GroupFindingsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListAssetsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListBigQueryExportsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListFindingsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListMuteConfigsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListNotificationConfigsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListSourcesPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.securitycenter.v1.stub.SecurityCenterStubSettings; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link SecurityCenterClient}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (securitycenter.googleapis.com) and default port (443) are - * used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

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: - * - *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * SecurityCenterSettings.Builder securityCenterSettingsBuilder =
- *     SecurityCenterSettings.newBuilder();
- * securityCenterSettingsBuilder
- *     .createSourceSettings()
- *     .setRetrySettings(
- *         securityCenterSettingsBuilder
- *             .createSourceSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * SecurityCenterSettings securityCenterSettings = securityCenterSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class SecurityCenterSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to bulkMuteFindings. */ - public UnaryCallSettings bulkMuteFindingsSettings() { - return ((SecurityCenterStubSettings) getStubSettings()).bulkMuteFindingsSettings(); - } - - /** Returns the object with the settings used for calls to bulkMuteFindings. */ - public OperationCallSettings - bulkMuteFindingsOperationSettings() { - return ((SecurityCenterStubSettings) getStubSettings()).bulkMuteFindingsOperationSettings(); - } - - /** Returns the object with the settings used for calls to createSource. */ - public UnaryCallSettings createSourceSettings() { - return ((SecurityCenterStubSettings) getStubSettings()).createSourceSettings(); - } - - /** Returns the object with the settings used for calls to createFinding. */ - public UnaryCallSettings createFindingSettings() { - return ((SecurityCenterStubSettings) getStubSettings()).createFindingSettings(); - } - - /** Returns the object with the settings used for calls to createMuteConfig. */ - public UnaryCallSettings createMuteConfigSettings() { - return ((SecurityCenterStubSettings) getStubSettings()).createMuteConfigSettings(); - } - - /** Returns the object with the settings used for calls to createNotificationConfig. */ - public UnaryCallSettings - createNotificationConfigSettings() { - return ((SecurityCenterStubSettings) getStubSettings()).createNotificationConfigSettings(); - } - - /** Returns the object with the settings used for calls to deleteMuteConfig. */ - public UnaryCallSettings deleteMuteConfigSettings() { - return ((SecurityCenterStubSettings) getStubSettings()).deleteMuteConfigSettings(); - } - - /** Returns the object with the settings used for calls to deleteNotificationConfig. */ - public UnaryCallSettings - deleteNotificationConfigSettings() { - return ((SecurityCenterStubSettings) getStubSettings()).deleteNotificationConfigSettings(); - } - - /** Returns the object with the settings used for calls to getBigQueryExport. */ - public UnaryCallSettings getBigQueryExportSettings() { - return ((SecurityCenterStubSettings) getStubSettings()).getBigQueryExportSettings(); - } - - /** 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 getMuteConfig. */ - public UnaryCallSettings getMuteConfigSettings() { - return ((SecurityCenterStubSettings) getStubSettings()).getMuteConfigSettings(); - } - - /** Returns the object with the settings used for calls to getNotificationConfig. */ - public UnaryCallSettings - getNotificationConfigSettings() { - return ((SecurityCenterStubSettings) getStubSettings()).getNotificationConfigSettings(); - } - - /** Returns the object with the settings used for calls to getOrganizationSettings. */ - public UnaryCallSettings - getOrganizationSettingsSettings() { - return ((SecurityCenterStubSettings) getStubSettings()).getOrganizationSettingsSettings(); - } - - /** Returns the object with the settings used for calls to getSource. */ - 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() { - return ((SecurityCenterStubSettings) getStubSettings()).listAssetsSettings(); - } - - /** Returns the object with the settings used for calls to listFindings. */ - public PagedCallSettings - listFindingsSettings() { - return ((SecurityCenterStubSettings) getStubSettings()).listFindingsSettings(); - } - - /** Returns the object with the settings used for calls to listMuteConfigs. */ - public PagedCallSettings< - ListMuteConfigsRequest, ListMuteConfigsResponse, ListMuteConfigsPagedResponse> - listMuteConfigsSettings() { - return ((SecurityCenterStubSettings) getStubSettings()).listMuteConfigsSettings(); - } - - /** Returns the object with the settings used for calls to listNotificationConfigs. */ - public PagedCallSettings< - ListNotificationConfigsRequest, ListNotificationConfigsResponse, - ListNotificationConfigsPagedResponse> - listNotificationConfigsSettings() { - return ((SecurityCenterStubSettings) getStubSettings()).listNotificationConfigsSettings(); - } - - /** Returns the object with the settings used for calls to listSources. */ - public PagedCallSettings - listSourcesSettings() { - return ((SecurityCenterStubSettings) getStubSettings()).listSourcesSettings(); - } - - /** Returns the object with the settings used for calls to runAssetDiscovery. */ - public UnaryCallSettings runAssetDiscoverySettings() { - return ((SecurityCenterStubSettings) getStubSettings()).runAssetDiscoverySettings(); - } - - /** Returns the object with the settings used for calls to runAssetDiscovery. */ - public OperationCallSettings - runAssetDiscoveryOperationSettings() { - return ((SecurityCenterStubSettings) getStubSettings()).runAssetDiscoveryOperationSettings(); - } - - /** Returns the object with the settings used for calls to setFindingState. */ - public UnaryCallSettings setFindingStateSettings() { - return ((SecurityCenterStubSettings) getStubSettings()).setFindingStateSettings(); - } - - /** Returns the object with the settings used for calls to setMute. */ - public UnaryCallSettings setMuteSettings() { - return ((SecurityCenterStubSettings) getStubSettings()).setMuteSettings(); - } - - /** Returns the object with the settings used for calls to setIamPolicy. */ - 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 updateExternalSystem. */ - public UnaryCallSettings - updateExternalSystemSettings() { - return ((SecurityCenterStubSettings) getStubSettings()).updateExternalSystemSettings(); - } - - /** Returns the object with the settings used for calls to updateFinding. */ - public UnaryCallSettings updateFindingSettings() { - return ((SecurityCenterStubSettings) getStubSettings()).updateFindingSettings(); - } - - /** Returns the object with the settings used for calls to updateMuteConfig. */ - public UnaryCallSettings updateMuteConfigSettings() { - return ((SecurityCenterStubSettings) getStubSettings()).updateMuteConfigSettings(); - } - - /** Returns the object with the settings used for calls to updateNotificationConfig. */ - public UnaryCallSettings - updateNotificationConfigSettings() { - return ((SecurityCenterStubSettings) getStubSettings()).updateNotificationConfigSettings(); - } - - /** Returns the object with the settings used for calls to updateOrganizationSettings. */ - public UnaryCallSettings - updateOrganizationSettingsSettings() { - return ((SecurityCenterStubSettings) getStubSettings()).updateOrganizationSettingsSettings(); - } - - /** Returns the object with the settings used for calls to updateSource. */ - public UnaryCallSettings updateSourceSettings() { - return ((SecurityCenterStubSettings) getStubSettings()).updateSourceSettings(); - } - - /** Returns the object with the settings used for calls to updateSecurityMarks. */ - public UnaryCallSettings - updateSecurityMarksSettings() { - return ((SecurityCenterStubSettings) getStubSettings()).updateSecurityMarksSettings(); - } - - /** Returns the object with the settings used for calls to createBigQueryExport. */ - public UnaryCallSettings - createBigQueryExportSettings() { - return ((SecurityCenterStubSettings) getStubSettings()).createBigQueryExportSettings(); - } - - /** Returns the object with the settings used for calls to deleteBigQueryExport. */ - public UnaryCallSettings deleteBigQueryExportSettings() { - return ((SecurityCenterStubSettings) getStubSettings()).deleteBigQueryExportSettings(); - } - - /** Returns the object with the settings used for calls to updateBigQueryExport. */ - public UnaryCallSettings - updateBigQueryExportSettings() { - return ((SecurityCenterStubSettings) getStubSettings()).updateBigQueryExportSettings(); - } - - /** Returns the object with the settings used for calls to listBigQueryExports. */ - public PagedCallSettings< - ListBigQueryExportsRequest, ListBigQueryExportsResponse, ListBigQueryExportsPagedResponse> - listBigQueryExportsSettings() { - return ((SecurityCenterStubSettings) getStubSettings()).listBigQueryExportsSettings(); - } - - public static final SecurityCenterSettings create(SecurityCenterStubSettings stub) - throws IOException { - return new SecurityCenterSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return SecurityCenterStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return SecurityCenterStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return SecurityCenterStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return SecurityCenterStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return SecurityCenterStubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return SecurityCenterStubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return SecurityCenterStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return SecurityCenterStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - @BetaApi - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected SecurityCenterSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for SecurityCenterSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(SecurityCenterStubSettings.newBuilder(clientContext)); - } - - protected Builder(SecurityCenterSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(SecurityCenterStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(SecurityCenterStubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(SecurityCenterStubSettings.newHttpJsonBuilder()); - } - - public SecurityCenterStubSettings.Builder getStubSettingsBuilder() { - return ((SecurityCenterStubSettings.Builder) getStubSettings()); - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to bulkMuteFindings. */ - public UnaryCallSettings.Builder - bulkMuteFindingsSettings() { - return getStubSettingsBuilder().bulkMuteFindingsSettings(); - } - - /** Returns the builder for the settings used for calls to bulkMuteFindings. */ - public OperationCallSettings.Builder - bulkMuteFindingsOperationSettings() { - return getStubSettingsBuilder().bulkMuteFindingsOperationSettings(); - } - - /** Returns the builder for the settings used for calls to createSource. */ - public UnaryCallSettings.Builder createSourceSettings() { - return getStubSettingsBuilder().createSourceSettings(); - } - - /** Returns the builder for the settings used for calls to createFinding. */ - public UnaryCallSettings.Builder createFindingSettings() { - return getStubSettingsBuilder().createFindingSettings(); - } - - /** Returns the builder for the settings used for calls to createMuteConfig. */ - public UnaryCallSettings.Builder - createMuteConfigSettings() { - return getStubSettingsBuilder().createMuteConfigSettings(); - } - - /** Returns the builder for the settings used for calls to createNotificationConfig. */ - public UnaryCallSettings.Builder - createNotificationConfigSettings() { - return getStubSettingsBuilder().createNotificationConfigSettings(); - } - - /** Returns the builder for the settings used for calls to deleteMuteConfig. */ - public UnaryCallSettings.Builder deleteMuteConfigSettings() { - return getStubSettingsBuilder().deleteMuteConfigSettings(); - } - - /** Returns the builder for the settings used for calls to deleteNotificationConfig. */ - public UnaryCallSettings.Builder - deleteNotificationConfigSettings() { - return getStubSettingsBuilder().deleteNotificationConfigSettings(); - } - - /** Returns the builder for the settings used for calls to getBigQueryExport. */ - public UnaryCallSettings.Builder - getBigQueryExportSettings() { - return getStubSettingsBuilder().getBigQueryExportSettings(); - } - - /** 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 getMuteConfig. */ - public UnaryCallSettings.Builder getMuteConfigSettings() { - return getStubSettingsBuilder().getMuteConfigSettings(); - } - - /** Returns the builder for the settings used for calls to getNotificationConfig. */ - public UnaryCallSettings.Builder - getNotificationConfigSettings() { - return getStubSettingsBuilder().getNotificationConfigSettings(); - } - - /** Returns the builder for the settings used for calls to getOrganizationSettings. */ - public UnaryCallSettings.Builder - getOrganizationSettingsSettings() { - return getStubSettingsBuilder().getOrganizationSettingsSettings(); - } - - /** Returns the builder for the settings used for calls to getSource. */ - 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() { - return getStubSettingsBuilder().listAssetsSettings(); - } - - /** Returns the builder for the settings used for calls to listFindings. */ - public PagedCallSettings.Builder< - ListFindingsRequest, ListFindingsResponse, ListFindingsPagedResponse> - listFindingsSettings() { - return getStubSettingsBuilder().listFindingsSettings(); - } - - /** Returns the builder for the settings used for calls to listMuteConfigs. */ - public PagedCallSettings.Builder< - ListMuteConfigsRequest, ListMuteConfigsResponse, ListMuteConfigsPagedResponse> - listMuteConfigsSettings() { - return getStubSettingsBuilder().listMuteConfigsSettings(); - } - - /** Returns the builder for the settings used for calls to listNotificationConfigs. */ - public PagedCallSettings.Builder< - ListNotificationConfigsRequest, ListNotificationConfigsResponse, - ListNotificationConfigsPagedResponse> - listNotificationConfigsSettings() { - return getStubSettingsBuilder().listNotificationConfigsSettings(); - } - - /** Returns the builder for the settings used for calls to listSources. */ - public PagedCallSettings.Builder< - ListSourcesRequest, ListSourcesResponse, ListSourcesPagedResponse> - listSourcesSettings() { - return getStubSettingsBuilder().listSourcesSettings(); - } - - /** Returns the builder for the settings used for calls to runAssetDiscovery. */ - public UnaryCallSettings.Builder - runAssetDiscoverySettings() { - return getStubSettingsBuilder().runAssetDiscoverySettings(); - } - - /** Returns the builder for the settings used for calls to runAssetDiscovery. */ - public OperationCallSettings.Builder - runAssetDiscoveryOperationSettings() { - return getStubSettingsBuilder().runAssetDiscoveryOperationSettings(); - } - - /** Returns the builder for the settings used for calls to setFindingState. */ - public UnaryCallSettings.Builder setFindingStateSettings() { - return getStubSettingsBuilder().setFindingStateSettings(); - } - - /** Returns the builder for the settings used for calls to setMute. */ - public UnaryCallSettings.Builder setMuteSettings() { - return getStubSettingsBuilder().setMuteSettings(); - } - - /** Returns the builder for the settings used for calls to setIamPolicy. */ - public UnaryCallSettings.Builder setIamPolicySettings() { - 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 updateExternalSystem. */ - public UnaryCallSettings.Builder - updateExternalSystemSettings() { - return getStubSettingsBuilder().updateExternalSystemSettings(); - } - - /** Returns the builder for the settings used for calls to updateFinding. */ - public UnaryCallSettings.Builder updateFindingSettings() { - return getStubSettingsBuilder().updateFindingSettings(); - } - - /** Returns the builder for the settings used for calls to updateMuteConfig. */ - public UnaryCallSettings.Builder - updateMuteConfigSettings() { - return getStubSettingsBuilder().updateMuteConfigSettings(); - } - - /** Returns the builder for the settings used for calls to updateNotificationConfig. */ - public UnaryCallSettings.Builder - updateNotificationConfigSettings() { - return getStubSettingsBuilder().updateNotificationConfigSettings(); - } - - /** Returns the builder for the settings used for calls to updateOrganizationSettings. */ - public UnaryCallSettings.Builder - updateOrganizationSettingsSettings() { - return getStubSettingsBuilder().updateOrganizationSettingsSettings(); - } - - /** Returns the builder for the settings used for calls to updateSource. */ - public UnaryCallSettings.Builder updateSourceSettings() { - return getStubSettingsBuilder().updateSourceSettings(); - } - - /** Returns the builder for the settings used for calls to updateSecurityMarks. */ - public UnaryCallSettings.Builder - updateSecurityMarksSettings() { - return getStubSettingsBuilder().updateSecurityMarksSettings(); - } - - /** Returns the builder for the settings used for calls to createBigQueryExport. */ - public UnaryCallSettings.Builder - createBigQueryExportSettings() { - return getStubSettingsBuilder().createBigQueryExportSettings(); - } - - /** Returns the builder for the settings used for calls to deleteBigQueryExport. */ - public UnaryCallSettings.Builder - deleteBigQueryExportSettings() { - return getStubSettingsBuilder().deleteBigQueryExportSettings(); - } - - /** Returns the builder for the settings used for calls to updateBigQueryExport. */ - public UnaryCallSettings.Builder - updateBigQueryExportSettings() { - return getStubSettingsBuilder().updateBigQueryExportSettings(); - } - - /** Returns the builder for the settings used for calls to listBigQueryExports. */ - public PagedCallSettings.Builder< - ListBigQueryExportsRequest, ListBigQueryExportsResponse, - ListBigQueryExportsPagedResponse> - listBigQueryExportsSettings() { - return getStubSettingsBuilder().listBigQueryExportsSettings(); - } - - @Override - public SecurityCenterSettings build() throws IOException { - return new SecurityCenterSettings(this); - } - } -} diff --git a/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/gapic_metadata.json b/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/gapic_metadata.json deleted file mode 100644 index 70af22e3987f..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/gapic_metadata.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "java", - "protoPackage": "google.cloud.securitycenter.v1", - "libraryPackage": "com.google.cloud.securitycenter.v1", - "services": { - "SecurityCenter": { - "clients": { - "grpc": { - "libraryClient": "SecurityCenterClient", - "rpcs": { - "BulkMuteFindings": { - "methods": ["bulkMuteFindingsAsync", "bulkMuteFindingsAsync", "bulkMuteFindingsAsync", "bulkMuteFindingsOperationCallable", "bulkMuteFindingsCallable"] - }, - "CreateBigQueryExport": { - "methods": ["createBigQueryExport", "createBigQueryExport", "createBigQueryExport", "createBigQueryExport", "createBigQueryExport", "createBigQueryExportCallable"] - }, - "CreateFinding": { - "methods": ["createFinding", "createFinding", "createFinding", "createFindingCallable"] - }, - "CreateMuteConfig": { - "methods": ["createMuteConfig", "createMuteConfig", "createMuteConfig", "createMuteConfig", "createMuteConfig", "createMuteConfig", "createMuteConfig", "createMuteConfig", "createMuteConfig", "createMuteConfigCallable"] - }, - "CreateNotificationConfig": { - "methods": ["createNotificationConfig", "createNotificationConfig", "createNotificationConfig", "createNotificationConfig", "createNotificationConfig", "createNotificationConfigCallable"] - }, - "CreateSource": { - "methods": ["createSource", "createSource", "createSource", "createSourceCallable"] - }, - "DeleteBigQueryExport": { - "methods": ["deleteBigQueryExport", "deleteBigQueryExport", "deleteBigQueryExport", "deleteBigQueryExportCallable"] - }, - "DeleteMuteConfig": { - "methods": ["deleteMuteConfig", "deleteMuteConfig", "deleteMuteConfig", "deleteMuteConfigCallable"] - }, - "DeleteNotificationConfig": { - "methods": ["deleteNotificationConfig", "deleteNotificationConfig", "deleteNotificationConfig", "deleteNotificationConfigCallable"] - }, - "GetBigQueryExport": { - "methods": ["getBigQueryExport", "getBigQueryExport", "getBigQueryExport", "getBigQueryExportCallable"] - }, - "GetIamPolicy": { - "methods": ["getIamPolicy", "getIamPolicy", "getIamPolicy", "getIamPolicyCallable"] - }, - "GetMuteConfig": { - "methods": ["getMuteConfig", "getMuteConfig", "getMuteConfig", "getMuteConfigCallable"] - }, - "GetNotificationConfig": { - "methods": ["getNotificationConfig", "getNotificationConfig", "getNotificationConfig", "getNotificationConfigCallable"] - }, - "GetOrganizationSettings": { - "methods": ["getOrganizationSettings", "getOrganizationSettings", "getOrganizationSettings", "getOrganizationSettingsCallable"] - }, - "GetSource": { - "methods": ["getSource", "getSource", "getSource", "getSourceCallable"] - }, - "GroupAssets": { - "methods": ["groupAssets", "groupAssetsPagedCallable", "groupAssetsCallable"] - }, - "GroupFindings": { - "methods": ["groupFindings", "groupFindings", "groupFindings", "groupFindingsPagedCallable", "groupFindingsCallable"] - }, - "ListAssets": { - "methods": ["listAssets", "listAssetsPagedCallable", "listAssetsCallable"] - }, - "ListBigQueryExports": { - "methods": ["listBigQueryExports", "listBigQueryExports", "listBigQueryExports", "listBigQueryExports", "listBigQueryExports", "listBigQueryExportsPagedCallable", "listBigQueryExportsCallable"] - }, - "ListFindings": { - "methods": ["listFindings", "listFindingsPagedCallable", "listFindingsCallable"] - }, - "ListMuteConfigs": { - "methods": ["listMuteConfigs", "listMuteConfigs", "listMuteConfigs", "listMuteConfigs", "listMuteConfigs", "listMuteConfigsPagedCallable", "listMuteConfigsCallable"] - }, - "ListNotificationConfigs": { - "methods": ["listNotificationConfigs", "listNotificationConfigs", "listNotificationConfigs", "listNotificationConfigsPagedCallable", "listNotificationConfigsCallable"] - }, - "ListSources": { - "methods": ["listSources", "listSources", "listSources", "listSources", "listSources", "listSourcesPagedCallable", "listSourcesCallable"] - }, - "RunAssetDiscovery": { - "methods": ["runAssetDiscoveryAsync", "runAssetDiscoveryAsync", "runAssetDiscoveryAsync", "runAssetDiscoveryOperationCallable", "runAssetDiscoveryCallable"] - }, - "SetFindingState": { - "methods": ["setFindingState", "setFindingState", "setFindingState", "setFindingStateCallable"] - }, - "SetIamPolicy": { - "methods": ["setIamPolicy", "setIamPolicy", "setIamPolicy", "setIamPolicyCallable"] - }, - "SetMute": { - "methods": ["setMute", "setMute", "setMute", "setMuteCallable"] - }, - "TestIamPermissions": { - "methods": ["testIamPermissions", "testIamPermissions", "testIamPermissions", "testIamPermissionsCallable"] - }, - "UpdateBigQueryExport": { - "methods": ["updateBigQueryExport", "updateBigQueryExport", "updateBigQueryExportCallable"] - }, - "UpdateExternalSystem": { - "methods": ["updateExternalSystem", "updateExternalSystem", "updateExternalSystemCallable"] - }, - "UpdateFinding": { - "methods": ["updateFinding", "updateFinding", "updateFindingCallable"] - }, - "UpdateMuteConfig": { - "methods": ["updateMuteConfig", "updateMuteConfig", "updateMuteConfigCallable"] - }, - "UpdateNotificationConfig": { - "methods": ["updateNotificationConfig", "updateNotificationConfig", "updateNotificationConfig", "updateNotificationConfigCallable"] - }, - "UpdateOrganizationSettings": { - "methods": ["updateOrganizationSettings", "updateOrganizationSettings", "updateOrganizationSettingsCallable"] - }, - "UpdateSecurityMarks": { - "methods": ["updateSecurityMarks", "updateSecurityMarks", "updateSecurityMarksCallable"] - }, - "UpdateSource": { - "methods": ["updateSource", "updateSource", "updateSourceCallable"] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/package-info.java b/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/package-info.java deleted file mode 100644 index dae109d826b8..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/package-info.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 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. - */ - -/** - * A client to Security Command Center API - * - *

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

======================= SecurityCenterClient ======================= - * - *

Service Description: V1 APIs for Security Center service. - * - *

Sample for SecurityCenterClient: - * - *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
- *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
- *   Source source = Source.newBuilder().build();
- *   Source response = securityCenterClient.createSource(parent, source);
- * }
- * }
- */ -@Generated("by gapic-generator-java") -package com.google.cloud.securitycenter.v1; - -import javax.annotation.Generated; diff --git a/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/GrpcSecurityCenterCallableFactory.java b/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/GrpcSecurityCenterCallableFactory.java deleted file mode 100644 index 7f456379c254..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/GrpcSecurityCenterCallableFactory.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2022 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.stub; - -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC callable factory implementation for the SecurityCenter service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -public class GrpcSecurityCenterCallableFactory implements GrpcStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - GrpcCallSettings grpcCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - GrpcCallSettings grpcCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - GrpcCallSettings grpcCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, callSettings, clientContext, operationsStub); - } - - @Override - public - BidiStreamingCallable createBidiStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ClientStreamingCallable createClientStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/GrpcSecurityCenterStub.java b/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/GrpcSecurityCenterStub.java deleted file mode 100644 index 4943b19d61e6..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/GrpcSecurityCenterStub.java +++ /dev/null @@ -1,1447 +0,0 @@ -/* - * Copyright 2022 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.stub; - -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.GroupAssetsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.GroupFindingsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListAssetsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListBigQueryExportsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListFindingsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListMuteConfigsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListNotificationConfigsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListSourcesPagedResponse; - -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.securitycenter.v1.BigQueryExport; -import com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest; -import com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse; -import com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest; -import com.google.cloud.securitycenter.v1.CreateFindingRequest; -import com.google.cloud.securitycenter.v1.CreateMuteConfigRequest; -import com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest; -import com.google.cloud.securitycenter.v1.CreateSourceRequest; -import com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest; -import com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest; -import com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest; -import com.google.cloud.securitycenter.v1.ExternalSystem; -import com.google.cloud.securitycenter.v1.Finding; -import com.google.cloud.securitycenter.v1.GetBigQueryExportRequest; -import com.google.cloud.securitycenter.v1.GetMuteConfigRequest; -import com.google.cloud.securitycenter.v1.GetNotificationConfigRequest; -import com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest; -import com.google.cloud.securitycenter.v1.GetSourceRequest; -import com.google.cloud.securitycenter.v1.GroupAssetsRequest; -import com.google.cloud.securitycenter.v1.GroupAssetsResponse; -import com.google.cloud.securitycenter.v1.GroupFindingsRequest; -import com.google.cloud.securitycenter.v1.GroupFindingsResponse; -import com.google.cloud.securitycenter.v1.ListAssetsRequest; -import com.google.cloud.securitycenter.v1.ListAssetsResponse; -import com.google.cloud.securitycenter.v1.ListBigQueryExportsRequest; -import com.google.cloud.securitycenter.v1.ListBigQueryExportsResponse; -import com.google.cloud.securitycenter.v1.ListFindingsRequest; -import com.google.cloud.securitycenter.v1.ListFindingsResponse; -import com.google.cloud.securitycenter.v1.ListMuteConfigsRequest; -import com.google.cloud.securitycenter.v1.ListMuteConfigsResponse; -import com.google.cloud.securitycenter.v1.ListNotificationConfigsRequest; -import com.google.cloud.securitycenter.v1.ListNotificationConfigsResponse; -import com.google.cloud.securitycenter.v1.ListSourcesRequest; -import com.google.cloud.securitycenter.v1.ListSourcesResponse; -import com.google.cloud.securitycenter.v1.MuteConfig; -import com.google.cloud.securitycenter.v1.NotificationConfig; -import com.google.cloud.securitycenter.v1.OrganizationSettings; -import com.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest; -import com.google.cloud.securitycenter.v1.RunAssetDiscoveryResponse; -import com.google.cloud.securitycenter.v1.SecurityMarks; -import com.google.cloud.securitycenter.v1.SetFindingStateRequest; -import com.google.cloud.securitycenter.v1.SetMuteRequest; -import com.google.cloud.securitycenter.v1.Source; -import com.google.cloud.securitycenter.v1.UpdateBigQueryExportRequest; -import com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest; -import com.google.cloud.securitycenter.v1.UpdateFindingRequest; -import com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest; -import com.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest; -import com.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest; -import com.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest; -import com.google.cloud.securitycenter.v1.UpdateSourceRequest; -import com.google.common.collect.ImmutableMap; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.GrpcOperationsStub; -import com.google.protobuf.Empty; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the SecurityCenter service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public class GrpcSecurityCenterStub extends SecurityCenterStub { - private static final MethodDescriptor - bulkMuteFindingsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/BulkMuteFindings") - .setRequestMarshaller( - ProtoUtils.marshaller(BulkMuteFindingsRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor createSourceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/CreateSource") - .setRequestMarshaller(ProtoUtils.marshaller(CreateSourceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Source.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createFindingMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/CreateFinding") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateFindingRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Finding.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createMuteConfigMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/CreateMuteConfig") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateMuteConfigRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(MuteConfig.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createNotificationConfigMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.securitycenter.v1.SecurityCenter/CreateNotificationConfig") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateNotificationConfigRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(NotificationConfig.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteMuteConfigMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/DeleteMuteConfig") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteMuteConfigRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteNotificationConfigMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.securitycenter.v1.SecurityCenter/DeleteNotificationConfig") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteNotificationConfigRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getBigQueryExportMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/GetBigQueryExport") - .setRequestMarshaller( - ProtoUtils.marshaller(GetBigQueryExportRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(BigQueryExport.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 - getMuteConfigMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/GetMuteConfig") - .setRequestMarshaller( - ProtoUtils.marshaller(GetMuteConfigRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(MuteConfig.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getNotificationConfigMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.securitycenter.v1.SecurityCenter/GetNotificationConfig") - .setRequestMarshaller( - ProtoUtils.marshaller(GetNotificationConfigRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(NotificationConfig.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getOrganizationSettingsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.securitycenter.v1.SecurityCenter/GetOrganizationSettings") - .setRequestMarshaller( - ProtoUtils.marshaller(GetOrganizationSettingsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(OrganizationSettings.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getSourceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/GetSource") - .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() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/ListAssets") - .setRequestMarshaller(ProtoUtils.marshaller(ListAssetsRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ListAssetsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listFindingsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/ListFindings") - .setRequestMarshaller(ProtoUtils.marshaller(ListFindingsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListFindingsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listMuteConfigsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/ListMuteConfigs") - .setRequestMarshaller( - ProtoUtils.marshaller(ListMuteConfigsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListMuteConfigsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor< - ListNotificationConfigsRequest, ListNotificationConfigsResponse> - listNotificationConfigsMethodDescriptor = - MethodDescriptor - .newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.securitycenter.v1.SecurityCenter/ListNotificationConfigs") - .setRequestMarshaller( - ProtoUtils.marshaller(ListNotificationConfigsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListNotificationConfigsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listSourcesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/ListSources") - .setRequestMarshaller(ProtoUtils.marshaller(ListSourcesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListSourcesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - runAssetDiscoveryMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/RunAssetDiscovery") - .setRequestMarshaller( - ProtoUtils.marshaller(RunAssetDiscoveryRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - setFindingStateMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/SetFindingState") - .setRequestMarshaller( - ProtoUtils.marshaller(SetFindingStateRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Finding.getDefaultInstance())) - .build(); - - private static final MethodDescriptor setMuteMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/SetMute") - .setRequestMarshaller(ProtoUtils.marshaller(SetMuteRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Finding.getDefaultInstance())) - .build(); - - private static final MethodDescriptor setIamPolicyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/SetIamPolicy") - .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 - updateExternalSystemMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.securitycenter.v1.SecurityCenter/UpdateExternalSystem") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateExternalSystemRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ExternalSystem.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateFindingMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/UpdateFinding") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateFindingRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Finding.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateMuteConfigMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/UpdateMuteConfig") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateMuteConfigRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(MuteConfig.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateNotificationConfigMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.securitycenter.v1.SecurityCenter/UpdateNotificationConfig") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateNotificationConfigRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(NotificationConfig.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateOrganizationSettingsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.securitycenter.v1.SecurityCenter/UpdateOrganizationSettings") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateOrganizationSettingsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(OrganizationSettings.getDefaultInstance())) - .build(); - - private static final MethodDescriptor updateSourceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/UpdateSource") - .setRequestMarshaller(ProtoUtils.marshaller(UpdateSourceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Source.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateSecurityMarksMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.securitycenter.v1.SecurityCenter/UpdateSecurityMarks") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateSecurityMarksRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(SecurityMarks.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createBigQueryExportMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.securitycenter.v1.SecurityCenter/CreateBigQueryExport") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateBigQueryExportRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(BigQueryExport.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteBigQueryExportMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.securitycenter.v1.SecurityCenter/DeleteBigQueryExport") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteBigQueryExportRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateBigQueryExportMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.securitycenter.v1.SecurityCenter/UpdateBigQueryExport") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateBigQueryExportRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(BigQueryExport.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listBigQueryExportsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.securitycenter.v1.SecurityCenter/ListBigQueryExports") - .setRequestMarshaller( - ProtoUtils.marshaller(ListBigQueryExportsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListBigQueryExportsResponse.getDefaultInstance())) - .build(); - - private final UnaryCallable bulkMuteFindingsCallable; - private final OperationCallable - bulkMuteFindingsOperationCallable; - private final UnaryCallable createSourceCallable; - private final UnaryCallable createFindingCallable; - private final UnaryCallable createMuteConfigCallable; - private final UnaryCallable - createNotificationConfigCallable; - private final UnaryCallable deleteMuteConfigCallable; - private final UnaryCallable - deleteNotificationConfigCallable; - private final UnaryCallable getBigQueryExportCallable; - private final UnaryCallable getIamPolicyCallable; - private final UnaryCallable getMuteConfigCallable; - private final UnaryCallable - getNotificationConfigCallable; - 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 listAssetsCallable; - private final UnaryCallable listAssetsPagedCallable; - private final UnaryCallable listFindingsCallable; - private final UnaryCallable - listFindingsPagedCallable; - private final UnaryCallable - listMuteConfigsCallable; - private final UnaryCallable - listMuteConfigsPagedCallable; - private final UnaryCallable - listNotificationConfigsCallable; - private final UnaryCallable - listNotificationConfigsPagedCallable; - private final UnaryCallable listSourcesCallable; - private final UnaryCallable - listSourcesPagedCallable; - private final UnaryCallable runAssetDiscoveryCallable; - private final OperationCallable - runAssetDiscoveryOperationCallable; - private final UnaryCallable setFindingStateCallable; - private final UnaryCallable setMuteCallable; - private final UnaryCallable setIamPolicyCallable; - private final UnaryCallable - testIamPermissionsCallable; - private final UnaryCallable - updateExternalSystemCallable; - private final UnaryCallable updateFindingCallable; - private final UnaryCallable updateMuteConfigCallable; - private final UnaryCallable - updateNotificationConfigCallable; - private final UnaryCallable - updateOrganizationSettingsCallable; - private final UnaryCallable updateSourceCallable; - private final UnaryCallable - updateSecurityMarksCallable; - private final UnaryCallable - createBigQueryExportCallable; - private final UnaryCallable deleteBigQueryExportCallable; - private final UnaryCallable - updateBigQueryExportCallable; - private final UnaryCallable - listBigQueryExportsCallable; - private final UnaryCallable - listBigQueryExportsPagedCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcSecurityCenterStub create(SecurityCenterStubSettings settings) - throws IOException { - return new GrpcSecurityCenterStub(settings, ClientContext.create(settings)); - } - - public static final GrpcSecurityCenterStub create(ClientContext clientContext) - throws IOException { - return new GrpcSecurityCenterStub( - SecurityCenterStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcSecurityCenterStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcSecurityCenterStub( - SecurityCenterStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcSecurityCenterStub, using the given settings. This is protected - * so that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcSecurityCenterStub(SecurityCenterStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcSecurityCenterCallableFactory()); - } - - /** - * Constructs an instance of GrpcSecurityCenterStub, using the given settings. This is protected - * so that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcSecurityCenterStub( - SecurityCenterStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings bulkMuteFindingsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(bulkMuteFindingsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings createSourceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createSourceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings createFindingTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createFindingMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings createMuteConfigTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createMuteConfigMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings - createNotificationConfigTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createNotificationConfigMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteMuteConfigTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteMuteConfigMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - deleteNotificationConfigTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteNotificationConfigMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings getBigQueryExportTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getBigQueryExportMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings getIamPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getIamPolicyMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - }) - .build(); - GrpcCallSettings getMuteConfigTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getMuteConfigMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - getNotificationConfigTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getNotificationConfigMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - getOrganizationSettingsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getOrganizationSettingsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings getSourceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getSourceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings groupAssetsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(groupAssetsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings groupFindingsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(groupFindingsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings listAssetsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listAssetsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings listFindingsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listFindingsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings - listMuteConfigsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listMuteConfigsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings - listNotificationConfigsTransportSettings = - GrpcCallSettings - .newBuilder() - .setMethodDescriptor(listNotificationConfigsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings listSourcesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listSourcesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings runAssetDiscoveryTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(runAssetDiscoveryMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings setFindingStateTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(setFindingStateMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings setMuteTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(setMuteMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings setIamPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(setIamPolicyMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - }) - .build(); - GrpcCallSettings - testIamPermissionsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(testIamPermissionsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - }) - .build(); - GrpcCallSettings - updateExternalSystemTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateExternalSystemMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put( - "external_system.name", - String.valueOf(request.getExternalSystem().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings updateFindingTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateFindingMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("finding.name", String.valueOf(request.getFinding().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings updateMuteConfigTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateMuteConfigMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("mute_config.name", String.valueOf(request.getMuteConfig().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - updateNotificationConfigTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateNotificationConfigMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put( - "notification_config.name", - String.valueOf(request.getNotificationConfig().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - updateOrganizationSettingsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateOrganizationSettingsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put( - "organization_settings.name", - String.valueOf(request.getOrganizationSettings().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings updateSourceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateSourceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("source.name", String.valueOf(request.getSource().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - updateSecurityMarksTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateSecurityMarksMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put( - "security_marks.name", - String.valueOf(request.getSecurityMarks().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - createBigQueryExportTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createBigQueryExportMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteBigQueryExportTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteBigQueryExportMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - updateBigQueryExportTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateBigQueryExportMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put( - "big_query_export.name", - String.valueOf(request.getBigQueryExport().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - listBigQueryExportsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listBigQueryExportsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - - this.bulkMuteFindingsCallable = - callableFactory.createUnaryCallable( - bulkMuteFindingsTransportSettings, settings.bulkMuteFindingsSettings(), clientContext); - this.bulkMuteFindingsOperationCallable = - callableFactory.createOperationCallable( - bulkMuteFindingsTransportSettings, - settings.bulkMuteFindingsOperationSettings(), - clientContext, - operationsStub); - this.createSourceCallable = - callableFactory.createUnaryCallable( - createSourceTransportSettings, settings.createSourceSettings(), clientContext); - this.createFindingCallable = - callableFactory.createUnaryCallable( - createFindingTransportSettings, settings.createFindingSettings(), clientContext); - this.createMuteConfigCallable = - callableFactory.createUnaryCallable( - createMuteConfigTransportSettings, settings.createMuteConfigSettings(), clientContext); - this.createNotificationConfigCallable = - callableFactory.createUnaryCallable( - createNotificationConfigTransportSettings, - settings.createNotificationConfigSettings(), - clientContext); - this.deleteMuteConfigCallable = - callableFactory.createUnaryCallable( - deleteMuteConfigTransportSettings, settings.deleteMuteConfigSettings(), clientContext); - this.deleteNotificationConfigCallable = - callableFactory.createUnaryCallable( - deleteNotificationConfigTransportSettings, - settings.deleteNotificationConfigSettings(), - clientContext); - this.getBigQueryExportCallable = - callableFactory.createUnaryCallable( - getBigQueryExportTransportSettings, - settings.getBigQueryExportSettings(), - clientContext); - this.getIamPolicyCallable = - callableFactory.createUnaryCallable( - getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); - this.getMuteConfigCallable = - callableFactory.createUnaryCallable( - getMuteConfigTransportSettings, settings.getMuteConfigSettings(), clientContext); - this.getNotificationConfigCallable = - callableFactory.createUnaryCallable( - getNotificationConfigTransportSettings, - settings.getNotificationConfigSettings(), - 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); - this.groupAssetsPagedCallable = - callableFactory.createPagedCallable( - groupAssetsTransportSettings, settings.groupAssetsSettings(), clientContext); - this.groupFindingsCallable = - callableFactory.createUnaryCallable( - groupFindingsTransportSettings, settings.groupFindingsSettings(), clientContext); - this.groupFindingsPagedCallable = - callableFactory.createPagedCallable( - groupFindingsTransportSettings, settings.groupFindingsSettings(), clientContext); - this.listAssetsCallable = - callableFactory.createUnaryCallable( - listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); - this.listAssetsPagedCallable = - callableFactory.createPagedCallable( - listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); - this.listFindingsCallable = - callableFactory.createUnaryCallable( - listFindingsTransportSettings, settings.listFindingsSettings(), clientContext); - this.listFindingsPagedCallable = - callableFactory.createPagedCallable( - listFindingsTransportSettings, settings.listFindingsSettings(), clientContext); - this.listMuteConfigsCallable = - callableFactory.createUnaryCallable( - listMuteConfigsTransportSettings, settings.listMuteConfigsSettings(), clientContext); - this.listMuteConfigsPagedCallable = - callableFactory.createPagedCallable( - listMuteConfigsTransportSettings, settings.listMuteConfigsSettings(), clientContext); - this.listNotificationConfigsCallable = - callableFactory.createUnaryCallable( - listNotificationConfigsTransportSettings, - settings.listNotificationConfigsSettings(), - clientContext); - this.listNotificationConfigsPagedCallable = - callableFactory.createPagedCallable( - listNotificationConfigsTransportSettings, - settings.listNotificationConfigsSettings(), - clientContext); - this.listSourcesCallable = - callableFactory.createUnaryCallable( - listSourcesTransportSettings, settings.listSourcesSettings(), clientContext); - this.listSourcesPagedCallable = - callableFactory.createPagedCallable( - listSourcesTransportSettings, settings.listSourcesSettings(), clientContext); - this.runAssetDiscoveryCallable = - callableFactory.createUnaryCallable( - runAssetDiscoveryTransportSettings, - settings.runAssetDiscoverySettings(), - clientContext); - this.runAssetDiscoveryOperationCallable = - callableFactory.createOperationCallable( - runAssetDiscoveryTransportSettings, - settings.runAssetDiscoveryOperationSettings(), - clientContext, - operationsStub); - this.setFindingStateCallable = - callableFactory.createUnaryCallable( - setFindingStateTransportSettings, settings.setFindingStateSettings(), clientContext); - this.setMuteCallable = - callableFactory.createUnaryCallable( - setMuteTransportSettings, settings.setMuteSettings(), clientContext); - this.setIamPolicyCallable = - callableFactory.createUnaryCallable( - setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); - this.testIamPermissionsCallable = - callableFactory.createUnaryCallable( - testIamPermissionsTransportSettings, - settings.testIamPermissionsSettings(), - clientContext); - this.updateExternalSystemCallable = - callableFactory.createUnaryCallable( - updateExternalSystemTransportSettings, - settings.updateExternalSystemSettings(), - clientContext); - this.updateFindingCallable = - callableFactory.createUnaryCallable( - updateFindingTransportSettings, settings.updateFindingSettings(), clientContext); - this.updateMuteConfigCallable = - callableFactory.createUnaryCallable( - updateMuteConfigTransportSettings, settings.updateMuteConfigSettings(), clientContext); - this.updateNotificationConfigCallable = - callableFactory.createUnaryCallable( - updateNotificationConfigTransportSettings, - settings.updateNotificationConfigSettings(), - clientContext); - this.updateOrganizationSettingsCallable = - callableFactory.createUnaryCallable( - updateOrganizationSettingsTransportSettings, - settings.updateOrganizationSettingsSettings(), - clientContext); - this.updateSourceCallable = - callableFactory.createUnaryCallable( - updateSourceTransportSettings, settings.updateSourceSettings(), clientContext); - this.updateSecurityMarksCallable = - callableFactory.createUnaryCallable( - updateSecurityMarksTransportSettings, - settings.updateSecurityMarksSettings(), - clientContext); - this.createBigQueryExportCallable = - callableFactory.createUnaryCallable( - createBigQueryExportTransportSettings, - settings.createBigQueryExportSettings(), - clientContext); - this.deleteBigQueryExportCallable = - callableFactory.createUnaryCallable( - deleteBigQueryExportTransportSettings, - settings.deleteBigQueryExportSettings(), - clientContext); - this.updateBigQueryExportCallable = - callableFactory.createUnaryCallable( - updateBigQueryExportTransportSettings, - settings.updateBigQueryExportSettings(), - clientContext); - this.listBigQueryExportsCallable = - callableFactory.createUnaryCallable( - listBigQueryExportsTransportSettings, - settings.listBigQueryExportsSettings(), - clientContext); - this.listBigQueryExportsPagedCallable = - callableFactory.createPagedCallable( - listBigQueryExportsTransportSettings, - settings.listBigQueryExportsSettings(), - clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable bulkMuteFindingsCallable() { - return bulkMuteFindingsCallable; - } - - @Override - public OperationCallable - bulkMuteFindingsOperationCallable() { - return bulkMuteFindingsOperationCallable; - } - - @Override - public UnaryCallable createSourceCallable() { - return createSourceCallable; - } - - @Override - public UnaryCallable createFindingCallable() { - return createFindingCallable; - } - - @Override - public UnaryCallable createMuteConfigCallable() { - return createMuteConfigCallable; - } - - @Override - public UnaryCallable - createNotificationConfigCallable() { - return createNotificationConfigCallable; - } - - @Override - public UnaryCallable deleteMuteConfigCallable() { - return deleteMuteConfigCallable; - } - - @Override - public UnaryCallable deleteNotificationConfigCallable() { - return deleteNotificationConfigCallable; - } - - @Override - public UnaryCallable getBigQueryExportCallable() { - return getBigQueryExportCallable; - } - - @Override - public UnaryCallable getIamPolicyCallable() { - return getIamPolicyCallable; - } - - @Override - public UnaryCallable getMuteConfigCallable() { - return getMuteConfigCallable; - } - - @Override - public UnaryCallable - getNotificationConfigCallable() { - return getNotificationConfigCallable; - } - - @Override - public UnaryCallable - getOrganizationSettingsCallable() { - return getOrganizationSettingsCallable; - } - - @Override - public UnaryCallable getSourceCallable() { - return getSourceCallable; - } - - @Override - public UnaryCallable groupAssetsCallable() { - return groupAssetsCallable; - } - - @Override - public UnaryCallable groupAssetsPagedCallable() { - return groupAssetsPagedCallable; - } - - @Override - public UnaryCallable groupFindingsCallable() { - return groupFindingsCallable; - } - - @Override - public UnaryCallable - groupFindingsPagedCallable() { - return groupFindingsPagedCallable; - } - - @Override - public UnaryCallable listAssetsCallable() { - return listAssetsCallable; - } - - @Override - public UnaryCallable listAssetsPagedCallable() { - return listAssetsPagedCallable; - } - - @Override - public UnaryCallable listFindingsCallable() { - return listFindingsCallable; - } - - @Override - public UnaryCallable listFindingsPagedCallable() { - return listFindingsPagedCallable; - } - - @Override - public UnaryCallable listMuteConfigsCallable() { - return listMuteConfigsCallable; - } - - @Override - public UnaryCallable - listMuteConfigsPagedCallable() { - return listMuteConfigsPagedCallable; - } - - @Override - public UnaryCallable - listNotificationConfigsCallable() { - return listNotificationConfigsCallable; - } - - @Override - public UnaryCallable - listNotificationConfigsPagedCallable() { - return listNotificationConfigsPagedCallable; - } - - @Override - public UnaryCallable listSourcesCallable() { - return listSourcesCallable; - } - - @Override - public UnaryCallable listSourcesPagedCallable() { - return listSourcesPagedCallable; - } - - @Override - public UnaryCallable runAssetDiscoveryCallable() { - return runAssetDiscoveryCallable; - } - - @Override - public OperationCallable - runAssetDiscoveryOperationCallable() { - return runAssetDiscoveryOperationCallable; - } - - @Override - public UnaryCallable setFindingStateCallable() { - return setFindingStateCallable; - } - - @Override - public UnaryCallable setMuteCallable() { - return setMuteCallable; - } - - @Override - public UnaryCallable setIamPolicyCallable() { - return setIamPolicyCallable; - } - - @Override - public UnaryCallable - testIamPermissionsCallable() { - return testIamPermissionsCallable; - } - - @Override - public UnaryCallable updateExternalSystemCallable() { - return updateExternalSystemCallable; - } - - @Override - public UnaryCallable updateFindingCallable() { - return updateFindingCallable; - } - - @Override - public UnaryCallable updateMuteConfigCallable() { - return updateMuteConfigCallable; - } - - @Override - public UnaryCallable - updateNotificationConfigCallable() { - return updateNotificationConfigCallable; - } - - @Override - public UnaryCallable - updateOrganizationSettingsCallable() { - return updateOrganizationSettingsCallable; - } - - @Override - public UnaryCallable updateSourceCallable() { - return updateSourceCallable; - } - - @Override - public UnaryCallable updateSecurityMarksCallable() { - return updateSecurityMarksCallable; - } - - @Override - public UnaryCallable createBigQueryExportCallable() { - return createBigQueryExportCallable; - } - - @Override - public UnaryCallable deleteBigQueryExportCallable() { - return deleteBigQueryExportCallable; - } - - @Override - public UnaryCallable updateBigQueryExportCallable() { - return updateBigQueryExportCallable; - } - - @Override - public UnaryCallable - listBigQueryExportsCallable() { - return listBigQueryExportsCallable; - } - - @Override - public UnaryCallable - listBigQueryExportsPagedCallable() { - return listBigQueryExportsPagedCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/HttpJsonSecurityCenterCallableFactory.java b/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/HttpJsonSecurityCenterCallableFactory.java deleted file mode 100644 index 022ee1219382..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/HttpJsonSecurityCenterCallableFactory.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2022 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.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonCallableFactory; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST callable factory implementation for the SecurityCenter service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -@BetaApi -public class HttpJsonSecurityCenterCallableFactory - implements HttpJsonStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - HttpJsonCallSettings httpJsonCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createUnaryCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - HttpJsonCallSettings httpJsonCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createPagedCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - HttpJsonCallSettings httpJsonCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createBatchingCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - HttpJsonCallSettings httpJsonCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - UnaryCallable innerCallable = - HttpJsonCallableFactory.createBaseUnaryCallable( - httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); - HttpJsonOperationSnapshotCallable initialCallable = - new HttpJsonOperationSnapshotCallable( - innerCallable, - httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); - return HttpJsonCallableFactory.createOperationCallable( - callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - HttpJsonCallSettings httpJsonCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createServerStreamingCallable( - httpJsonCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/HttpJsonSecurityCenterStub.java b/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/HttpJsonSecurityCenterStub.java deleted file mode 100644 index 21f87a39e46e..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/HttpJsonSecurityCenterStub.java +++ /dev/null @@ -1,2341 +0,0 @@ -/* - * Copyright 2022 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.stub; - -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.GroupAssetsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.GroupFindingsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListAssetsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListBigQueryExportsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListFindingsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListMuteConfigsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListNotificationConfigsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListSourcesPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.core.InternalApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.httpjson.ApiMethodDescriptor; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; -import com.google.api.gax.httpjson.ProtoMessageResponseParser; -import com.google.api.gax.httpjson.ProtoRestSerializer; -import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; -import com.google.api.gax.longrunning.OperationSnapshot; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.securitycenter.v1.BigQueryExport; -import com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest; -import com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse; -import com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest; -import com.google.cloud.securitycenter.v1.CreateFindingRequest; -import com.google.cloud.securitycenter.v1.CreateMuteConfigRequest; -import com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest; -import com.google.cloud.securitycenter.v1.CreateSourceRequest; -import com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest; -import com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest; -import com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest; -import com.google.cloud.securitycenter.v1.ExternalSystem; -import com.google.cloud.securitycenter.v1.Finding; -import com.google.cloud.securitycenter.v1.GetBigQueryExportRequest; -import com.google.cloud.securitycenter.v1.GetMuteConfigRequest; -import com.google.cloud.securitycenter.v1.GetNotificationConfigRequest; -import com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest; -import com.google.cloud.securitycenter.v1.GetSourceRequest; -import com.google.cloud.securitycenter.v1.GroupAssetsRequest; -import com.google.cloud.securitycenter.v1.GroupAssetsResponse; -import com.google.cloud.securitycenter.v1.GroupFindingsRequest; -import com.google.cloud.securitycenter.v1.GroupFindingsResponse; -import com.google.cloud.securitycenter.v1.ListAssetsRequest; -import com.google.cloud.securitycenter.v1.ListAssetsResponse; -import com.google.cloud.securitycenter.v1.ListBigQueryExportsRequest; -import com.google.cloud.securitycenter.v1.ListBigQueryExportsResponse; -import com.google.cloud.securitycenter.v1.ListFindingsRequest; -import com.google.cloud.securitycenter.v1.ListFindingsResponse; -import com.google.cloud.securitycenter.v1.ListMuteConfigsRequest; -import com.google.cloud.securitycenter.v1.ListMuteConfigsResponse; -import com.google.cloud.securitycenter.v1.ListNotificationConfigsRequest; -import com.google.cloud.securitycenter.v1.ListNotificationConfigsResponse; -import com.google.cloud.securitycenter.v1.ListSourcesRequest; -import com.google.cloud.securitycenter.v1.ListSourcesResponse; -import com.google.cloud.securitycenter.v1.MuteConfig; -import com.google.cloud.securitycenter.v1.NotificationConfig; -import com.google.cloud.securitycenter.v1.OrganizationSettings; -import com.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest; -import com.google.cloud.securitycenter.v1.RunAssetDiscoveryResponse; -import com.google.cloud.securitycenter.v1.SecurityMarks; -import com.google.cloud.securitycenter.v1.SetFindingStateRequest; -import com.google.cloud.securitycenter.v1.SetMuteRequest; -import com.google.cloud.securitycenter.v1.Source; -import com.google.cloud.securitycenter.v1.UpdateBigQueryExportRequest; -import com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest; -import com.google.cloud.securitycenter.v1.UpdateFindingRequest; -import com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest; -import com.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest; -import com.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest; -import com.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest; -import com.google.cloud.securitycenter.v1.UpdateSourceRequest; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import com.google.protobuf.TypeRegistry; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST stub implementation for the SecurityCenter service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -@BetaApi -public class HttpJsonSecurityCenterStub extends SecurityCenterStub { - private static final TypeRegistry typeRegistry = - TypeRegistry.newBuilder() - .add(Empty.getDescriptor()) - .add(RunAssetDiscoveryResponse.getDescriptor()) - .add(BulkMuteFindingsResponse.getDescriptor()) - .build(); - - private static final ApiMethodDescriptor - bulkMuteFindingsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/BulkMuteFindings") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=organizations/*}/findings:bulkMute", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setAdditionalPaths( - "/v1/{parent=folders/*}/findings:bulkMute", - "/v1/{parent=projects/*}/findings:bulkMute") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (BulkMuteFindingsRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - createSourceMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/CreateSource") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=organizations/*}/sources", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create().toBody("source", request.getSource())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Source.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createFindingMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/CreateFinding") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=organizations/*/sources/*}/findings", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "findingId", request.getFindingId()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create().toBody("finding", request.getFinding())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Finding.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createMuteConfigMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/CreateMuteConfig") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=organizations/*}/muteConfigs", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setAdditionalPaths( - "/v1/{parent=folders/*}/muteConfigs", - "/v1/{parent=projects/*}/muteConfigs") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "muteConfigId", request.getMuteConfigId()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("muteConfig", request.getMuteConfig())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(MuteConfig.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createNotificationConfigMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.securitycenter.v1.SecurityCenter/CreateNotificationConfig") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=organizations/*}/notificationConfigs", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "configId", request.getConfigId()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("notificationConfig", request.getNotificationConfig())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(NotificationConfig.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - deleteMuteConfigMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/DeleteMuteConfig") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=organizations/*/muteConfigs/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setAdditionalPaths( - "/v1/{name=folders/*/muteConfigs/*}", - "/v1/{name=projects/*/muteConfigs/*}") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - deleteNotificationConfigMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.securitycenter.v1.SecurityCenter/DeleteNotificationConfig") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=organizations/*/notificationConfigs/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getBigQueryExportMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/GetBigQueryExport") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=organizations/*/bigQueryExports/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setAdditionalPaths( - "/v1/{name=folders/*/bigQueryExports/*}", - "/v1/{name=projects/*/bigQueryExports/*}") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(BigQueryExport.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getIamPolicyMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/GetIamPolicy") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{resource=organizations/*/sources/*}:getIamPolicy", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "resource", request.getResource()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearResource().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Policy.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getMuteConfigMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/GetMuteConfig") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=organizations/*/muteConfigs/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setAdditionalPaths( - "/v1/{name=folders/*/muteConfigs/*}", - "/v1/{name=projects/*/muteConfigs/*}") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(MuteConfig.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getNotificationConfigMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.securitycenter.v1.SecurityCenter/GetNotificationConfig") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=organizations/*/notificationConfigs/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(NotificationConfig.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getOrganizationSettingsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.securitycenter.v1.SecurityCenter/GetOrganizationSettings") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=organizations/*/organizationSettings}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(OrganizationSettings.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor getSourceMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/GetSource") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=organizations/*/sources/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Source.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - groupAssetsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/GroupAssets") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=organizations/*}/assets:group", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setAdditionalPaths( - "/v1/{parent=folders/*}/assets:group", - "/v1/{parent=projects/*}/assets:group") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(GroupAssetsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - groupFindingsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/GroupFindings") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=organizations/*/sources/*}/findings:group", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setAdditionalPaths( - "/v1/{parent=folders/*/sources/*}/findings:group", - "/v1/{parent=projects/*/sources/*}/findings:group") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(GroupFindingsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - listAssetsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/ListAssets") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=organizations/*}/assets", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setAdditionalPaths( - "/v1/{parent=folders/*}/assets", "/v1/{parent=projects/*}/assets") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "compareDuration", request.getCompareDuration()); - serializer.putQueryParam(fields, "fieldMask", request.getFieldMask()); - serializer.putQueryParam(fields, "filter", request.getFilter()); - serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - serializer.putQueryParam(fields, "readTime", request.getReadTime()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListAssetsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - listFindingsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/ListFindings") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=organizations/*/sources/*}/findings", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setAdditionalPaths( - "/v1/{parent=folders/*/sources/*}/findings", - "/v1/{parent=projects/*/sources/*}/findings") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "compareDuration", request.getCompareDuration()); - serializer.putQueryParam(fields, "fieldMask", request.getFieldMask()); - serializer.putQueryParam(fields, "filter", request.getFilter()); - serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - serializer.putQueryParam(fields, "readTime", request.getReadTime()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListFindingsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - listMuteConfigsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/ListMuteConfigs") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=organizations/*}/muteConfigs", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setAdditionalPaths( - "/v1/{parent=folders/*}/muteConfigs", - "/v1/{parent=projects/*}/muteConfigs") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListMuteConfigsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor< - ListNotificationConfigsRequest, ListNotificationConfigsResponse> - listNotificationConfigsMethodDescriptor = - ApiMethodDescriptor - .newBuilder() - .setFullMethodName( - "google.cloud.securitycenter.v1.SecurityCenter/ListNotificationConfigs") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=organizations/*}/notificationConfigs", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListNotificationConfigsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - listSourcesMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/ListSources") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=organizations/*}/sources", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setAdditionalPaths( - "/v1/{parent=folders/*}/sources", "/v1/{parent=projects/*}/sources") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListSourcesResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - runAssetDiscoveryMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/RunAssetDiscovery") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=organizations/*}/assets:runDiscovery", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (RunAssetDiscoveryRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - setFindingStateMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/SetFindingState") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=organizations/*/sources/*/findings/*}:setState", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setAdditionalPaths( - "/v1/{name=folders/*/sources/*/findings/*}:setState", - "/v1/{name=projects/*/sources/*/findings/*}:setState") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearName().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Finding.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor setMuteMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/SetMute") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=organizations/*/sources/*/findings/*}:setMute", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setAdditionalPaths( - "/v1/{name=folders/*/sources/*/findings/*}:setMute", - "/v1/{name=projects/*/sources/*/findings/*}:setMute") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearName().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Finding.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - setIamPolicyMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/SetIamPolicy") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{resource=organizations/*/sources/*}:setIamPolicy", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "resource", request.getResource()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearResource().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Policy.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - testIamPermissionsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/TestIamPermissions") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{resource=organizations/*/sources/*}:testIamPermissions", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "resource", request.getResource()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearResource().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(TestIamPermissionsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - updateExternalSystemMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.securitycenter.v1.SecurityCenter/UpdateExternalSystem") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{externalSystem.name=organizations/*/sources/*/findings/*/externalSystems/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, - "externalSystem.name", - request.getExternalSystem().getName()); - return fields; - }) - .setAdditionalPaths( - "/v1/{externalSystem.name=folders/*/sources/*/findings/*/externalSystems/*}", - "/v1/{externalSystem.name=projects/*/sources/*/findings/*/externalSystems/*}") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("externalSystem", request.getExternalSystem())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ExternalSystem.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - updateFindingMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/UpdateFinding") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{finding.name=organizations/*/sources/*/findings/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "finding.name", request.getFinding().getName()); - return fields; - }) - .setAdditionalPaths( - "/v1/{finding.name=folders/*/sources/*/findings/*}", - "/v1/{finding.name=projects/*/sources/*/findings/*}") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create().toBody("finding", request.getFinding())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Finding.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - updateMuteConfigMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/UpdateMuteConfig") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{muteConfig.name=organizations/*/muteConfigs/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "muteConfig.name", request.getMuteConfig().getName()); - return fields; - }) - .setAdditionalPaths( - "/v1/{muteConfig.name=folders/*/muteConfigs/*}", - "/v1/{muteConfig.name=projects/*/muteConfigs/*}") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("muteConfig", request.getMuteConfig())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(MuteConfig.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - updateNotificationConfigMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.securitycenter.v1.SecurityCenter/UpdateNotificationConfig") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{notificationConfig.name=organizations/*/notificationConfigs/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, - "notificationConfig.name", - request.getNotificationConfig().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("notificationConfig", request.getNotificationConfig())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(NotificationConfig.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - updateOrganizationSettingsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.securitycenter.v1.SecurityCenter/UpdateOrganizationSettings") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{organizationSettings.name=organizations/*/organizationSettings}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, - "organizationSettings.name", - request.getOrganizationSettings().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody( - "organizationSettings", request.getOrganizationSettings())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(OrganizationSettings.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - updateSourceMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/UpdateSource") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{source.name=organizations/*/sources/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "source.name", request.getSource().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create().toBody("source", request.getSource())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Source.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - updateSecurityMarksMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.securitycenter.v1.SecurityCenter/UpdateSecurityMarks") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{securityMarks.name=organizations/*/assets/*/securityMarks}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "securityMarks.name", request.getSecurityMarks().getName()); - return fields; - }) - .setAdditionalPaths( - "/v1/{securityMarks.name=folders/*/assets/*/securityMarks}", - "/v1/{securityMarks.name=projects/*/assets/*/securityMarks}", - "/v1/{securityMarks.name=organizations/*/sources/*/findings/*/securityMarks}", - "/v1/{securityMarks.name=folders/*/sources/*/findings/*/securityMarks}", - "/v1/{securityMarks.name=projects/*/sources/*/findings/*/securityMarks}") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "startTime", request.getStartTime()); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("securityMarks", request.getSecurityMarks())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(SecurityMarks.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createBigQueryExportMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.securitycenter.v1.SecurityCenter/CreateBigQueryExport") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=organizations/*}/bigQueryExports", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setAdditionalPaths( - "/v1/{parent=folders/*}/bigQueryExports", - "/v1/{parent=projects/*}/bigQueryExports") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "bigQueryExportId", request.getBigQueryExportId()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("bigQueryExport", request.getBigQueryExport())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(BigQueryExport.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - deleteBigQueryExportMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.securitycenter.v1.SecurityCenter/DeleteBigQueryExport") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=organizations/*/bigQueryExports/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setAdditionalPaths( - "/v1/{name=folders/*/bigQueryExports/*}", - "/v1/{name=projects/*/bigQueryExports/*}") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - updateBigQueryExportMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.securitycenter.v1.SecurityCenter/UpdateBigQueryExport") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{bigQueryExport.name=organizations/*/bigQueryExports/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, - "bigQueryExport.name", - request.getBigQueryExport().getName()); - return fields; - }) - .setAdditionalPaths( - "/v1/{bigQueryExport.name=folders/*/bigQueryExports/*}", - "/v1/{bigQueryExport.name=projects/*/bigQueryExports/*}") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("bigQueryExport", request.getBigQueryExport())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(BigQueryExport.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - listBigQueryExportsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.securitycenter.v1.SecurityCenter/ListBigQueryExports") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=organizations/*}/bigQueryExports", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setAdditionalPaths( - "/v1/{parent=folders/*}/bigQueryExports", - "/v1/{parent=projects/*}/bigQueryExports") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListBigQueryExportsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private final UnaryCallable bulkMuteFindingsCallable; - private final OperationCallable - bulkMuteFindingsOperationCallable; - private final UnaryCallable createSourceCallable; - private final UnaryCallable createFindingCallable; - private final UnaryCallable createMuteConfigCallable; - private final UnaryCallable - createNotificationConfigCallable; - private final UnaryCallable deleteMuteConfigCallable; - private final UnaryCallable - deleteNotificationConfigCallable; - private final UnaryCallable getBigQueryExportCallable; - private final UnaryCallable getIamPolicyCallable; - private final UnaryCallable getMuteConfigCallable; - private final UnaryCallable - getNotificationConfigCallable; - 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 listAssetsCallable; - private final UnaryCallable listAssetsPagedCallable; - private final UnaryCallable listFindingsCallable; - private final UnaryCallable - listFindingsPagedCallable; - private final UnaryCallable - listMuteConfigsCallable; - private final UnaryCallable - listMuteConfigsPagedCallable; - private final UnaryCallable - listNotificationConfigsCallable; - private final UnaryCallable - listNotificationConfigsPagedCallable; - private final UnaryCallable listSourcesCallable; - private final UnaryCallable - listSourcesPagedCallable; - private final UnaryCallable runAssetDiscoveryCallable; - private final OperationCallable - runAssetDiscoveryOperationCallable; - private final UnaryCallable setFindingStateCallable; - private final UnaryCallable setMuteCallable; - private final UnaryCallable setIamPolicyCallable; - private final UnaryCallable - testIamPermissionsCallable; - private final UnaryCallable - updateExternalSystemCallable; - private final UnaryCallable updateFindingCallable; - private final UnaryCallable updateMuteConfigCallable; - private final UnaryCallable - updateNotificationConfigCallable; - private final UnaryCallable - updateOrganizationSettingsCallable; - private final UnaryCallable updateSourceCallable; - private final UnaryCallable - updateSecurityMarksCallable; - private final UnaryCallable - createBigQueryExportCallable; - private final UnaryCallable deleteBigQueryExportCallable; - private final UnaryCallable - updateBigQueryExportCallable; - private final UnaryCallable - listBigQueryExportsCallable; - private final UnaryCallable - listBigQueryExportsPagedCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonOperationsStub httpJsonOperationsStub; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonSecurityCenterStub create(SecurityCenterStubSettings settings) - throws IOException { - return new HttpJsonSecurityCenterStub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonSecurityCenterStub create(ClientContext clientContext) - throws IOException { - return new HttpJsonSecurityCenterStub( - SecurityCenterStubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonSecurityCenterStub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonSecurityCenterStub( - SecurityCenterStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of HttpJsonSecurityCenterStub, using the given settings. This is - * protected so that it is easy to make a subclass, but otherwise, the static factory methods - * should be preferred. - */ - protected HttpJsonSecurityCenterStub( - SecurityCenterStubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new HttpJsonSecurityCenterCallableFactory()); - } - - /** - * Constructs an instance of HttpJsonSecurityCenterStub, using the given settings. This is - * protected so that it is easy to make a subclass, but otherwise, the static factory methods - * should be preferred. - */ - protected HttpJsonSecurityCenterStub( - SecurityCenterStubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.httpJsonOperationsStub = - HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); - - HttpJsonCallSettings bulkMuteFindingsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(bulkMuteFindingsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings createSourceTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createSourceMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings createFindingTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createFindingMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings createMuteConfigTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createMuteConfigMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - createNotificationConfigTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createNotificationConfigMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteMuteConfigTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteMuteConfigMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - deleteNotificationConfigTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteNotificationConfigMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - getBigQueryExportTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getBigQueryExportMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getIamPolicyTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getIamPolicyMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getMuteConfigTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getMuteConfigMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - getNotificationConfigTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getNotificationConfigMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - getOrganizationSettingsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getOrganizationSettingsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getSourceTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getSourceMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings groupAssetsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(groupAssetsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - groupFindingsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(groupFindingsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings listAssetsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listAssetsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings listFindingsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listFindingsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listMuteConfigsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listMuteConfigsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listNotificationConfigsTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(listNotificationConfigsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings listSourcesTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listSourcesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings runAssetDiscoveryTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(runAssetDiscoveryMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings setFindingStateTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(setFindingStateMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings setMuteTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(setMuteMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings setIamPolicyTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(setIamPolicyMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - testIamPermissionsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(testIamPermissionsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - updateExternalSystemTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateExternalSystemMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings updateFindingTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateFindingMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings updateMuteConfigTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateMuteConfigMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - updateNotificationConfigTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateNotificationConfigMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - updateOrganizationSettingsTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(updateOrganizationSettingsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings updateSourceTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateSourceMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - updateSecurityMarksTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateSecurityMarksMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - createBigQueryExportTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createBigQueryExportMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteBigQueryExportTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteBigQueryExportMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - updateBigQueryExportTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateBigQueryExportMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listBigQueryExportsTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(listBigQueryExportsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - - this.bulkMuteFindingsCallable = - callableFactory.createUnaryCallable( - bulkMuteFindingsTransportSettings, settings.bulkMuteFindingsSettings(), clientContext); - this.bulkMuteFindingsOperationCallable = - callableFactory.createOperationCallable( - bulkMuteFindingsTransportSettings, - settings.bulkMuteFindingsOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.createSourceCallable = - callableFactory.createUnaryCallable( - createSourceTransportSettings, settings.createSourceSettings(), clientContext); - this.createFindingCallable = - callableFactory.createUnaryCallable( - createFindingTransportSettings, settings.createFindingSettings(), clientContext); - this.createMuteConfigCallable = - callableFactory.createUnaryCallable( - createMuteConfigTransportSettings, settings.createMuteConfigSettings(), clientContext); - this.createNotificationConfigCallable = - callableFactory.createUnaryCallable( - createNotificationConfigTransportSettings, - settings.createNotificationConfigSettings(), - clientContext); - this.deleteMuteConfigCallable = - callableFactory.createUnaryCallable( - deleteMuteConfigTransportSettings, settings.deleteMuteConfigSettings(), clientContext); - this.deleteNotificationConfigCallable = - callableFactory.createUnaryCallable( - deleteNotificationConfigTransportSettings, - settings.deleteNotificationConfigSettings(), - clientContext); - this.getBigQueryExportCallable = - callableFactory.createUnaryCallable( - getBigQueryExportTransportSettings, - settings.getBigQueryExportSettings(), - clientContext); - this.getIamPolicyCallable = - callableFactory.createUnaryCallable( - getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); - this.getMuteConfigCallable = - callableFactory.createUnaryCallable( - getMuteConfigTransportSettings, settings.getMuteConfigSettings(), clientContext); - this.getNotificationConfigCallable = - callableFactory.createUnaryCallable( - getNotificationConfigTransportSettings, - settings.getNotificationConfigSettings(), - 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); - this.groupAssetsPagedCallable = - callableFactory.createPagedCallable( - groupAssetsTransportSettings, settings.groupAssetsSettings(), clientContext); - this.groupFindingsCallable = - callableFactory.createUnaryCallable( - groupFindingsTransportSettings, settings.groupFindingsSettings(), clientContext); - this.groupFindingsPagedCallable = - callableFactory.createPagedCallable( - groupFindingsTransportSettings, settings.groupFindingsSettings(), clientContext); - this.listAssetsCallable = - callableFactory.createUnaryCallable( - listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); - this.listAssetsPagedCallable = - callableFactory.createPagedCallable( - listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); - this.listFindingsCallable = - callableFactory.createUnaryCallable( - listFindingsTransportSettings, settings.listFindingsSettings(), clientContext); - this.listFindingsPagedCallable = - callableFactory.createPagedCallable( - listFindingsTransportSettings, settings.listFindingsSettings(), clientContext); - this.listMuteConfigsCallable = - callableFactory.createUnaryCallable( - listMuteConfigsTransportSettings, settings.listMuteConfigsSettings(), clientContext); - this.listMuteConfigsPagedCallable = - callableFactory.createPagedCallable( - listMuteConfigsTransportSettings, settings.listMuteConfigsSettings(), clientContext); - this.listNotificationConfigsCallable = - callableFactory.createUnaryCallable( - listNotificationConfigsTransportSettings, - settings.listNotificationConfigsSettings(), - clientContext); - this.listNotificationConfigsPagedCallable = - callableFactory.createPagedCallable( - listNotificationConfigsTransportSettings, - settings.listNotificationConfigsSettings(), - clientContext); - this.listSourcesCallable = - callableFactory.createUnaryCallable( - listSourcesTransportSettings, settings.listSourcesSettings(), clientContext); - this.listSourcesPagedCallable = - callableFactory.createPagedCallable( - listSourcesTransportSettings, settings.listSourcesSettings(), clientContext); - this.runAssetDiscoveryCallable = - callableFactory.createUnaryCallable( - runAssetDiscoveryTransportSettings, - settings.runAssetDiscoverySettings(), - clientContext); - this.runAssetDiscoveryOperationCallable = - callableFactory.createOperationCallable( - runAssetDiscoveryTransportSettings, - settings.runAssetDiscoveryOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.setFindingStateCallable = - callableFactory.createUnaryCallable( - setFindingStateTransportSettings, settings.setFindingStateSettings(), clientContext); - this.setMuteCallable = - callableFactory.createUnaryCallable( - setMuteTransportSettings, settings.setMuteSettings(), clientContext); - this.setIamPolicyCallable = - callableFactory.createUnaryCallable( - setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); - this.testIamPermissionsCallable = - callableFactory.createUnaryCallable( - testIamPermissionsTransportSettings, - settings.testIamPermissionsSettings(), - clientContext); - this.updateExternalSystemCallable = - callableFactory.createUnaryCallable( - updateExternalSystemTransportSettings, - settings.updateExternalSystemSettings(), - clientContext); - this.updateFindingCallable = - callableFactory.createUnaryCallable( - updateFindingTransportSettings, settings.updateFindingSettings(), clientContext); - this.updateMuteConfigCallable = - callableFactory.createUnaryCallable( - updateMuteConfigTransportSettings, settings.updateMuteConfigSettings(), clientContext); - this.updateNotificationConfigCallable = - callableFactory.createUnaryCallable( - updateNotificationConfigTransportSettings, - settings.updateNotificationConfigSettings(), - clientContext); - this.updateOrganizationSettingsCallable = - callableFactory.createUnaryCallable( - updateOrganizationSettingsTransportSettings, - settings.updateOrganizationSettingsSettings(), - clientContext); - this.updateSourceCallable = - callableFactory.createUnaryCallable( - updateSourceTransportSettings, settings.updateSourceSettings(), clientContext); - this.updateSecurityMarksCallable = - callableFactory.createUnaryCallable( - updateSecurityMarksTransportSettings, - settings.updateSecurityMarksSettings(), - clientContext); - this.createBigQueryExportCallable = - callableFactory.createUnaryCallable( - createBigQueryExportTransportSettings, - settings.createBigQueryExportSettings(), - clientContext); - this.deleteBigQueryExportCallable = - callableFactory.createUnaryCallable( - deleteBigQueryExportTransportSettings, - settings.deleteBigQueryExportSettings(), - clientContext); - this.updateBigQueryExportCallable = - callableFactory.createUnaryCallable( - updateBigQueryExportTransportSettings, - settings.updateBigQueryExportSettings(), - clientContext); - this.listBigQueryExportsCallable = - callableFactory.createUnaryCallable( - listBigQueryExportsTransportSettings, - settings.listBigQueryExportsSettings(), - clientContext); - this.listBigQueryExportsPagedCallable = - callableFactory.createPagedCallable( - listBigQueryExportsTransportSettings, - settings.listBigQueryExportsSettings(), - clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(bulkMuteFindingsMethodDescriptor); - methodDescriptors.add(createSourceMethodDescriptor); - methodDescriptors.add(createFindingMethodDescriptor); - methodDescriptors.add(createMuteConfigMethodDescriptor); - methodDescriptors.add(createNotificationConfigMethodDescriptor); - methodDescriptors.add(deleteMuteConfigMethodDescriptor); - methodDescriptors.add(deleteNotificationConfigMethodDescriptor); - methodDescriptors.add(getBigQueryExportMethodDescriptor); - methodDescriptors.add(getIamPolicyMethodDescriptor); - methodDescriptors.add(getMuteConfigMethodDescriptor); - methodDescriptors.add(getNotificationConfigMethodDescriptor); - methodDescriptors.add(getOrganizationSettingsMethodDescriptor); - methodDescriptors.add(getSourceMethodDescriptor); - methodDescriptors.add(groupAssetsMethodDescriptor); - methodDescriptors.add(groupFindingsMethodDescriptor); - methodDescriptors.add(listAssetsMethodDescriptor); - methodDescriptors.add(listFindingsMethodDescriptor); - methodDescriptors.add(listMuteConfigsMethodDescriptor); - methodDescriptors.add(listNotificationConfigsMethodDescriptor); - methodDescriptors.add(listSourcesMethodDescriptor); - methodDescriptors.add(runAssetDiscoveryMethodDescriptor); - methodDescriptors.add(setFindingStateMethodDescriptor); - methodDescriptors.add(setMuteMethodDescriptor); - methodDescriptors.add(setIamPolicyMethodDescriptor); - methodDescriptors.add(testIamPermissionsMethodDescriptor); - methodDescriptors.add(updateExternalSystemMethodDescriptor); - methodDescriptors.add(updateFindingMethodDescriptor); - methodDescriptors.add(updateMuteConfigMethodDescriptor); - methodDescriptors.add(updateNotificationConfigMethodDescriptor); - methodDescriptors.add(updateOrganizationSettingsMethodDescriptor); - methodDescriptors.add(updateSourceMethodDescriptor); - methodDescriptors.add(updateSecurityMarksMethodDescriptor); - methodDescriptors.add(createBigQueryExportMethodDescriptor); - methodDescriptors.add(deleteBigQueryExportMethodDescriptor); - methodDescriptors.add(updateBigQueryExportMethodDescriptor); - methodDescriptors.add(listBigQueryExportsMethodDescriptor); - return methodDescriptors; - } - - public HttpJsonOperationsStub getHttpJsonOperationsStub() { - return httpJsonOperationsStub; - } - - @Override - public UnaryCallable bulkMuteFindingsCallable() { - return bulkMuteFindingsCallable; - } - - @Override - public OperationCallable - bulkMuteFindingsOperationCallable() { - return bulkMuteFindingsOperationCallable; - } - - @Override - public UnaryCallable createSourceCallable() { - return createSourceCallable; - } - - @Override - public UnaryCallable createFindingCallable() { - return createFindingCallable; - } - - @Override - public UnaryCallable createMuteConfigCallable() { - return createMuteConfigCallable; - } - - @Override - public UnaryCallable - createNotificationConfigCallable() { - return createNotificationConfigCallable; - } - - @Override - public UnaryCallable deleteMuteConfigCallable() { - return deleteMuteConfigCallable; - } - - @Override - public UnaryCallable deleteNotificationConfigCallable() { - return deleteNotificationConfigCallable; - } - - @Override - public UnaryCallable getBigQueryExportCallable() { - return getBigQueryExportCallable; - } - - @Override - public UnaryCallable getIamPolicyCallable() { - return getIamPolicyCallable; - } - - @Override - public UnaryCallable getMuteConfigCallable() { - return getMuteConfigCallable; - } - - @Override - public UnaryCallable - getNotificationConfigCallable() { - return getNotificationConfigCallable; - } - - @Override - public UnaryCallable - getOrganizationSettingsCallable() { - return getOrganizationSettingsCallable; - } - - @Override - public UnaryCallable getSourceCallable() { - return getSourceCallable; - } - - @Override - public UnaryCallable groupAssetsCallable() { - return groupAssetsCallable; - } - - @Override - public UnaryCallable groupAssetsPagedCallable() { - return groupAssetsPagedCallable; - } - - @Override - public UnaryCallable groupFindingsCallable() { - return groupFindingsCallable; - } - - @Override - public UnaryCallable - groupFindingsPagedCallable() { - return groupFindingsPagedCallable; - } - - @Override - public UnaryCallable listAssetsCallable() { - return listAssetsCallable; - } - - @Override - public UnaryCallable listAssetsPagedCallable() { - return listAssetsPagedCallable; - } - - @Override - public UnaryCallable listFindingsCallable() { - return listFindingsCallable; - } - - @Override - public UnaryCallable listFindingsPagedCallable() { - return listFindingsPagedCallable; - } - - @Override - public UnaryCallable listMuteConfigsCallable() { - return listMuteConfigsCallable; - } - - @Override - public UnaryCallable - listMuteConfigsPagedCallable() { - return listMuteConfigsPagedCallable; - } - - @Override - public UnaryCallable - listNotificationConfigsCallable() { - return listNotificationConfigsCallable; - } - - @Override - public UnaryCallable - listNotificationConfigsPagedCallable() { - return listNotificationConfigsPagedCallable; - } - - @Override - public UnaryCallable listSourcesCallable() { - return listSourcesCallable; - } - - @Override - public UnaryCallable listSourcesPagedCallable() { - return listSourcesPagedCallable; - } - - @Override - public UnaryCallable runAssetDiscoveryCallable() { - return runAssetDiscoveryCallable; - } - - @Override - public OperationCallable - runAssetDiscoveryOperationCallable() { - return runAssetDiscoveryOperationCallable; - } - - @Override - public UnaryCallable setFindingStateCallable() { - return setFindingStateCallable; - } - - @Override - public UnaryCallable setMuteCallable() { - return setMuteCallable; - } - - @Override - public UnaryCallable setIamPolicyCallable() { - return setIamPolicyCallable; - } - - @Override - public UnaryCallable - testIamPermissionsCallable() { - return testIamPermissionsCallable; - } - - @Override - public UnaryCallable updateExternalSystemCallable() { - return updateExternalSystemCallable; - } - - @Override - public UnaryCallable updateFindingCallable() { - return updateFindingCallable; - } - - @Override - public UnaryCallable updateMuteConfigCallable() { - return updateMuteConfigCallable; - } - - @Override - public UnaryCallable - updateNotificationConfigCallable() { - return updateNotificationConfigCallable; - } - - @Override - public UnaryCallable - updateOrganizationSettingsCallable() { - return updateOrganizationSettingsCallable; - } - - @Override - public UnaryCallable updateSourceCallable() { - return updateSourceCallable; - } - - @Override - public UnaryCallable updateSecurityMarksCallable() { - return updateSecurityMarksCallable; - } - - @Override - public UnaryCallable createBigQueryExportCallable() { - return createBigQueryExportCallable; - } - - @Override - public UnaryCallable deleteBigQueryExportCallable() { - return deleteBigQueryExportCallable; - } - - @Override - public UnaryCallable updateBigQueryExportCallable() { - return updateBigQueryExportCallable; - } - - @Override - public UnaryCallable - listBigQueryExportsCallable() { - return listBigQueryExportsCallable; - } - - @Override - public UnaryCallable - listBigQueryExportsPagedCallable() { - return listBigQueryExportsPagedCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStub.java b/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStub.java deleted file mode 100644 index 4207bbc3a47d..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStub.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * Copyright 2022 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.stub; - -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.GroupAssetsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.GroupFindingsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListAssetsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListBigQueryExportsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListFindingsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListMuteConfigsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListNotificationConfigsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListSourcesPagedResponse; - -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.securitycenter.v1.BigQueryExport; -import com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest; -import com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse; -import com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest; -import com.google.cloud.securitycenter.v1.CreateFindingRequest; -import com.google.cloud.securitycenter.v1.CreateMuteConfigRequest; -import com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest; -import com.google.cloud.securitycenter.v1.CreateSourceRequest; -import com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest; -import com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest; -import com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest; -import com.google.cloud.securitycenter.v1.ExternalSystem; -import com.google.cloud.securitycenter.v1.Finding; -import com.google.cloud.securitycenter.v1.GetBigQueryExportRequest; -import com.google.cloud.securitycenter.v1.GetMuteConfigRequest; -import com.google.cloud.securitycenter.v1.GetNotificationConfigRequest; -import com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest; -import com.google.cloud.securitycenter.v1.GetSourceRequest; -import com.google.cloud.securitycenter.v1.GroupAssetsRequest; -import com.google.cloud.securitycenter.v1.GroupAssetsResponse; -import com.google.cloud.securitycenter.v1.GroupFindingsRequest; -import com.google.cloud.securitycenter.v1.GroupFindingsResponse; -import com.google.cloud.securitycenter.v1.ListAssetsRequest; -import com.google.cloud.securitycenter.v1.ListAssetsResponse; -import com.google.cloud.securitycenter.v1.ListBigQueryExportsRequest; -import com.google.cloud.securitycenter.v1.ListBigQueryExportsResponse; -import com.google.cloud.securitycenter.v1.ListFindingsRequest; -import com.google.cloud.securitycenter.v1.ListFindingsResponse; -import com.google.cloud.securitycenter.v1.ListMuteConfigsRequest; -import com.google.cloud.securitycenter.v1.ListMuteConfigsResponse; -import com.google.cloud.securitycenter.v1.ListNotificationConfigsRequest; -import com.google.cloud.securitycenter.v1.ListNotificationConfigsResponse; -import com.google.cloud.securitycenter.v1.ListSourcesRequest; -import com.google.cloud.securitycenter.v1.ListSourcesResponse; -import com.google.cloud.securitycenter.v1.MuteConfig; -import com.google.cloud.securitycenter.v1.NotificationConfig; -import com.google.cloud.securitycenter.v1.OrganizationSettings; -import com.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest; -import com.google.cloud.securitycenter.v1.RunAssetDiscoveryResponse; -import com.google.cloud.securitycenter.v1.SecurityMarks; -import com.google.cloud.securitycenter.v1.SetFindingStateRequest; -import com.google.cloud.securitycenter.v1.SetMuteRequest; -import com.google.cloud.securitycenter.v1.Source; -import com.google.cloud.securitycenter.v1.UpdateBigQueryExportRequest; -import com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest; -import com.google.cloud.securitycenter.v1.UpdateFindingRequest; -import com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest; -import com.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest; -import com.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest; -import com.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest; -import com.google.cloud.securitycenter.v1.UpdateSourceRequest; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import com.google.protobuf.Empty; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the SecurityCenter service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public abstract class SecurityCenterStub implements BackgroundResource { - - public OperationsStub getOperationsStub() { - return null; - } - - public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { - return null; - } - - public OperationCallable - bulkMuteFindingsOperationCallable() { - throw new UnsupportedOperationException("Not implemented: bulkMuteFindingsOperationCallable()"); - } - - public UnaryCallable bulkMuteFindingsCallable() { - throw new UnsupportedOperationException("Not implemented: bulkMuteFindingsCallable()"); - } - - public UnaryCallable createSourceCallable() { - throw new UnsupportedOperationException("Not implemented: createSourceCallable()"); - } - - public UnaryCallable createFindingCallable() { - throw new UnsupportedOperationException("Not implemented: createFindingCallable()"); - } - - public UnaryCallable createMuteConfigCallable() { - throw new UnsupportedOperationException("Not implemented: createMuteConfigCallable()"); - } - - public UnaryCallable - createNotificationConfigCallable() { - throw new UnsupportedOperationException("Not implemented: createNotificationConfigCallable()"); - } - - public UnaryCallable deleteMuteConfigCallable() { - throw new UnsupportedOperationException("Not implemented: deleteMuteConfigCallable()"); - } - - public UnaryCallable deleteNotificationConfigCallable() { - throw new UnsupportedOperationException("Not implemented: deleteNotificationConfigCallable()"); - } - - public UnaryCallable getBigQueryExportCallable() { - throw new UnsupportedOperationException("Not implemented: getBigQueryExportCallable()"); - } - - public UnaryCallable getIamPolicyCallable() { - throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); - } - - public UnaryCallable getMuteConfigCallable() { - throw new UnsupportedOperationException("Not implemented: getMuteConfigCallable()"); - } - - public UnaryCallable - getNotificationConfigCallable() { - throw new UnsupportedOperationException("Not implemented: getNotificationConfigCallable()"); - } - - 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()"); - } - - public UnaryCallable groupAssetsCallable() { - throw new UnsupportedOperationException("Not implemented: groupAssetsCallable()"); - } - - public UnaryCallable - groupFindingsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: groupFindingsPagedCallable()"); - } - - public UnaryCallable groupFindingsCallable() { - throw new UnsupportedOperationException("Not implemented: groupFindingsCallable()"); - } - - public UnaryCallable listAssetsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listAssetsPagedCallable()"); - } - - public UnaryCallable listAssetsCallable() { - throw new UnsupportedOperationException("Not implemented: listAssetsCallable()"); - } - - public UnaryCallable listFindingsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listFindingsPagedCallable()"); - } - - public UnaryCallable listFindingsCallable() { - throw new UnsupportedOperationException("Not implemented: listFindingsCallable()"); - } - - public UnaryCallable - listMuteConfigsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listMuteConfigsPagedCallable()"); - } - - public UnaryCallable listMuteConfigsCallable() { - throw new UnsupportedOperationException("Not implemented: listMuteConfigsCallable()"); - } - - public UnaryCallable - listNotificationConfigsPagedCallable() { - throw new UnsupportedOperationException( - "Not implemented: listNotificationConfigsPagedCallable()"); - } - - public UnaryCallable - listNotificationConfigsCallable() { - throw new UnsupportedOperationException("Not implemented: listNotificationConfigsCallable()"); - } - - public UnaryCallable listSourcesPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listSourcesPagedCallable()"); - } - - public UnaryCallable listSourcesCallable() { - throw new UnsupportedOperationException("Not implemented: listSourcesCallable()"); - } - - public OperationCallable - runAssetDiscoveryOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: runAssetDiscoveryOperationCallable()"); - } - - public UnaryCallable runAssetDiscoveryCallable() { - throw new UnsupportedOperationException("Not implemented: runAssetDiscoveryCallable()"); - } - - public UnaryCallable setFindingStateCallable() { - throw new UnsupportedOperationException("Not implemented: setFindingStateCallable()"); - } - - public UnaryCallable setMuteCallable() { - throw new UnsupportedOperationException("Not implemented: setMuteCallable()"); - } - - public UnaryCallable setIamPolicyCallable() { - throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); - } - - public UnaryCallable - testIamPermissionsCallable() { - throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); - } - - public UnaryCallable updateExternalSystemCallable() { - throw new UnsupportedOperationException("Not implemented: updateExternalSystemCallable()"); - } - - public UnaryCallable updateFindingCallable() { - throw new UnsupportedOperationException("Not implemented: updateFindingCallable()"); - } - - public UnaryCallable updateMuteConfigCallable() { - throw new UnsupportedOperationException("Not implemented: updateMuteConfigCallable()"); - } - - public UnaryCallable - updateNotificationConfigCallable() { - throw new UnsupportedOperationException("Not implemented: updateNotificationConfigCallable()"); - } - - public UnaryCallable - updateOrganizationSettingsCallable() { - throw new UnsupportedOperationException( - "Not implemented: updateOrganizationSettingsCallable()"); - } - - public UnaryCallable updateSourceCallable() { - throw new UnsupportedOperationException("Not implemented: updateSourceCallable()"); - } - - public UnaryCallable updateSecurityMarksCallable() { - throw new UnsupportedOperationException("Not implemented: updateSecurityMarksCallable()"); - } - - public UnaryCallable createBigQueryExportCallable() { - throw new UnsupportedOperationException("Not implemented: createBigQueryExportCallable()"); - } - - public UnaryCallable deleteBigQueryExportCallable() { - throw new UnsupportedOperationException("Not implemented: deleteBigQueryExportCallable()"); - } - - public UnaryCallable updateBigQueryExportCallable() { - throw new UnsupportedOperationException("Not implemented: updateBigQueryExportCallable()"); - } - - public UnaryCallable - listBigQueryExportsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listBigQueryExportsPagedCallable()"); - } - - public UnaryCallable - listBigQueryExportsCallable() { - throw new UnsupportedOperationException("Not implemented: listBigQueryExportsCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStubSettings.java b/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStubSettings.java deleted file mode 100644 index a8b42316262a..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStubSettings.java +++ /dev/null @@ -1,1891 +0,0 @@ -/* - * Copyright 2022 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.stub; - -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.GroupAssetsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.GroupFindingsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListAssetsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListBigQueryExportsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListFindingsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListMuteConfigsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListNotificationConfigsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListSourcesPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.grpc.ProtoOperationTransformers; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.HttpJsonTransportChannel; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.longrunning.OperationSnapshot; -import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.PagedListDescriptor; -import com.google.api.gax.rpc.PagedListResponseFactory; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.securitycenter.v1.BigQueryExport; -import com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest; -import com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse; -import com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest; -import com.google.cloud.securitycenter.v1.CreateFindingRequest; -import com.google.cloud.securitycenter.v1.CreateMuteConfigRequest; -import com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest; -import com.google.cloud.securitycenter.v1.CreateSourceRequest; -import com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest; -import com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest; -import com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest; -import com.google.cloud.securitycenter.v1.ExternalSystem; -import com.google.cloud.securitycenter.v1.Finding; -import com.google.cloud.securitycenter.v1.GetBigQueryExportRequest; -import com.google.cloud.securitycenter.v1.GetMuteConfigRequest; -import com.google.cloud.securitycenter.v1.GetNotificationConfigRequest; -import com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest; -import com.google.cloud.securitycenter.v1.GetSourceRequest; -import com.google.cloud.securitycenter.v1.GroupAssetsRequest; -import com.google.cloud.securitycenter.v1.GroupAssetsResponse; -import com.google.cloud.securitycenter.v1.GroupFindingsRequest; -import com.google.cloud.securitycenter.v1.GroupFindingsResponse; -import com.google.cloud.securitycenter.v1.GroupResult; -import com.google.cloud.securitycenter.v1.ListAssetsRequest; -import com.google.cloud.securitycenter.v1.ListAssetsResponse; -import com.google.cloud.securitycenter.v1.ListBigQueryExportsRequest; -import com.google.cloud.securitycenter.v1.ListBigQueryExportsResponse; -import com.google.cloud.securitycenter.v1.ListFindingsRequest; -import com.google.cloud.securitycenter.v1.ListFindingsResponse; -import com.google.cloud.securitycenter.v1.ListMuteConfigsRequest; -import com.google.cloud.securitycenter.v1.ListMuteConfigsResponse; -import com.google.cloud.securitycenter.v1.ListNotificationConfigsRequest; -import com.google.cloud.securitycenter.v1.ListNotificationConfigsResponse; -import com.google.cloud.securitycenter.v1.ListSourcesRequest; -import com.google.cloud.securitycenter.v1.ListSourcesResponse; -import com.google.cloud.securitycenter.v1.MuteConfig; -import com.google.cloud.securitycenter.v1.NotificationConfig; -import com.google.cloud.securitycenter.v1.OrganizationSettings; -import com.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest; -import com.google.cloud.securitycenter.v1.RunAssetDiscoveryResponse; -import com.google.cloud.securitycenter.v1.SecurityMarks; -import com.google.cloud.securitycenter.v1.SetFindingStateRequest; -import com.google.cloud.securitycenter.v1.SetMuteRequest; -import com.google.cloud.securitycenter.v1.Source; -import com.google.cloud.securitycenter.v1.UpdateBigQueryExportRequest; -import com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest; -import com.google.cloud.securitycenter.v1.UpdateFindingRequest; -import com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest; -import com.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest; -import com.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest; -import com.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest; -import com.google.cloud.securitycenter.v1.UpdateSourceRequest; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; -import org.threeten.bp.Duration; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link SecurityCenterStub}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (securitycenter.googleapis.com) and default port (443) are - * used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

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: - * - *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * SecurityCenterStubSettings.Builder securityCenterSettingsBuilder =
- *     SecurityCenterStubSettings.newBuilder();
- * securityCenterSettingsBuilder
- *     .createSourceSettings()
- *     .setRetrySettings(
- *         securityCenterSettingsBuilder
- *             .createSourceSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * SecurityCenterStubSettings securityCenterSettings = securityCenterSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class SecurityCenterStubSettings extends StubSettings { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); - - private final UnaryCallSettings bulkMuteFindingsSettings; - private final OperationCallSettings - bulkMuteFindingsOperationSettings; - private final UnaryCallSettings createSourceSettings; - private final UnaryCallSettings createFindingSettings; - private final UnaryCallSettings createMuteConfigSettings; - private final UnaryCallSettings - createNotificationConfigSettings; - private final UnaryCallSettings deleteMuteConfigSettings; - private final UnaryCallSettings - deleteNotificationConfigSettings; - private final UnaryCallSettings - getBigQueryExportSettings; - private final UnaryCallSettings getIamPolicySettings; - private final UnaryCallSettings getMuteConfigSettings; - private final UnaryCallSettings - getNotificationConfigSettings; - private final UnaryCallSettings - getOrganizationSettingsSettings; - private final UnaryCallSettings getSourceSettings; - private final PagedCallSettings - groupAssetsSettings; - private final PagedCallSettings< - GroupFindingsRequest, GroupFindingsResponse, GroupFindingsPagedResponse> - groupFindingsSettings; - private final PagedCallSettings - listAssetsSettings; - private final PagedCallSettings< - ListFindingsRequest, ListFindingsResponse, ListFindingsPagedResponse> - listFindingsSettings; - private final PagedCallSettings< - ListMuteConfigsRequest, ListMuteConfigsResponse, ListMuteConfigsPagedResponse> - listMuteConfigsSettings; - private final PagedCallSettings< - ListNotificationConfigsRequest, ListNotificationConfigsResponse, - ListNotificationConfigsPagedResponse> - listNotificationConfigsSettings; - private final PagedCallSettings - listSourcesSettings; - private final UnaryCallSettings runAssetDiscoverySettings; - private final OperationCallSettings - runAssetDiscoveryOperationSettings; - private final UnaryCallSettings setFindingStateSettings; - private final UnaryCallSettings setMuteSettings; - private final UnaryCallSettings setIamPolicySettings; - private final UnaryCallSettings - testIamPermissionsSettings; - private final UnaryCallSettings - updateExternalSystemSettings; - private final UnaryCallSettings updateFindingSettings; - private final UnaryCallSettings updateMuteConfigSettings; - private final UnaryCallSettings - updateNotificationConfigSettings; - private final UnaryCallSettings - updateOrganizationSettingsSettings; - private final UnaryCallSettings updateSourceSettings; - private final UnaryCallSettings - updateSecurityMarksSettings; - private final UnaryCallSettings - createBigQueryExportSettings; - private final UnaryCallSettings deleteBigQueryExportSettings; - private final UnaryCallSettings - updateBigQueryExportSettings; - private final PagedCallSettings< - ListBigQueryExportsRequest, ListBigQueryExportsResponse, ListBigQueryExportsPagedResponse> - listBigQueryExportsSettings; - - private static final PagedListDescriptor - GROUP_ASSETS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public GroupAssetsRequest injectToken(GroupAssetsRequest payload, String token) { - return GroupAssetsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public GroupAssetsRequest injectPageSize(GroupAssetsRequest payload, int pageSize) { - return GroupAssetsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(GroupAssetsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(GroupAssetsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(GroupAssetsResponse payload) { - return payload.getGroupByResultsList() == null - ? ImmutableList.of() - : payload.getGroupByResultsList(); - } - }; - - private static final PagedListDescriptor - GROUP_FINDINGS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public GroupFindingsRequest injectToken(GroupFindingsRequest payload, String token) { - return GroupFindingsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public GroupFindingsRequest injectPageSize(GroupFindingsRequest payload, int pageSize) { - return GroupFindingsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(GroupFindingsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(GroupFindingsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(GroupFindingsResponse payload) { - return payload.getGroupByResultsList() == null - ? ImmutableList.of() - : payload.getGroupByResultsList(); - } - }; - - private static final PagedListDescriptor< - ListAssetsRequest, ListAssetsResponse, ListAssetsResponse.ListAssetsResult> - LIST_ASSETS_PAGE_STR_DESC = - new PagedListDescriptor< - ListAssetsRequest, ListAssetsResponse, ListAssetsResponse.ListAssetsResult>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListAssetsRequest injectToken(ListAssetsRequest payload, String token) { - return ListAssetsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListAssetsRequest injectPageSize(ListAssetsRequest payload, int pageSize) { - return ListAssetsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListAssetsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListAssetsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources( - ListAssetsResponse payload) { - return payload.getListAssetsResultsList() == null - ? ImmutableList.of() - : payload.getListAssetsResultsList(); - } - }; - - private static final PagedListDescriptor< - ListFindingsRequest, ListFindingsResponse, ListFindingsResponse.ListFindingsResult> - LIST_FINDINGS_PAGE_STR_DESC = - new PagedListDescriptor< - ListFindingsRequest, ListFindingsResponse, - ListFindingsResponse.ListFindingsResult>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListFindingsRequest injectToken(ListFindingsRequest payload, String token) { - return ListFindingsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListFindingsRequest injectPageSize(ListFindingsRequest payload, int pageSize) { - return ListFindingsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListFindingsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListFindingsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources( - ListFindingsResponse payload) { - return payload.getListFindingsResultsList() == null - ? ImmutableList.of() - : payload.getListFindingsResultsList(); - } - }; - - private static final PagedListDescriptor< - ListMuteConfigsRequest, ListMuteConfigsResponse, MuteConfig> - LIST_MUTE_CONFIGS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListMuteConfigsRequest injectToken( - ListMuteConfigsRequest payload, String token) { - return ListMuteConfigsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListMuteConfigsRequest injectPageSize( - ListMuteConfigsRequest payload, int pageSize) { - return ListMuteConfigsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListMuteConfigsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListMuteConfigsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListMuteConfigsResponse payload) { - return payload.getMuteConfigsList() == null - ? ImmutableList.of() - : payload.getMuteConfigsList(); - } - }; - - private static final PagedListDescriptor< - ListNotificationConfigsRequest, ListNotificationConfigsResponse, NotificationConfig> - LIST_NOTIFICATION_CONFIGS_PAGE_STR_DESC = - new PagedListDescriptor< - ListNotificationConfigsRequest, ListNotificationConfigsResponse, - NotificationConfig>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListNotificationConfigsRequest injectToken( - ListNotificationConfigsRequest payload, String token) { - return ListNotificationConfigsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListNotificationConfigsRequest injectPageSize( - ListNotificationConfigsRequest payload, int pageSize) { - return ListNotificationConfigsRequest.newBuilder(payload) - .setPageSize(pageSize) - .build(); - } - - @Override - public Integer extractPageSize(ListNotificationConfigsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListNotificationConfigsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources( - ListNotificationConfigsResponse payload) { - return payload.getNotificationConfigsList() == null - ? ImmutableList.of() - : payload.getNotificationConfigsList(); - } - }; - - private static final PagedListDescriptor - LIST_SOURCES_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListSourcesRequest injectToken(ListSourcesRequest payload, String token) { - return ListSourcesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListSourcesRequest injectPageSize(ListSourcesRequest payload, int pageSize) { - return ListSourcesRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListSourcesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListSourcesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListSourcesResponse payload) { - return payload.getSourcesList() == null - ? ImmutableList.of() - : payload.getSourcesList(); - } - }; - - private static final PagedListDescriptor< - ListBigQueryExportsRequest, ListBigQueryExportsResponse, BigQueryExport> - LIST_BIG_QUERY_EXPORTS_PAGE_STR_DESC = - new PagedListDescriptor< - ListBigQueryExportsRequest, ListBigQueryExportsResponse, BigQueryExport>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListBigQueryExportsRequest injectToken( - ListBigQueryExportsRequest payload, String token) { - return ListBigQueryExportsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListBigQueryExportsRequest injectPageSize( - ListBigQueryExportsRequest payload, int pageSize) { - return ListBigQueryExportsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListBigQueryExportsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListBigQueryExportsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListBigQueryExportsResponse payload) { - return payload.getBigQueryExportsList() == null - ? ImmutableList.of() - : payload.getBigQueryExportsList(); - } - }; - - private static final PagedListResponseFactory< - GroupAssetsRequest, GroupAssetsResponse, GroupAssetsPagedResponse> - GROUP_ASSETS_PAGE_STR_FACT = - new PagedListResponseFactory< - GroupAssetsRequest, GroupAssetsResponse, GroupAssetsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - GroupAssetsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, GROUP_ASSETS_PAGE_STR_DESC, request, context); - return GroupAssetsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - GroupFindingsRequest, GroupFindingsResponse, GroupFindingsPagedResponse> - GROUP_FINDINGS_PAGE_STR_FACT = - new PagedListResponseFactory< - GroupFindingsRequest, GroupFindingsResponse, GroupFindingsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - GroupFindingsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, GROUP_FINDINGS_PAGE_STR_DESC, request, context); - return GroupFindingsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListAssetsRequest, ListAssetsResponse, ListAssetsPagedResponse> - LIST_ASSETS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListAssetsRequest, ListAssetsResponse, ListAssetsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListAssetsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext< - ListAssetsRequest, ListAssetsResponse, ListAssetsResponse.ListAssetsResult> - pageContext = - PageContext.create(callable, LIST_ASSETS_PAGE_STR_DESC, request, context); - return ListAssetsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListFindingsRequest, ListFindingsResponse, ListFindingsPagedResponse> - LIST_FINDINGS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListFindingsRequest, ListFindingsResponse, ListFindingsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListFindingsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext< - ListFindingsRequest, ListFindingsResponse, - ListFindingsResponse.ListFindingsResult> - pageContext = - PageContext.create(callable, LIST_FINDINGS_PAGE_STR_DESC, request, context); - return ListFindingsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListMuteConfigsRequest, ListMuteConfigsResponse, ListMuteConfigsPagedResponse> - LIST_MUTE_CONFIGS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListMuteConfigsRequest, ListMuteConfigsResponse, ListMuteConfigsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListMuteConfigsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_MUTE_CONFIGS_PAGE_STR_DESC, request, context); - return ListMuteConfigsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListNotificationConfigsRequest, ListNotificationConfigsResponse, - ListNotificationConfigsPagedResponse> - LIST_NOTIFICATION_CONFIGS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListNotificationConfigsRequest, ListNotificationConfigsResponse, - ListNotificationConfigsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable - callable, - ListNotificationConfigsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext< - ListNotificationConfigsRequest, ListNotificationConfigsResponse, - NotificationConfig> - pageContext = - PageContext.create( - callable, LIST_NOTIFICATION_CONFIGS_PAGE_STR_DESC, request, context); - return ListNotificationConfigsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListSourcesRequest, ListSourcesResponse, ListSourcesPagedResponse> - LIST_SOURCES_PAGE_STR_FACT = - new PagedListResponseFactory< - ListSourcesRequest, ListSourcesResponse, ListSourcesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListSourcesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_SOURCES_PAGE_STR_DESC, request, context); - return ListSourcesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListBigQueryExportsRequest, ListBigQueryExportsResponse, ListBigQueryExportsPagedResponse> - LIST_BIG_QUERY_EXPORTS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListBigQueryExportsRequest, ListBigQueryExportsResponse, - ListBigQueryExportsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListBigQueryExportsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext - pageContext = - PageContext.create( - callable, LIST_BIG_QUERY_EXPORTS_PAGE_STR_DESC, request, context); - return ListBigQueryExportsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - /** Returns the object with the settings used for calls to bulkMuteFindings. */ - public UnaryCallSettings bulkMuteFindingsSettings() { - return bulkMuteFindingsSettings; - } - - /** Returns the object with the settings used for calls to bulkMuteFindings. */ - public OperationCallSettings - bulkMuteFindingsOperationSettings() { - return bulkMuteFindingsOperationSettings; - } - - /** Returns the object with the settings used for calls to createSource. */ - public UnaryCallSettings createSourceSettings() { - return createSourceSettings; - } - - /** Returns the object with the settings used for calls to createFinding. */ - public UnaryCallSettings createFindingSettings() { - return createFindingSettings; - } - - /** Returns the object with the settings used for calls to createMuteConfig. */ - public UnaryCallSettings createMuteConfigSettings() { - return createMuteConfigSettings; - } - - /** Returns the object with the settings used for calls to createNotificationConfig. */ - public UnaryCallSettings - createNotificationConfigSettings() { - return createNotificationConfigSettings; - } - - /** Returns the object with the settings used for calls to deleteMuteConfig. */ - public UnaryCallSettings deleteMuteConfigSettings() { - return deleteMuteConfigSettings; - } - - /** Returns the object with the settings used for calls to deleteNotificationConfig. */ - public UnaryCallSettings - deleteNotificationConfigSettings() { - return deleteNotificationConfigSettings; - } - - /** Returns the object with the settings used for calls to getBigQueryExport. */ - public UnaryCallSettings getBigQueryExportSettings() { - return getBigQueryExportSettings; - } - - /** 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 getMuteConfig. */ - public UnaryCallSettings getMuteConfigSettings() { - return getMuteConfigSettings; - } - - /** Returns the object with the settings used for calls to getNotificationConfig. */ - public UnaryCallSettings - getNotificationConfigSettings() { - return getNotificationConfigSettings; - } - - /** Returns the object with the settings used for calls to getOrganizationSettings. */ - public UnaryCallSettings - getOrganizationSettingsSettings() { - return getOrganizationSettingsSettings; - } - - /** Returns the object with the settings used for calls to getSource. */ - 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() { - return listAssetsSettings; - } - - /** Returns the object with the settings used for calls to listFindings. */ - public PagedCallSettings - listFindingsSettings() { - return listFindingsSettings; - } - - /** Returns the object with the settings used for calls to listMuteConfigs. */ - public PagedCallSettings< - ListMuteConfigsRequest, ListMuteConfigsResponse, ListMuteConfigsPagedResponse> - listMuteConfigsSettings() { - return listMuteConfigsSettings; - } - - /** Returns the object with the settings used for calls to listNotificationConfigs. */ - public PagedCallSettings< - ListNotificationConfigsRequest, ListNotificationConfigsResponse, - ListNotificationConfigsPagedResponse> - listNotificationConfigsSettings() { - return listNotificationConfigsSettings; - } - - /** Returns the object with the settings used for calls to listSources. */ - public PagedCallSettings - listSourcesSettings() { - return listSourcesSettings; - } - - /** Returns the object with the settings used for calls to runAssetDiscovery. */ - public UnaryCallSettings runAssetDiscoverySettings() { - return runAssetDiscoverySettings; - } - - /** Returns the object with the settings used for calls to runAssetDiscovery. */ - public OperationCallSettings - runAssetDiscoveryOperationSettings() { - return runAssetDiscoveryOperationSettings; - } - - /** Returns the object with the settings used for calls to setFindingState. */ - public UnaryCallSettings setFindingStateSettings() { - return setFindingStateSettings; - } - - /** Returns the object with the settings used for calls to setMute. */ - public UnaryCallSettings setMuteSettings() { - return setMuteSettings; - } - - /** Returns the object with the settings used for calls to setIamPolicy. */ - 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 updateExternalSystem. */ - public UnaryCallSettings - updateExternalSystemSettings() { - return updateExternalSystemSettings; - } - - /** Returns the object with the settings used for calls to updateFinding. */ - public UnaryCallSettings updateFindingSettings() { - return updateFindingSettings; - } - - /** Returns the object with the settings used for calls to updateMuteConfig. */ - public UnaryCallSettings updateMuteConfigSettings() { - return updateMuteConfigSettings; - } - - /** Returns the object with the settings used for calls to updateNotificationConfig. */ - public UnaryCallSettings - updateNotificationConfigSettings() { - return updateNotificationConfigSettings; - } - - /** Returns the object with the settings used for calls to updateOrganizationSettings. */ - public UnaryCallSettings - updateOrganizationSettingsSettings() { - return updateOrganizationSettingsSettings; - } - - /** Returns the object with the settings used for calls to updateSource. */ - public UnaryCallSettings updateSourceSettings() { - return updateSourceSettings; - } - - /** Returns the object with the settings used for calls to updateSecurityMarks. */ - public UnaryCallSettings - updateSecurityMarksSettings() { - return updateSecurityMarksSettings; - } - - /** Returns the object with the settings used for calls to createBigQueryExport. */ - public UnaryCallSettings - createBigQueryExportSettings() { - return createBigQueryExportSettings; - } - - /** Returns the object with the settings used for calls to deleteBigQueryExport. */ - public UnaryCallSettings deleteBigQueryExportSettings() { - return deleteBigQueryExportSettings; - } - - /** Returns the object with the settings used for calls to updateBigQueryExport. */ - public UnaryCallSettings - updateBigQueryExportSettings() { - return updateBigQueryExportSettings; - } - - /** Returns the object with the settings used for calls to listBigQueryExports. */ - public PagedCallSettings< - ListBigQueryExportsRequest, ListBigQueryExportsResponse, ListBigQueryExportsPagedResponse> - listBigQueryExportsSettings() { - return listBigQueryExportsSettings; - } - - public SecurityCenterStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcSecurityCenterStub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonSecurityCenterStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "securitycenter.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "securitycenter.mtls.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder() - .setScopesToApply(DEFAULT_SERVICE_SCOPES) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return InstantiatingHttpJsonChannelProvider.newBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(SecurityCenterStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(SecurityCenterStubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return SecurityCenterStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected SecurityCenterStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - bulkMuteFindingsSettings = settingsBuilder.bulkMuteFindingsSettings().build(); - bulkMuteFindingsOperationSettings = settingsBuilder.bulkMuteFindingsOperationSettings().build(); - createSourceSettings = settingsBuilder.createSourceSettings().build(); - createFindingSettings = settingsBuilder.createFindingSettings().build(); - createMuteConfigSettings = settingsBuilder.createMuteConfigSettings().build(); - createNotificationConfigSettings = settingsBuilder.createNotificationConfigSettings().build(); - deleteMuteConfigSettings = settingsBuilder.deleteMuteConfigSettings().build(); - deleteNotificationConfigSettings = settingsBuilder.deleteNotificationConfigSettings().build(); - getBigQueryExportSettings = settingsBuilder.getBigQueryExportSettings().build(); - getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); - getMuteConfigSettings = settingsBuilder.getMuteConfigSettings().build(); - getNotificationConfigSettings = settingsBuilder.getNotificationConfigSettings().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(); - listMuteConfigsSettings = settingsBuilder.listMuteConfigsSettings().build(); - listNotificationConfigsSettings = settingsBuilder.listNotificationConfigsSettings().build(); - listSourcesSettings = settingsBuilder.listSourcesSettings().build(); - runAssetDiscoverySettings = settingsBuilder.runAssetDiscoverySettings().build(); - runAssetDiscoveryOperationSettings = - settingsBuilder.runAssetDiscoveryOperationSettings().build(); - setFindingStateSettings = settingsBuilder.setFindingStateSettings().build(); - setMuteSettings = settingsBuilder.setMuteSettings().build(); - setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); - testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); - updateExternalSystemSettings = settingsBuilder.updateExternalSystemSettings().build(); - updateFindingSettings = settingsBuilder.updateFindingSettings().build(); - updateMuteConfigSettings = settingsBuilder.updateMuteConfigSettings().build(); - updateNotificationConfigSettings = settingsBuilder.updateNotificationConfigSettings().build(); - updateOrganizationSettingsSettings = - settingsBuilder.updateOrganizationSettingsSettings().build(); - updateSourceSettings = settingsBuilder.updateSourceSettings().build(); - updateSecurityMarksSettings = settingsBuilder.updateSecurityMarksSettings().build(); - createBigQueryExportSettings = settingsBuilder.createBigQueryExportSettings().build(); - deleteBigQueryExportSettings = settingsBuilder.deleteBigQueryExportSettings().build(); - updateBigQueryExportSettings = settingsBuilder.updateBigQueryExportSettings().build(); - listBigQueryExportsSettings = settingsBuilder.listBigQueryExportsSettings().build(); - } - - /** Builder for SecurityCenterStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder - bulkMuteFindingsSettings; - private final OperationCallSettings.Builder< - BulkMuteFindingsRequest, BulkMuteFindingsResponse, Empty> - bulkMuteFindingsOperationSettings; - private final UnaryCallSettings.Builder createSourceSettings; - private final UnaryCallSettings.Builder createFindingSettings; - private final UnaryCallSettings.Builder - createMuteConfigSettings; - private final UnaryCallSettings.Builder - createNotificationConfigSettings; - private final UnaryCallSettings.Builder - deleteMuteConfigSettings; - private final UnaryCallSettings.Builder - deleteNotificationConfigSettings; - private final UnaryCallSettings.Builder - getBigQueryExportSettings; - private final UnaryCallSettings.Builder getIamPolicySettings; - private final UnaryCallSettings.Builder getMuteConfigSettings; - private final UnaryCallSettings.Builder - getNotificationConfigSettings; - 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 PagedCallSettings.Builder< - ListAssetsRequest, ListAssetsResponse, ListAssetsPagedResponse> - listAssetsSettings; - private final PagedCallSettings.Builder< - ListFindingsRequest, ListFindingsResponse, ListFindingsPagedResponse> - listFindingsSettings; - private final PagedCallSettings.Builder< - ListMuteConfigsRequest, ListMuteConfigsResponse, ListMuteConfigsPagedResponse> - listMuteConfigsSettings; - private final PagedCallSettings.Builder< - ListNotificationConfigsRequest, ListNotificationConfigsResponse, - ListNotificationConfigsPagedResponse> - listNotificationConfigsSettings; - private final PagedCallSettings.Builder< - ListSourcesRequest, ListSourcesResponse, ListSourcesPagedResponse> - listSourcesSettings; - private final UnaryCallSettings.Builder - runAssetDiscoverySettings; - private final OperationCallSettings.Builder< - RunAssetDiscoveryRequest, RunAssetDiscoveryResponse, Empty> - runAssetDiscoveryOperationSettings; - private final UnaryCallSettings.Builder - setFindingStateSettings; - private final UnaryCallSettings.Builder setMuteSettings; - private final UnaryCallSettings.Builder setIamPolicySettings; - private final UnaryCallSettings.Builder - testIamPermissionsSettings; - private final UnaryCallSettings.Builder - updateExternalSystemSettings; - private final UnaryCallSettings.Builder updateFindingSettings; - private final UnaryCallSettings.Builder - updateMuteConfigSettings; - private final UnaryCallSettings.Builder - updateNotificationConfigSettings; - private final UnaryCallSettings.Builder - updateOrganizationSettingsSettings; - private final UnaryCallSettings.Builder updateSourceSettings; - private final UnaryCallSettings.Builder - updateSecurityMarksSettings; - private final UnaryCallSettings.Builder - createBigQueryExportSettings; - private final UnaryCallSettings.Builder - deleteBigQueryExportSettings; - private final UnaryCallSettings.Builder - updateBigQueryExportSettings; - private final PagedCallSettings.Builder< - ListBigQueryExportsRequest, ListBigQueryExportsResponse, - ListBigQueryExportsPagedResponse> - listBigQueryExportsSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_0_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "retry_policy_1_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); - definitions.put( - "retry_policy_3_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); - definitions.put( - "no_retry_2_codes", ImmutableSet.copyOf(Lists.newArrayList())); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); - definitions.put("no_retry_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(60000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(60000L)) - .setTotalTimeout(Duration.ofMillis(60000L)) - .build(); - definitions.put("no_retry_0_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(60000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(60000L)) - .setTotalTimeout(Duration.ofMillis(60000L)) - .build(); - definitions.put("retry_policy_1_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(480000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(480000L)) - .setTotalTimeout(Duration.ofMillis(480000L)) - .build(); - definitions.put("retry_policy_3_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(480000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(480000L)) - .setTotalTimeout(Duration.ofMillis(480000L)) - .build(); - definitions.put("no_retry_2_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - bulkMuteFindingsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - bulkMuteFindingsOperationSettings = OperationCallSettings.newBuilder(); - createSourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createFindingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createMuteConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createNotificationConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteMuteConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteNotificationConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getBigQueryExportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getMuteConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getNotificationConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getOrganizationSettingsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getSourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - groupAssetsSettings = PagedCallSettings.newBuilder(GROUP_ASSETS_PAGE_STR_FACT); - groupFindingsSettings = PagedCallSettings.newBuilder(GROUP_FINDINGS_PAGE_STR_FACT); - listAssetsSettings = PagedCallSettings.newBuilder(LIST_ASSETS_PAGE_STR_FACT); - listFindingsSettings = PagedCallSettings.newBuilder(LIST_FINDINGS_PAGE_STR_FACT); - listMuteConfigsSettings = PagedCallSettings.newBuilder(LIST_MUTE_CONFIGS_PAGE_STR_FACT); - listNotificationConfigsSettings = - PagedCallSettings.newBuilder(LIST_NOTIFICATION_CONFIGS_PAGE_STR_FACT); - listSourcesSettings = PagedCallSettings.newBuilder(LIST_SOURCES_PAGE_STR_FACT); - runAssetDiscoverySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - runAssetDiscoveryOperationSettings = OperationCallSettings.newBuilder(); - setFindingStateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - setMuteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateExternalSystemSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateFindingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateMuteConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateNotificationConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateOrganizationSettingsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateSourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateSecurityMarksSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createBigQueryExportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteBigQueryExportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateBigQueryExportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listBigQueryExportsSettings = - PagedCallSettings.newBuilder(LIST_BIG_QUERY_EXPORTS_PAGE_STR_FACT); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - bulkMuteFindingsSettings, - createSourceSettings, - createFindingSettings, - createMuteConfigSettings, - createNotificationConfigSettings, - deleteMuteConfigSettings, - deleteNotificationConfigSettings, - getBigQueryExportSettings, - getIamPolicySettings, - getMuteConfigSettings, - getNotificationConfigSettings, - getOrganizationSettingsSettings, - getSourceSettings, - groupAssetsSettings, - groupFindingsSettings, - listAssetsSettings, - listFindingsSettings, - listMuteConfigsSettings, - listNotificationConfigsSettings, - listSourcesSettings, - runAssetDiscoverySettings, - setFindingStateSettings, - setMuteSettings, - setIamPolicySettings, - testIamPermissionsSettings, - updateExternalSystemSettings, - updateFindingSettings, - updateMuteConfigSettings, - updateNotificationConfigSettings, - updateOrganizationSettingsSettings, - updateSourceSettings, - updateSecurityMarksSettings, - createBigQueryExportSettings, - deleteBigQueryExportSettings, - updateBigQueryExportSettings, - listBigQueryExportsSettings); - initDefaults(this); - } - - protected Builder(SecurityCenterStubSettings settings) { - super(settings); - - bulkMuteFindingsSettings = settings.bulkMuteFindingsSettings.toBuilder(); - bulkMuteFindingsOperationSettings = settings.bulkMuteFindingsOperationSettings.toBuilder(); - createSourceSettings = settings.createSourceSettings.toBuilder(); - createFindingSettings = settings.createFindingSettings.toBuilder(); - createMuteConfigSettings = settings.createMuteConfigSettings.toBuilder(); - createNotificationConfigSettings = settings.createNotificationConfigSettings.toBuilder(); - deleteMuteConfigSettings = settings.deleteMuteConfigSettings.toBuilder(); - deleteNotificationConfigSettings = settings.deleteNotificationConfigSettings.toBuilder(); - getBigQueryExportSettings = settings.getBigQueryExportSettings.toBuilder(); - getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); - getMuteConfigSettings = settings.getMuteConfigSettings.toBuilder(); - getNotificationConfigSettings = settings.getNotificationConfigSettings.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(); - listMuteConfigsSettings = settings.listMuteConfigsSettings.toBuilder(); - listNotificationConfigsSettings = settings.listNotificationConfigsSettings.toBuilder(); - listSourcesSettings = settings.listSourcesSettings.toBuilder(); - runAssetDiscoverySettings = settings.runAssetDiscoverySettings.toBuilder(); - runAssetDiscoveryOperationSettings = settings.runAssetDiscoveryOperationSettings.toBuilder(); - setFindingStateSettings = settings.setFindingStateSettings.toBuilder(); - setMuteSettings = settings.setMuteSettings.toBuilder(); - setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); - testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); - updateExternalSystemSettings = settings.updateExternalSystemSettings.toBuilder(); - updateFindingSettings = settings.updateFindingSettings.toBuilder(); - updateMuteConfigSettings = settings.updateMuteConfigSettings.toBuilder(); - updateNotificationConfigSettings = settings.updateNotificationConfigSettings.toBuilder(); - updateOrganizationSettingsSettings = settings.updateOrganizationSettingsSettings.toBuilder(); - updateSourceSettings = settings.updateSourceSettings.toBuilder(); - updateSecurityMarksSettings = settings.updateSecurityMarksSettings.toBuilder(); - createBigQueryExportSettings = settings.createBigQueryExportSettings.toBuilder(); - deleteBigQueryExportSettings = settings.deleteBigQueryExportSettings.toBuilder(); - updateBigQueryExportSettings = settings.updateBigQueryExportSettings.toBuilder(); - listBigQueryExportsSettings = settings.listBigQueryExportsSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - bulkMuteFindingsSettings, - createSourceSettings, - createFindingSettings, - createMuteConfigSettings, - createNotificationConfigSettings, - deleteMuteConfigSettings, - deleteNotificationConfigSettings, - getBigQueryExportSettings, - getIamPolicySettings, - getMuteConfigSettings, - getNotificationConfigSettings, - getOrganizationSettingsSettings, - getSourceSettings, - groupAssetsSettings, - groupFindingsSettings, - listAssetsSettings, - listFindingsSettings, - listMuteConfigsSettings, - listNotificationConfigsSettings, - listSourcesSettings, - runAssetDiscoverySettings, - setFindingStateSettings, - setMuteSettings, - setIamPolicySettings, - testIamPermissionsSettings, - updateExternalSystemSettings, - updateFindingSettings, - updateMuteConfigSettings, - updateNotificationConfigSettings, - updateOrganizationSettingsSettings, - updateSourceSettings, - updateSecurityMarksSettings, - createBigQueryExportSettings, - deleteBigQueryExportSettings, - updateBigQueryExportSettings, - listBigQueryExportsSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder createHttpJsonDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .bulkMuteFindingsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .createSourceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); - - builder - .createFindingSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); - - builder - .createMuteConfigSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .createNotificationConfigSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); - - builder - .deleteMuteConfigSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .deleteNotificationConfigSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); - - builder - .getBigQueryExportSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .getIamPolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .getMuteConfigSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .getNotificationConfigSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .getOrganizationSettingsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .getSourceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .groupAssetsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); - - builder - .groupFindingsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); - - builder - .listAssetsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); - - builder - .listFindingsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); - - builder - .listMuteConfigsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .listNotificationConfigsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .listSourcesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .runAssetDiscoverySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); - - builder - .setFindingStateSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); - - builder - .setMuteSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .setIamPolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); - - builder - .testIamPermissionsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .updateExternalSystemSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .updateFindingSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); - - builder - .updateMuteConfigSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .updateNotificationConfigSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); - - builder - .updateOrganizationSettingsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); - - builder - .updateSourceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); - - builder - .updateSecurityMarksSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); - - builder - .createBigQueryExportSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .deleteBigQueryExportSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .updateBigQueryExportSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .listBigQueryExportsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .bulkMuteFindingsOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(BulkMuteFindingsResponse.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(Empty.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - - builder - .runAssetDiscoveryOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create( - RunAssetDiscoveryResponse.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(Empty.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - - return builder; - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to bulkMuteFindings. */ - public UnaryCallSettings.Builder - bulkMuteFindingsSettings() { - return bulkMuteFindingsSettings; - } - - /** Returns the builder for the settings used for calls to bulkMuteFindings. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - bulkMuteFindingsOperationSettings() { - return bulkMuteFindingsOperationSettings; - } - - /** Returns the builder for the settings used for calls to createSource. */ - public UnaryCallSettings.Builder createSourceSettings() { - return createSourceSettings; - } - - /** Returns the builder for the settings used for calls to createFinding. */ - public UnaryCallSettings.Builder createFindingSettings() { - return createFindingSettings; - } - - /** Returns the builder for the settings used for calls to createMuteConfig. */ - public UnaryCallSettings.Builder - createMuteConfigSettings() { - return createMuteConfigSettings; - } - - /** Returns the builder for the settings used for calls to createNotificationConfig. */ - public UnaryCallSettings.Builder - createNotificationConfigSettings() { - return createNotificationConfigSettings; - } - - /** Returns the builder for the settings used for calls to deleteMuteConfig. */ - public UnaryCallSettings.Builder deleteMuteConfigSettings() { - return deleteMuteConfigSettings; - } - - /** Returns the builder for the settings used for calls to deleteNotificationConfig. */ - public UnaryCallSettings.Builder - deleteNotificationConfigSettings() { - return deleteNotificationConfigSettings; - } - - /** Returns the builder for the settings used for calls to getBigQueryExport. */ - public UnaryCallSettings.Builder - getBigQueryExportSettings() { - return getBigQueryExportSettings; - } - - /** 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 getMuteConfig. */ - public UnaryCallSettings.Builder getMuteConfigSettings() { - return getMuteConfigSettings; - } - - /** Returns the builder for the settings used for calls to getNotificationConfig. */ - public UnaryCallSettings.Builder - getNotificationConfigSettings() { - return getNotificationConfigSettings; - } - - /** Returns the builder for the settings used for calls to getOrganizationSettings. */ - public UnaryCallSettings.Builder - getOrganizationSettingsSettings() { - return getOrganizationSettingsSettings; - } - - /** Returns the builder for the settings used for calls to getSource. */ - 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() { - return listAssetsSettings; - } - - /** Returns the builder for the settings used for calls to listFindings. */ - public PagedCallSettings.Builder< - ListFindingsRequest, ListFindingsResponse, ListFindingsPagedResponse> - listFindingsSettings() { - return listFindingsSettings; - } - - /** Returns the builder for the settings used for calls to listMuteConfigs. */ - public PagedCallSettings.Builder< - ListMuteConfigsRequest, ListMuteConfigsResponse, ListMuteConfigsPagedResponse> - listMuteConfigsSettings() { - return listMuteConfigsSettings; - } - - /** Returns the builder for the settings used for calls to listNotificationConfigs. */ - public PagedCallSettings.Builder< - ListNotificationConfigsRequest, ListNotificationConfigsResponse, - ListNotificationConfigsPagedResponse> - listNotificationConfigsSettings() { - return listNotificationConfigsSettings; - } - - /** Returns the builder for the settings used for calls to listSources. */ - public PagedCallSettings.Builder< - ListSourcesRequest, ListSourcesResponse, ListSourcesPagedResponse> - listSourcesSettings() { - return listSourcesSettings; - } - - /** Returns the builder for the settings used for calls to runAssetDiscovery. */ - public UnaryCallSettings.Builder - runAssetDiscoverySettings() { - return runAssetDiscoverySettings; - } - - /** Returns the builder for the settings used for calls to runAssetDiscovery. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - runAssetDiscoveryOperationSettings() { - return runAssetDiscoveryOperationSettings; - } - - /** Returns the builder for the settings used for calls to setFindingState. */ - public UnaryCallSettings.Builder setFindingStateSettings() { - return setFindingStateSettings; - } - - /** Returns the builder for the settings used for calls to setMute. */ - public UnaryCallSettings.Builder setMuteSettings() { - return setMuteSettings; - } - - /** Returns the builder for the settings used for calls to setIamPolicy. */ - public UnaryCallSettings.Builder setIamPolicySettings() { - 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 updateExternalSystem. */ - public UnaryCallSettings.Builder - updateExternalSystemSettings() { - return updateExternalSystemSettings; - } - - /** Returns the builder for the settings used for calls to updateFinding. */ - public UnaryCallSettings.Builder updateFindingSettings() { - return updateFindingSettings; - } - - /** Returns the builder for the settings used for calls to updateMuteConfig. */ - public UnaryCallSettings.Builder - updateMuteConfigSettings() { - return updateMuteConfigSettings; - } - - /** Returns the builder for the settings used for calls to updateNotificationConfig. */ - public UnaryCallSettings.Builder - updateNotificationConfigSettings() { - return updateNotificationConfigSettings; - } - - /** Returns the builder for the settings used for calls to updateOrganizationSettings. */ - public UnaryCallSettings.Builder - updateOrganizationSettingsSettings() { - return updateOrganizationSettingsSettings; - } - - /** Returns the builder for the settings used for calls to updateSource. */ - public UnaryCallSettings.Builder updateSourceSettings() { - return updateSourceSettings; - } - - /** Returns the builder for the settings used for calls to updateSecurityMarks. */ - public UnaryCallSettings.Builder - updateSecurityMarksSettings() { - return updateSecurityMarksSettings; - } - - /** Returns the builder for the settings used for calls to createBigQueryExport. */ - public UnaryCallSettings.Builder - createBigQueryExportSettings() { - return createBigQueryExportSettings; - } - - /** Returns the builder for the settings used for calls to deleteBigQueryExport. */ - public UnaryCallSettings.Builder - deleteBigQueryExportSettings() { - return deleteBigQueryExportSettings; - } - - /** Returns the builder for the settings used for calls to updateBigQueryExport. */ - public UnaryCallSettings.Builder - updateBigQueryExportSettings() { - return updateBigQueryExportSettings; - } - - /** Returns the builder for the settings used for calls to listBigQueryExports. */ - public PagedCallSettings.Builder< - ListBigQueryExportsRequest, ListBigQueryExportsResponse, - ListBigQueryExportsPagedResponse> - listBigQueryExportsSettings() { - return listBigQueryExportsSettings; - } - - @Override - public SecurityCenterStubSettings build() throws IOException { - return new SecurityCenterStubSettings(this); - } - } -} diff --git a/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/MockSecurityCenter.java b/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/MockSecurityCenter.java deleted file mode 100644 index 4433d845b234..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/MockSecurityCenter.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 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.gax.grpc.testing.MockGrpcService; -import com.google.protobuf.AbstractMessage; -import io.grpc.ServerServiceDefinition; -import java.util.List; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockSecurityCenter implements MockGrpcService { - private final MockSecurityCenterImpl serviceImpl; - - public MockSecurityCenter() { - serviceImpl = new MockSecurityCenterImpl(); - } - - @Override - public List getRequests() { - return serviceImpl.getRequests(); - } - - @Override - public void addResponse(AbstractMessage response) { - serviceImpl.addResponse(response); - } - - @Override - public void addException(Exception exception) { - serviceImpl.addException(exception); - } - - @Override - public ServerServiceDefinition getServiceDefinition() { - return serviceImpl.bindService(); - } - - @Override - public void reset() { - serviceImpl.reset(); - } -} diff --git a/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/MockSecurityCenterImpl.java b/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/MockSecurityCenterImpl.java deleted file mode 100644 index c309ef8a19bd..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/MockSecurityCenterImpl.java +++ /dev/null @@ -1,824 +0,0 @@ -/* - * Copyright 2022 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.cloud.securitycenter.v1.SecurityCenterGrpc.SecurityCenterImplBase; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Empty; -import io.grpc.stub.StreamObserver; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.Queue; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockSecurityCenterImpl extends SecurityCenterImplBase { - private List requests; - private Queue responses; - - public MockSecurityCenterImpl() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - public List getRequests() { - return requests; - } - - public void addResponse(AbstractMessage response) { - responses.add(response); - } - - public void setResponses(List responses) { - this.responses = new LinkedList(responses); - } - - public void addException(Exception exception) { - responses.add(exception); - } - - public void reset() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - @Override - public void bulkMuteFindings( - BulkMuteFindingsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext(((Operation) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method BulkMuteFindings, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createSource(CreateSourceRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Source) { - requests.add(request); - responseObserver.onNext(((Source) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateSource, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Source.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createFinding( - CreateFindingRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Finding) { - requests.add(request); - responseObserver.onNext(((Finding) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateFinding, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Finding.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createMuteConfig( - CreateMuteConfigRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof MuteConfig) { - requests.add(request); - responseObserver.onNext(((MuteConfig) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateMuteConfig, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - MuteConfig.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createNotificationConfig( - CreateNotificationConfigRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof NotificationConfig) { - requests.add(request); - responseObserver.onNext(((NotificationConfig) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateNotificationConfig, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - NotificationConfig.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteMuteConfig( - DeleteMuteConfigRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteMuteConfig, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteNotificationConfig( - DeleteNotificationConfigRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteNotificationConfig, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getBigQueryExport( - GetBigQueryExportRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof BigQueryExport) { - requests.add(request); - responseObserver.onNext(((BigQueryExport) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetBigQueryExport, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - BigQueryExport.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getIamPolicy(GetIamPolicyRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Policy) { - requests.add(request); - responseObserver.onNext(((Policy) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetIamPolicy, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Policy.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getMuteConfig( - GetMuteConfigRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof MuteConfig) { - requests.add(request); - responseObserver.onNext(((MuteConfig) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetMuteConfig, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - MuteConfig.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getNotificationConfig( - GetNotificationConfigRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof NotificationConfig) { - requests.add(request); - responseObserver.onNext(((NotificationConfig) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetNotificationConfig, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - NotificationConfig.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getOrganizationSettings( - GetOrganizationSettingsRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof OrganizationSettings) { - requests.add(request); - responseObserver.onNext(((OrganizationSettings) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetOrganizationSettings, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - OrganizationSettings.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getSource(GetSourceRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Source) { - requests.add(request); - responseObserver.onNext(((Source) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetSource, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Source.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void groupAssets( - GroupAssetsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof GroupAssetsResponse) { - requests.add(request); - responseObserver.onNext(((GroupAssetsResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GroupAssets, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - GroupAssetsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void groupFindings( - GroupFindingsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof GroupFindingsResponse) { - requests.add(request); - responseObserver.onNext(((GroupFindingsResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GroupFindings, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - GroupFindingsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listAssets( - ListAssetsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListAssetsResponse) { - requests.add(request); - responseObserver.onNext(((ListAssetsResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListAssets, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListAssetsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listFindings( - ListFindingsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListFindingsResponse) { - requests.add(request); - responseObserver.onNext(((ListFindingsResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListFindings, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListFindingsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listMuteConfigs( - ListMuteConfigsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListMuteConfigsResponse) { - requests.add(request); - responseObserver.onNext(((ListMuteConfigsResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListMuteConfigs, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListMuteConfigsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listNotificationConfigs( - ListNotificationConfigsRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListNotificationConfigsResponse) { - requests.add(request); - responseObserver.onNext(((ListNotificationConfigsResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListNotificationConfigs, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListNotificationConfigsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listSources( - ListSourcesRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListSourcesResponse) { - requests.add(request); - responseObserver.onNext(((ListSourcesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListSources, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListSourcesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void runAssetDiscovery( - RunAssetDiscoveryRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext(((Operation) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method RunAssetDiscovery, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void setFindingState( - SetFindingStateRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Finding) { - requests.add(request); - responseObserver.onNext(((Finding) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method SetFindingState, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Finding.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void setMute(SetMuteRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Finding) { - requests.add(request); - responseObserver.onNext(((Finding) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method SetMute, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Finding.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void setIamPolicy(SetIamPolicyRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Policy) { - requests.add(request); - responseObserver.onNext(((Policy) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method SetIamPolicy, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Policy.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void testIamPermissions( - TestIamPermissionsRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof TestIamPermissionsResponse) { - requests.add(request); - responseObserver.onNext(((TestIamPermissionsResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method TestIamPermissions, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - TestIamPermissionsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateExternalSystem( - UpdateExternalSystemRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ExternalSystem) { - requests.add(request); - responseObserver.onNext(((ExternalSystem) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateExternalSystem, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ExternalSystem.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateFinding( - UpdateFindingRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Finding) { - requests.add(request); - responseObserver.onNext(((Finding) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateFinding, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Finding.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateMuteConfig( - UpdateMuteConfigRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof MuteConfig) { - requests.add(request); - responseObserver.onNext(((MuteConfig) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateMuteConfig, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - MuteConfig.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateNotificationConfig( - UpdateNotificationConfigRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof NotificationConfig) { - requests.add(request); - responseObserver.onNext(((NotificationConfig) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateNotificationConfig, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - NotificationConfig.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateOrganizationSettings( - UpdateOrganizationSettingsRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof OrganizationSettings) { - requests.add(request); - responseObserver.onNext(((OrganizationSettings) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateOrganizationSettings, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - OrganizationSettings.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateSource(UpdateSourceRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Source) { - requests.add(request); - responseObserver.onNext(((Source) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateSource, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Source.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateSecurityMarks( - UpdateSecurityMarksRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof SecurityMarks) { - requests.add(request); - responseObserver.onNext(((SecurityMarks) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateSecurityMarks, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - SecurityMarks.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createBigQueryExport( - CreateBigQueryExportRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof BigQueryExport) { - requests.add(request); - responseObserver.onNext(((BigQueryExport) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateBigQueryExport, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - BigQueryExport.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteBigQueryExport( - DeleteBigQueryExportRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteBigQueryExport, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateBigQueryExport( - UpdateBigQueryExportRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof BigQueryExport) { - requests.add(request); - responseObserver.onNext(((BigQueryExport) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateBigQueryExport, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - BigQueryExport.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listBigQueryExports( - ListBigQueryExportsRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListBigQueryExportsResponse) { - requests.add(request); - responseObserver.onNext(((ListBigQueryExportsResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListBigQueryExports, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListBigQueryExportsResponse.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientHttpJsonTest.java b/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientHttpJsonTest.java deleted file mode 100644 index 4571c8c77e39..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientHttpJsonTest.java +++ /dev/null @@ -1,4431 +0,0 @@ -/* - * Copyright 2022 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 static com.google.cloud.securitycenter.v1.SecurityCenterClient.GroupAssetsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.GroupFindingsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListAssetsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListBigQueryExportsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListFindingsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListMuteConfigsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListNotificationConfigsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListSourcesPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.testing.MockHttpService; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ApiException; -import com.google.api.gax.rpc.ApiExceptionFactory; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.testing.FakeStatusCode; -import com.google.api.resourcenames.ResourceName; -import com.google.cloud.securitycenter.v1.stub.HttpJsonSecurityCenterStub; -import com.google.common.collect.Lists; -import com.google.iam.v1.AuditConfig; -import com.google.iam.v1.Binding; -import com.google.iam.v1.Policy; -import com.google.iam.v1.TestIamPermissionsResponse; -import com.google.longrunning.Operation; -import com.google.protobuf.Any; -import com.google.protobuf.ByteString; -import com.google.protobuf.Duration; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import com.google.protobuf.Value; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.concurrent.ExecutionException; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class SecurityCenterClientHttpJsonTest { - private static MockHttpService mockService; - private static SecurityCenterClient client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonSecurityCenterStub.getMethodDescriptors(), - SecurityCenterSettings.getDefaultEndpoint()); - SecurityCenterSettings settings = - SecurityCenterSettings.newHttpJsonBuilder() - .setTransportChannelProvider( - SecurityCenterSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = SecurityCenterClient.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void bulkMuteFindingsTest() throws Exception { - BulkMuteFindingsResponse expectedResponse = BulkMuteFindingsResponse.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("bulkMuteFindingsTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - ResourceName parent = FolderName.of("[FOLDER]"); - - BulkMuteFindingsResponse actualResponse = client.bulkMuteFindingsAsync(parent).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void bulkMuteFindingsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ResourceName parent = FolderName.of("[FOLDER]"); - client.bulkMuteFindingsAsync(parent).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void bulkMuteFindingsTest2() throws Exception { - BulkMuteFindingsResponse expectedResponse = BulkMuteFindingsResponse.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("bulkMuteFindingsTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String parent = "organizations/organization-8287"; - - BulkMuteFindingsResponse actualResponse = client.bulkMuteFindingsAsync(parent).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void bulkMuteFindingsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "organizations/organization-8287"; - client.bulkMuteFindingsAsync(parent).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void createSourceTest() throws Exception { - Source expectedResponse = - Source.newBuilder() - .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCanonicalName("canonicalName2122381727") - .build(); - mockService.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - Source source = Source.newBuilder().build(); - - Source actualResponse = client.createSource(parent, source); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createSourceExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - Source source = Source.newBuilder().build(); - client.createSource(parent, source); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createSourceTest2() throws Exception { - Source expectedResponse = - Source.newBuilder() - .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCanonicalName("canonicalName2122381727") - .build(); - mockService.addResponse(expectedResponse); - - String parent = "organizations/organization-8287"; - Source source = Source.newBuilder().build(); - - Source actualResponse = client.createSource(parent, source); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createSourceExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "organizations/organization-8287"; - Source source = Source.newBuilder().build(); - client.createSource(parent, source); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createFindingTest() throws Exception { - Finding expectedResponse = - Finding.newBuilder() - .setName( - FindingName.ofOrganizationSourceFindingName( - "[ORGANIZATION]", "[SOURCE]", "[FINDING]") - .toString()) - .setParent("parent-995424086") - .setResourceName("resourceName-384566343") - .setCategory("category50511102") - .setExternalUri("externalUri-1153085023") - .putAllSourceProperties(new HashMap()) - .setSecurityMarks(SecurityMarks.newBuilder().build()) - .setEventTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setCanonicalName("canonicalName2122381727") - .setIndicator(Indicator.newBuilder().build()) - .setVulnerability(Vulnerability.newBuilder().build()) - .setMuteUpdateTime(Timestamp.newBuilder().build()) - .putAllExternalSystems(new HashMap()) - .setMitreAttack(MitreAttack.newBuilder().build()) - .setAccess(Access.newBuilder().build()) - .addAllConnections(new ArrayList()) - .setMuteInitiator("muteInitiator1395645462") - .addAllProcesses(new ArrayList()) - .putAllContacts(new HashMap()) - .addAllCompliances(new ArrayList()) - .setDescription("description-1724546052") - .setExfiltration(Exfiltration.newBuilder().build()) - .addAllIamBindings(new ArrayList()) - .setNextSteps("nextSteps1206138868") - .addAllContainers(new ArrayList()) - .setKubernetes(Kubernetes.newBuilder().build()) - .setDatabase(Database.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); - String findingId = "findingId439150212"; - Finding finding = Finding.newBuilder().build(); - - Finding actualResponse = client.createFinding(parent, findingId, finding); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createFindingExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); - String findingId = "findingId439150212"; - Finding finding = Finding.newBuilder().build(); - client.createFinding(parent, findingId, finding); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createFindingTest2() throws Exception { - Finding expectedResponse = - Finding.newBuilder() - .setName( - FindingName.ofOrganizationSourceFindingName( - "[ORGANIZATION]", "[SOURCE]", "[FINDING]") - .toString()) - .setParent("parent-995424086") - .setResourceName("resourceName-384566343") - .setCategory("category50511102") - .setExternalUri("externalUri-1153085023") - .putAllSourceProperties(new HashMap()) - .setSecurityMarks(SecurityMarks.newBuilder().build()) - .setEventTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setCanonicalName("canonicalName2122381727") - .setIndicator(Indicator.newBuilder().build()) - .setVulnerability(Vulnerability.newBuilder().build()) - .setMuteUpdateTime(Timestamp.newBuilder().build()) - .putAllExternalSystems(new HashMap()) - .setMitreAttack(MitreAttack.newBuilder().build()) - .setAccess(Access.newBuilder().build()) - .addAllConnections(new ArrayList()) - .setMuteInitiator("muteInitiator1395645462") - .addAllProcesses(new ArrayList()) - .putAllContacts(new HashMap()) - .addAllCompliances(new ArrayList()) - .setDescription("description-1724546052") - .setExfiltration(Exfiltration.newBuilder().build()) - .addAllIamBindings(new ArrayList()) - .setNextSteps("nextSteps1206138868") - .addAllContainers(new ArrayList()) - .setKubernetes(Kubernetes.newBuilder().build()) - .setDatabase(Database.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "organizations/organization-8741/sources/source-8741"; - String findingId = "findingId439150212"; - Finding finding = Finding.newBuilder().build(); - - Finding actualResponse = client.createFinding(parent, findingId, finding); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createFindingExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "organizations/organization-8741/sources/source-8741"; - String findingId = "findingId439150212"; - Finding finding = Finding.newBuilder().build(); - client.createFinding(parent, findingId, finding); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createMuteConfigTest() throws Exception { - MuteConfig expectedResponse = - MuteConfig.newBuilder() - .setName( - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .build(); - mockService.addResponse(expectedResponse); - - FolderName parent = FolderName.of("[FOLDER]"); - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - - MuteConfig actualResponse = client.createMuteConfig(parent, muteConfig); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createMuteConfigExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - FolderName parent = FolderName.of("[FOLDER]"); - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - client.createMuteConfig(parent, muteConfig); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createMuteConfigTest2() throws Exception { - MuteConfig expectedResponse = - MuteConfig.newBuilder() - .setName( - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .build(); - mockService.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - - MuteConfig actualResponse = client.createMuteConfig(parent, muteConfig); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createMuteConfigExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - client.createMuteConfig(parent, muteConfig); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createMuteConfigTest3() throws Exception { - MuteConfig expectedResponse = - MuteConfig.newBuilder() - .setName( - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .build(); - mockService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - - MuteConfig actualResponse = client.createMuteConfig(parent, muteConfig); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createMuteConfigExceptionTest3() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - client.createMuteConfig(parent, muteConfig); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createMuteConfigTest4() throws Exception { - MuteConfig expectedResponse = - MuteConfig.newBuilder() - .setName( - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .build(); - mockService.addResponse(expectedResponse); - - String parent = "organizations/organization-8287"; - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - - MuteConfig actualResponse = client.createMuteConfig(parent, muteConfig); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createMuteConfigExceptionTest4() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "organizations/organization-8287"; - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - client.createMuteConfig(parent, muteConfig); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createMuteConfigTest5() throws Exception { - MuteConfig expectedResponse = - MuteConfig.newBuilder() - .setName( - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .build(); - mockService.addResponse(expectedResponse); - - FolderName parent = FolderName.of("[FOLDER]"); - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - String muteConfigId = "muteConfigId1689669942"; - - MuteConfig actualResponse = client.createMuteConfig(parent, muteConfig, muteConfigId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createMuteConfigExceptionTest5() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - FolderName parent = FolderName.of("[FOLDER]"); - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - String muteConfigId = "muteConfigId1689669942"; - client.createMuteConfig(parent, muteConfig, muteConfigId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createMuteConfigTest6() throws Exception { - MuteConfig expectedResponse = - MuteConfig.newBuilder() - .setName( - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .build(); - mockService.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - String muteConfigId = "muteConfigId1689669942"; - - MuteConfig actualResponse = client.createMuteConfig(parent, muteConfig, muteConfigId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createMuteConfigExceptionTest6() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - String muteConfigId = "muteConfigId1689669942"; - client.createMuteConfig(parent, muteConfig, muteConfigId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createMuteConfigTest7() throws Exception { - MuteConfig expectedResponse = - MuteConfig.newBuilder() - .setName( - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .build(); - mockService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - String muteConfigId = "muteConfigId1689669942"; - - MuteConfig actualResponse = client.createMuteConfig(parent, muteConfig, muteConfigId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createMuteConfigExceptionTest7() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - String muteConfigId = "muteConfigId1689669942"; - client.createMuteConfig(parent, muteConfig, muteConfigId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createMuteConfigTest8() throws Exception { - MuteConfig expectedResponse = - MuteConfig.newBuilder() - .setName( - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .build(); - mockService.addResponse(expectedResponse); - - String parent = "organizations/organization-8287"; - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - String muteConfigId = "muteConfigId1689669942"; - - MuteConfig actualResponse = client.createMuteConfig(parent, muteConfig, muteConfigId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createMuteConfigExceptionTest8() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "organizations/organization-8287"; - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - String muteConfigId = "muteConfigId1689669942"; - client.createMuteConfig(parent, muteConfig, muteConfigId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createNotificationConfigTest() throws Exception { - NotificationConfig expectedResponse = - NotificationConfig.newBuilder() - .setName( - NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]").toString()) - .setDescription("description-1724546052") - .setPubsubTopic("pubsubTopic255880396") - .setServiceAccount("serviceAccount1079137720") - .build(); - mockService.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); - - NotificationConfig actualResponse = client.createNotificationConfig(parent, notificationConfig); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createNotificationConfigExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); - client.createNotificationConfig(parent, notificationConfig); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createNotificationConfigTest2() throws Exception { - NotificationConfig expectedResponse = - NotificationConfig.newBuilder() - .setName( - NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]").toString()) - .setDescription("description-1724546052") - .setPubsubTopic("pubsubTopic255880396") - .setServiceAccount("serviceAccount1079137720") - .build(); - mockService.addResponse(expectedResponse); - - String parent = "organizations/organization-8287"; - NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); - - NotificationConfig actualResponse = client.createNotificationConfig(parent, notificationConfig); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createNotificationConfigExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "organizations/organization-8287"; - NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); - client.createNotificationConfig(parent, notificationConfig); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createNotificationConfigTest3() throws Exception { - NotificationConfig expectedResponse = - NotificationConfig.newBuilder() - .setName( - NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]").toString()) - .setDescription("description-1724546052") - .setPubsubTopic("pubsubTopic255880396") - .setServiceAccount("serviceAccount1079137720") - .build(); - mockService.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - String configId = "configId-580140035"; - NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); - - NotificationConfig actualResponse = - client.createNotificationConfig(parent, configId, notificationConfig); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createNotificationConfigExceptionTest3() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - String configId = "configId-580140035"; - NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); - client.createNotificationConfig(parent, configId, notificationConfig); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createNotificationConfigTest4() throws Exception { - NotificationConfig expectedResponse = - NotificationConfig.newBuilder() - .setName( - NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]").toString()) - .setDescription("description-1724546052") - .setPubsubTopic("pubsubTopic255880396") - .setServiceAccount("serviceAccount1079137720") - .build(); - mockService.addResponse(expectedResponse); - - String parent = "organizations/organization-8287"; - String configId = "configId-580140035"; - NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); - - NotificationConfig actualResponse = - client.createNotificationConfig(parent, configId, notificationConfig); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createNotificationConfigExceptionTest4() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "organizations/organization-8287"; - String configId = "configId-580140035"; - NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); - client.createNotificationConfig(parent, configId, notificationConfig); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteMuteConfigTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - MuteConfigName name = - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]"); - - client.deleteMuteConfig(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteMuteConfigExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - MuteConfigName name = - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]"); - client.deleteMuteConfig(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteMuteConfigTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "organizations/organization-3180/muteConfigs/muteConfig-3180"; - - client.deleteMuteConfig(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteMuteConfigExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "organizations/organization-3180/muteConfigs/muteConfig-3180"; - client.deleteMuteConfig(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteNotificationConfigTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - NotificationConfigName name = - NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]"); - - client.deleteNotificationConfig(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteNotificationConfigExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - NotificationConfigName name = - NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]"); - client.deleteNotificationConfig(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteNotificationConfigTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "organizations/organization-7374/notificationConfigs/notificationConfig-7374"; - - client.deleteNotificationConfig(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteNotificationConfigExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "organizations/organization-7374/notificationConfigs/notificationConfig-7374"; - client.deleteNotificationConfig(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getBigQueryExportTest() throws Exception { - BigQueryExport expectedResponse = - BigQueryExport.newBuilder() - .setName( - BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]") - .toString()) - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setDataset("dataset1443214456") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .setPrincipal("principal-1812041682") - .build(); - mockService.addResponse(expectedResponse); - - BigQueryExportName name = - BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]"); - - BigQueryExport actualResponse = client.getBigQueryExport(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getBigQueryExportExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - BigQueryExportName name = - BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]"); - client.getBigQueryExport(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getBigQueryExportTest2() throws Exception { - BigQueryExport expectedResponse = - BigQueryExport.newBuilder() - .setName( - BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]") - .toString()) - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setDataset("dataset1443214456") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .setPrincipal("principal-1812041682") - .build(); - mockService.addResponse(expectedResponse); - - String name = "organizations/organization-3683/bigQueryExports/bigQueryExport-3683"; - - BigQueryExport actualResponse = client.getBigQueryExport(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getBigQueryExportExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "organizations/organization-3683/bigQueryExports/bigQueryExport-3683"; - client.getBigQueryExport(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getIamPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); - - Policy actualResponse = client.getIamPolicy(resource); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getIamPolicyExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); - client.getIamPolicy(resource); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getIamPolicyTest2() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - String resource = "organizations/organization-3393/sources/source-3393"; - - Policy actualResponse = client.getIamPolicy(resource); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getIamPolicyExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String resource = "organizations/organization-3393/sources/source-3393"; - client.getIamPolicy(resource); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getMuteConfigTest() throws Exception { - MuteConfig expectedResponse = - MuteConfig.newBuilder() - .setName( - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .build(); - mockService.addResponse(expectedResponse); - - MuteConfigName name = - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]"); - - MuteConfig actualResponse = client.getMuteConfig(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getMuteConfigExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - MuteConfigName name = - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]"); - client.getMuteConfig(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getMuteConfigTest2() throws Exception { - MuteConfig expectedResponse = - MuteConfig.newBuilder() - .setName( - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .build(); - mockService.addResponse(expectedResponse); - - String name = "organizations/organization-3180/muteConfigs/muteConfig-3180"; - - MuteConfig actualResponse = client.getMuteConfig(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getMuteConfigExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "organizations/organization-3180/muteConfigs/muteConfig-3180"; - client.getMuteConfig(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getNotificationConfigTest() throws Exception { - NotificationConfig expectedResponse = - NotificationConfig.newBuilder() - .setName( - NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]").toString()) - .setDescription("description-1724546052") - .setPubsubTopic("pubsubTopic255880396") - .setServiceAccount("serviceAccount1079137720") - .build(); - mockService.addResponse(expectedResponse); - - NotificationConfigName name = - NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]"); - - NotificationConfig actualResponse = client.getNotificationConfig(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getNotificationConfigExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - NotificationConfigName name = - NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]"); - client.getNotificationConfig(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getNotificationConfigTest2() throws Exception { - NotificationConfig expectedResponse = - NotificationConfig.newBuilder() - .setName( - NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]").toString()) - .setDescription("description-1724546052") - .setPubsubTopic("pubsubTopic255880396") - .setServiceAccount("serviceAccount1079137720") - .build(); - mockService.addResponse(expectedResponse); - - String name = "organizations/organization-7374/notificationConfigs/notificationConfig-7374"; - - NotificationConfig actualResponse = client.getNotificationConfig(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getNotificationConfigExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "organizations/organization-7374/notificationConfigs/notificationConfig-7374"; - client.getNotificationConfig(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getOrganizationSettingsTest() throws Exception { - OrganizationSettings expectedResponse = - OrganizationSettings.newBuilder() - .setName(OrganizationSettingsName.of("[ORGANIZATION]").toString()) - .setEnableAssetDiscovery(true) - .setAssetDiscoveryConfig(OrganizationSettings.AssetDiscoveryConfig.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - OrganizationSettingsName name = OrganizationSettingsName.of("[ORGANIZATION]"); - - OrganizationSettings actualResponse = client.getOrganizationSettings(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getOrganizationSettingsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - OrganizationSettingsName name = OrganizationSettingsName.of("[ORGANIZATION]"); - client.getOrganizationSettings(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getOrganizationSettingsTest2() throws Exception { - OrganizationSettings expectedResponse = - OrganizationSettings.newBuilder() - .setName(OrganizationSettingsName.of("[ORGANIZATION]").toString()) - .setEnableAssetDiscovery(true) - .setAssetDiscoveryConfig(OrganizationSettings.AssetDiscoveryConfig.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "organizations/organization-9995/organizationSettings"; - - OrganizationSettings actualResponse = client.getOrganizationSettings(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getOrganizationSettingsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "organizations/organization-9995/organizationSettings"; - client.getOrganizationSettings(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getSourceTest() throws Exception { - Source expectedResponse = - Source.newBuilder() - .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCanonicalName("canonicalName2122381727") - .build(); - mockService.addResponse(expectedResponse); - - SourceName name = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); - - Source actualResponse = client.getSource(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getSourceExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - SourceName name = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); - client.getSource(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getSourceTest2() throws Exception { - Source expectedResponse = - Source.newBuilder() - .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCanonicalName("canonicalName2122381727") - .build(); - mockService.addResponse(expectedResponse); - - String name = "organizations/organization-7292/sources/source-7292"; - - Source actualResponse = client.getSource(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getSourceExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "organizations/organization-7292/sources/source-7292"; - client.getSource(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void groupAssetsTest() throws Exception { - GroupResult responsesElement = GroupResult.newBuilder().build(); - GroupAssetsResponse expectedResponse = - GroupAssetsResponse.newBuilder() - .setNextPageToken("") - .addAllGroupByResults(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - GroupAssetsRequest request = - GroupAssetsRequest.newBuilder() - .setParent(OrganizationName.of("[ORGANIZATION]").toString()) - .setFilter("filter-1274492040") - .setGroupBy("groupBy293428022") - .setCompareDuration(Duration.newBuilder().build()) - .setReadTime(Timestamp.newBuilder().build()) - .setPageToken("pageToken873572522") - .setPageSize(883849137) - .build(); - - 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 = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void groupAssetsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - GroupAssetsRequest request = - GroupAssetsRequest.newBuilder() - .setParent(OrganizationName.of("[ORGANIZATION]").toString()) - .setFilter("filter-1274492040") - .setGroupBy("groupBy293428022") - .setCompareDuration(Duration.newBuilder().build()) - .setReadTime(Timestamp.newBuilder().build()) - .setPageToken("pageToken873572522") - .setPageSize(883849137) - .build(); - client.groupAssets(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void groupFindingsTest() throws Exception { - GroupResult responsesElement = GroupResult.newBuilder().build(); - GroupFindingsResponse expectedResponse = - GroupFindingsResponse.newBuilder() - .setNextPageToken("") - .addAllGroupByResults(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); - String groupBy = "groupBy293428022"; - - 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 = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void groupFindingsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); - String groupBy = "groupBy293428022"; - client.groupFindings(parent, groupBy); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void groupFindingsTest2() throws Exception { - GroupResult responsesElement = GroupResult.newBuilder().build(); - GroupFindingsResponse expectedResponse = - GroupFindingsResponse.newBuilder() - .setNextPageToken("") - .addAllGroupByResults(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "organizations/organization-8741/sources/source-8741"; - String groupBy = "groupBy293428022"; - - 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 = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void groupFindingsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "organizations/organization-8741/sources/source-8741"; - String groupBy = "groupBy293428022"; - client.groupFindings(parent, groupBy); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listAssetsTest() throws Exception { - ListAssetsResponse.ListAssetsResult responsesElement = - ListAssetsResponse.ListAssetsResult.newBuilder().build(); - ListAssetsResponse expectedResponse = - ListAssetsResponse.newBuilder() - .setNextPageToken("") - .addAllListAssetsResults(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ListAssetsRequest request = - ListAssetsRequest.newBuilder() - .setParent(OrganizationName.of("[ORGANIZATION]").toString()) - .setFilter("filter-1274492040") - .setOrderBy("orderBy-1207110587") - .setReadTime(Timestamp.newBuilder().build()) - .setCompareDuration(Duration.newBuilder().build()) - .setFieldMask(FieldMask.newBuilder().build()) - .setPageToken("pageToken873572522") - .setPageSize(883849137) - .build(); - - ListAssetsPagedResponse pagedListResponse = client.listAssets(request); - - List resources = - Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getListAssetsResultsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listAssetsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ListAssetsRequest request = - ListAssetsRequest.newBuilder() - .setParent(OrganizationName.of("[ORGANIZATION]").toString()) - .setFilter("filter-1274492040") - .setOrderBy("orderBy-1207110587") - .setReadTime(Timestamp.newBuilder().build()) - .setCompareDuration(Duration.newBuilder().build()) - .setFieldMask(FieldMask.newBuilder().build()) - .setPageToken("pageToken873572522") - .setPageSize(883849137) - .build(); - client.listAssets(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listFindingsTest() throws Exception { - ListFindingsResponse.ListFindingsResult responsesElement = - ListFindingsResponse.ListFindingsResult.newBuilder().build(); - ListFindingsResponse expectedResponse = - ListFindingsResponse.newBuilder() - .setNextPageToken("") - .addAllListFindingsResults(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ListFindingsRequest request = - ListFindingsRequest.newBuilder() - .setParent(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) - .setFilter("filter-1274492040") - .setOrderBy("orderBy-1207110587") - .setReadTime(Timestamp.newBuilder().build()) - .setCompareDuration(Duration.newBuilder().build()) - .setFieldMask(FieldMask.newBuilder().build()) - .setPageToken("pageToken873572522") - .setPageSize(883849137) - .build(); - - ListFindingsPagedResponse pagedListResponse = client.listFindings(request); - - List resources = - Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getListFindingsResultsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listFindingsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ListFindingsRequest request = - ListFindingsRequest.newBuilder() - .setParent( - SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) - .setFilter("filter-1274492040") - .setOrderBy("orderBy-1207110587") - .setReadTime(Timestamp.newBuilder().build()) - .setCompareDuration(Duration.newBuilder().build()) - .setFieldMask(FieldMask.newBuilder().build()) - .setPageToken("pageToken873572522") - .setPageSize(883849137) - .build(); - client.listFindings(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listMuteConfigsTest() throws Exception { - MuteConfig responsesElement = MuteConfig.newBuilder().build(); - ListMuteConfigsResponse expectedResponse = - ListMuteConfigsResponse.newBuilder() - .setNextPageToken("") - .addAllMuteConfigs(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - FolderName parent = FolderName.of("[FOLDER]"); - - ListMuteConfigsPagedResponse pagedListResponse = client.listMuteConfigs(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getMuteConfigsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listMuteConfigsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - FolderName parent = FolderName.of("[FOLDER]"); - client.listMuteConfigs(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listMuteConfigsTest2() throws Exception { - MuteConfig responsesElement = MuteConfig.newBuilder().build(); - ListMuteConfigsResponse expectedResponse = - ListMuteConfigsResponse.newBuilder() - .setNextPageToken("") - .addAllMuteConfigs(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - - ListMuteConfigsPagedResponse pagedListResponse = client.listMuteConfigs(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getMuteConfigsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listMuteConfigsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - client.listMuteConfigs(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listMuteConfigsTest3() throws Exception { - MuteConfig responsesElement = MuteConfig.newBuilder().build(); - ListMuteConfigsResponse expectedResponse = - ListMuteConfigsResponse.newBuilder() - .setNextPageToken("") - .addAllMuteConfigs(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - - ListMuteConfigsPagedResponse pagedListResponse = client.listMuteConfigs(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getMuteConfigsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listMuteConfigsExceptionTest3() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - client.listMuteConfigs(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listMuteConfigsTest4() throws Exception { - MuteConfig responsesElement = MuteConfig.newBuilder().build(); - ListMuteConfigsResponse expectedResponse = - ListMuteConfigsResponse.newBuilder() - .setNextPageToken("") - .addAllMuteConfigs(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "organizations/organization-8287"; - - ListMuteConfigsPagedResponse pagedListResponse = client.listMuteConfigs(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getMuteConfigsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listMuteConfigsExceptionTest4() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "organizations/organization-8287"; - client.listMuteConfigs(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listNotificationConfigsTest() throws Exception { - NotificationConfig responsesElement = NotificationConfig.newBuilder().build(); - ListNotificationConfigsResponse expectedResponse = - ListNotificationConfigsResponse.newBuilder() - .setNextPageToken("") - .addAllNotificationConfigs(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - - ListNotificationConfigsPagedResponse pagedListResponse = client.listNotificationConfigs(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getNotificationConfigsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listNotificationConfigsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - client.listNotificationConfigs(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listNotificationConfigsTest2() throws Exception { - NotificationConfig responsesElement = NotificationConfig.newBuilder().build(); - ListNotificationConfigsResponse expectedResponse = - ListNotificationConfigsResponse.newBuilder() - .setNextPageToken("") - .addAllNotificationConfigs(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "organizations/organization-8287"; - - ListNotificationConfigsPagedResponse pagedListResponse = client.listNotificationConfigs(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getNotificationConfigsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listNotificationConfigsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "organizations/organization-8287"; - client.listNotificationConfigs(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listSourcesTest() throws Exception { - Source responsesElement = Source.newBuilder().build(); - ListSourcesResponse expectedResponse = - ListSourcesResponse.newBuilder() - .setNextPageToken("") - .addAllSources(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - FolderName parent = FolderName.of("[FOLDER]"); - - ListSourcesPagedResponse pagedListResponse = client.listSources(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getSourcesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listSourcesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - FolderName parent = FolderName.of("[FOLDER]"); - client.listSources(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listSourcesTest2() throws Exception { - Source responsesElement = Source.newBuilder().build(); - ListSourcesResponse expectedResponse = - ListSourcesResponse.newBuilder() - .setNextPageToken("") - .addAllSources(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - - ListSourcesPagedResponse pagedListResponse = client.listSources(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getSourcesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listSourcesExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - client.listSources(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listSourcesTest3() throws Exception { - Source responsesElement = Source.newBuilder().build(); - ListSourcesResponse expectedResponse = - ListSourcesResponse.newBuilder() - .setNextPageToken("") - .addAllSources(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - - ListSourcesPagedResponse pagedListResponse = client.listSources(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getSourcesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listSourcesExceptionTest3() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - client.listSources(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listSourcesTest4() throws Exception { - Source responsesElement = Source.newBuilder().build(); - ListSourcesResponse expectedResponse = - ListSourcesResponse.newBuilder() - .setNextPageToken("") - .addAllSources(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "organizations/organization-8287"; - - ListSourcesPagedResponse pagedListResponse = client.listSources(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getSourcesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listSourcesExceptionTest4() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "organizations/organization-8287"; - client.listSources(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void runAssetDiscoveryTest() throws Exception { - RunAssetDiscoveryResponse expectedResponse = - RunAssetDiscoveryResponse.newBuilder().setDuration(Duration.newBuilder().build()).build(); - Operation resultOperation = - Operation.newBuilder() - .setName("runAssetDiscoveryTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - - RunAssetDiscoveryResponse actualResponse = client.runAssetDiscoveryAsync(parent).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void runAssetDiscoveryExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - client.runAssetDiscoveryAsync(parent).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void runAssetDiscoveryTest2() throws Exception { - RunAssetDiscoveryResponse expectedResponse = - RunAssetDiscoveryResponse.newBuilder().setDuration(Duration.newBuilder().build()).build(); - Operation resultOperation = - Operation.newBuilder() - .setName("runAssetDiscoveryTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String parent = "organizations/organization-8287"; - - RunAssetDiscoveryResponse actualResponse = client.runAssetDiscoveryAsync(parent).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void runAssetDiscoveryExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "organizations/organization-8287"; - client.runAssetDiscoveryAsync(parent).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void setFindingStateTest() throws Exception { - Finding expectedResponse = - Finding.newBuilder() - .setName( - FindingName.ofOrganizationSourceFindingName( - "[ORGANIZATION]", "[SOURCE]", "[FINDING]") - .toString()) - .setParent("parent-995424086") - .setResourceName("resourceName-384566343") - .setCategory("category50511102") - .setExternalUri("externalUri-1153085023") - .putAllSourceProperties(new HashMap()) - .setSecurityMarks(SecurityMarks.newBuilder().build()) - .setEventTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setCanonicalName("canonicalName2122381727") - .setIndicator(Indicator.newBuilder().build()) - .setVulnerability(Vulnerability.newBuilder().build()) - .setMuteUpdateTime(Timestamp.newBuilder().build()) - .putAllExternalSystems(new HashMap()) - .setMitreAttack(MitreAttack.newBuilder().build()) - .setAccess(Access.newBuilder().build()) - .addAllConnections(new ArrayList()) - .setMuteInitiator("muteInitiator1395645462") - .addAllProcesses(new ArrayList()) - .putAllContacts(new HashMap()) - .addAllCompliances(new ArrayList()) - .setDescription("description-1724546052") - .setExfiltration(Exfiltration.newBuilder().build()) - .addAllIamBindings(new ArrayList()) - .setNextSteps("nextSteps1206138868") - .addAllContainers(new ArrayList()) - .setKubernetes(Kubernetes.newBuilder().build()) - .setDatabase(Database.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - FindingName name = - FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]"); - Finding.State state = Finding.State.forNumber(0); - Timestamp startTime = Timestamp.newBuilder().build(); - - Finding actualResponse = client.setFindingState(name, state, startTime); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void setFindingStateExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - FindingName name = - FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]"); - Finding.State state = Finding.State.forNumber(0); - Timestamp startTime = Timestamp.newBuilder().build(); - client.setFindingState(name, state, startTime); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void setFindingStateTest2() throws Exception { - Finding expectedResponse = - Finding.newBuilder() - .setName( - FindingName.ofOrganizationSourceFindingName( - "[ORGANIZATION]", "[SOURCE]", "[FINDING]") - .toString()) - .setParent("parent-995424086") - .setResourceName("resourceName-384566343") - .setCategory("category50511102") - .setExternalUri("externalUri-1153085023") - .putAllSourceProperties(new HashMap()) - .setSecurityMarks(SecurityMarks.newBuilder().build()) - .setEventTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setCanonicalName("canonicalName2122381727") - .setIndicator(Indicator.newBuilder().build()) - .setVulnerability(Vulnerability.newBuilder().build()) - .setMuteUpdateTime(Timestamp.newBuilder().build()) - .putAllExternalSystems(new HashMap()) - .setMitreAttack(MitreAttack.newBuilder().build()) - .setAccess(Access.newBuilder().build()) - .addAllConnections(new ArrayList()) - .setMuteInitiator("muteInitiator1395645462") - .addAllProcesses(new ArrayList()) - .putAllContacts(new HashMap()) - .addAllCompliances(new ArrayList()) - .setDescription("description-1724546052") - .setExfiltration(Exfiltration.newBuilder().build()) - .addAllIamBindings(new ArrayList()) - .setNextSteps("nextSteps1206138868") - .addAllContainers(new ArrayList()) - .setKubernetes(Kubernetes.newBuilder().build()) - .setDatabase(Database.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "organizations/organization-9392/sources/source-9392/findings/finding-9392"; - Finding.State state = Finding.State.forNumber(0); - Timestamp startTime = Timestamp.newBuilder().build(); - - Finding actualResponse = client.setFindingState(name, state, startTime); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void setFindingStateExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "organizations/organization-9392/sources/source-9392/findings/finding-9392"; - Finding.State state = Finding.State.forNumber(0); - Timestamp startTime = Timestamp.newBuilder().build(); - client.setFindingState(name, state, startTime); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void setMuteTest() throws Exception { - Finding expectedResponse = - Finding.newBuilder() - .setName( - FindingName.ofOrganizationSourceFindingName( - "[ORGANIZATION]", "[SOURCE]", "[FINDING]") - .toString()) - .setParent("parent-995424086") - .setResourceName("resourceName-384566343") - .setCategory("category50511102") - .setExternalUri("externalUri-1153085023") - .putAllSourceProperties(new HashMap()) - .setSecurityMarks(SecurityMarks.newBuilder().build()) - .setEventTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setCanonicalName("canonicalName2122381727") - .setIndicator(Indicator.newBuilder().build()) - .setVulnerability(Vulnerability.newBuilder().build()) - .setMuteUpdateTime(Timestamp.newBuilder().build()) - .putAllExternalSystems(new HashMap()) - .setMitreAttack(MitreAttack.newBuilder().build()) - .setAccess(Access.newBuilder().build()) - .addAllConnections(new ArrayList()) - .setMuteInitiator("muteInitiator1395645462") - .addAllProcesses(new ArrayList()) - .putAllContacts(new HashMap()) - .addAllCompliances(new ArrayList()) - .setDescription("description-1724546052") - .setExfiltration(Exfiltration.newBuilder().build()) - .addAllIamBindings(new ArrayList()) - .setNextSteps("nextSteps1206138868") - .addAllContainers(new ArrayList()) - .setKubernetes(Kubernetes.newBuilder().build()) - .setDatabase(Database.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - FindingName name = - FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]"); - Finding.Mute mute = Finding.Mute.forNumber(0); - - Finding actualResponse = client.setMute(name, mute); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void setMuteExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - FindingName name = - FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]"); - Finding.Mute mute = Finding.Mute.forNumber(0); - client.setMute(name, mute); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void setMuteTest2() throws Exception { - Finding expectedResponse = - Finding.newBuilder() - .setName( - FindingName.ofOrganizationSourceFindingName( - "[ORGANIZATION]", "[SOURCE]", "[FINDING]") - .toString()) - .setParent("parent-995424086") - .setResourceName("resourceName-384566343") - .setCategory("category50511102") - .setExternalUri("externalUri-1153085023") - .putAllSourceProperties(new HashMap()) - .setSecurityMarks(SecurityMarks.newBuilder().build()) - .setEventTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setCanonicalName("canonicalName2122381727") - .setIndicator(Indicator.newBuilder().build()) - .setVulnerability(Vulnerability.newBuilder().build()) - .setMuteUpdateTime(Timestamp.newBuilder().build()) - .putAllExternalSystems(new HashMap()) - .setMitreAttack(MitreAttack.newBuilder().build()) - .setAccess(Access.newBuilder().build()) - .addAllConnections(new ArrayList()) - .setMuteInitiator("muteInitiator1395645462") - .addAllProcesses(new ArrayList()) - .putAllContacts(new HashMap()) - .addAllCompliances(new ArrayList()) - .setDescription("description-1724546052") - .setExfiltration(Exfiltration.newBuilder().build()) - .addAllIamBindings(new ArrayList()) - .setNextSteps("nextSteps1206138868") - .addAllContainers(new ArrayList()) - .setKubernetes(Kubernetes.newBuilder().build()) - .setDatabase(Database.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "organizations/organization-9392/sources/source-9392/findings/finding-9392"; - Finding.Mute mute = Finding.Mute.forNumber(0); - - Finding actualResponse = client.setMute(name, mute); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void setMuteExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "organizations/organization-9392/sources/source-9392/findings/finding-9392"; - Finding.Mute mute = Finding.Mute.forNumber(0); - client.setMute(name, mute); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void setIamPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); - Policy policy = Policy.newBuilder().build(); - - Policy actualResponse = client.setIamPolicy(resource, policy); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void setIamPolicyExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); - Policy policy = Policy.newBuilder().build(); - client.setIamPolicy(resource, policy); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void setIamPolicyTest2() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - String resource = "organizations/organization-3393/sources/source-3393"; - Policy policy = Policy.newBuilder().build(); - - Policy actualResponse = client.setIamPolicy(resource, policy); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void setIamPolicyExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String resource = "organizations/organization-3393/sources/source-3393"; - Policy policy = Policy.newBuilder().build(); - client.setIamPolicy(resource, policy); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void testIamPermissionsTest() throws Exception { - TestIamPermissionsResponse expectedResponse = - TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); - mockService.addResponse(expectedResponse); - - ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); - List permissions = new ArrayList<>(); - - TestIamPermissionsResponse actualResponse = client.testIamPermissions(resource, permissions); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void testIamPermissionsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); - List permissions = new ArrayList<>(); - client.testIamPermissions(resource, permissions); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void testIamPermissionsTest2() throws Exception { - TestIamPermissionsResponse expectedResponse = - TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); - mockService.addResponse(expectedResponse); - - String resource = "organizations/organization-3393/sources/source-3393"; - List permissions = new ArrayList<>(); - - TestIamPermissionsResponse actualResponse = client.testIamPermissions(resource, permissions); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void testIamPermissionsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String resource = "organizations/organization-3393/sources/source-3393"; - List permissions = new ArrayList<>(); - client.testIamPermissions(resource, permissions); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateExternalSystemTest() throws Exception { - ExternalSystem expectedResponse = - ExternalSystem.newBuilder() - .setName("name3373707") - .addAllAssignees(new ArrayList()) - .setExternalUid("externalUid-1153085307") - .setStatus("status-892481550") - .setExternalSystemUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - ExternalSystem externalSystem = - ExternalSystem.newBuilder() - .setName( - "organizations/organization-5115/sources/source-5115/findings/finding-5115/externalSystems/externalSystem-5115") - .addAllAssignees(new ArrayList()) - .setExternalUid("externalUid-1153085307") - .setStatus("status-892481550") - .setExternalSystemUpdateTime(Timestamp.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - ExternalSystem actualResponse = client.updateExternalSystem(externalSystem, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateExternalSystemExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ExternalSystem externalSystem = - ExternalSystem.newBuilder() - .setName( - "organizations/organization-5115/sources/source-5115/findings/finding-5115/externalSystems/externalSystem-5115") - .addAllAssignees(new ArrayList()) - .setExternalUid("externalUid-1153085307") - .setStatus("status-892481550") - .setExternalSystemUpdateTime(Timestamp.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateExternalSystem(externalSystem, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateFindingTest() throws Exception { - Finding expectedResponse = - Finding.newBuilder() - .setName( - FindingName.ofOrganizationSourceFindingName( - "[ORGANIZATION]", "[SOURCE]", "[FINDING]") - .toString()) - .setParent("parent-995424086") - .setResourceName("resourceName-384566343") - .setCategory("category50511102") - .setExternalUri("externalUri-1153085023") - .putAllSourceProperties(new HashMap()) - .setSecurityMarks(SecurityMarks.newBuilder().build()) - .setEventTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setCanonicalName("canonicalName2122381727") - .setIndicator(Indicator.newBuilder().build()) - .setVulnerability(Vulnerability.newBuilder().build()) - .setMuteUpdateTime(Timestamp.newBuilder().build()) - .putAllExternalSystems(new HashMap()) - .setMitreAttack(MitreAttack.newBuilder().build()) - .setAccess(Access.newBuilder().build()) - .addAllConnections(new ArrayList()) - .setMuteInitiator("muteInitiator1395645462") - .addAllProcesses(new ArrayList()) - .putAllContacts(new HashMap()) - .addAllCompliances(new ArrayList()) - .setDescription("description-1724546052") - .setExfiltration(Exfiltration.newBuilder().build()) - .addAllIamBindings(new ArrayList()) - .setNextSteps("nextSteps1206138868") - .addAllContainers(new ArrayList()) - .setKubernetes(Kubernetes.newBuilder().build()) - .setDatabase(Database.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - Finding finding = - Finding.newBuilder() - .setName( - FindingName.ofOrganizationSourceFindingName( - "[ORGANIZATION]", "[SOURCE]", "[FINDING]") - .toString()) - .setParent("parent-995424086") - .setResourceName("resourceName-384566343") - .setCategory("category50511102") - .setExternalUri("externalUri-1153085023") - .putAllSourceProperties(new HashMap()) - .setSecurityMarks(SecurityMarks.newBuilder().build()) - .setEventTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setCanonicalName("canonicalName2122381727") - .setIndicator(Indicator.newBuilder().build()) - .setVulnerability(Vulnerability.newBuilder().build()) - .setMuteUpdateTime(Timestamp.newBuilder().build()) - .putAllExternalSystems(new HashMap()) - .setMitreAttack(MitreAttack.newBuilder().build()) - .setAccess(Access.newBuilder().build()) - .addAllConnections(new ArrayList()) - .setMuteInitiator("muteInitiator1395645462") - .addAllProcesses(new ArrayList()) - .putAllContacts(new HashMap()) - .addAllCompliances(new ArrayList()) - .setDescription("description-1724546052") - .setExfiltration(Exfiltration.newBuilder().build()) - .addAllIamBindings(new ArrayList()) - .setNextSteps("nextSteps1206138868") - .addAllContainers(new ArrayList()) - .setKubernetes(Kubernetes.newBuilder().build()) - .setDatabase(Database.newBuilder().build()) - .build(); - - Finding actualResponse = client.updateFinding(finding); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateFindingExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - Finding finding = - Finding.newBuilder() - .setName( - FindingName.ofOrganizationSourceFindingName( - "[ORGANIZATION]", "[SOURCE]", "[FINDING]") - .toString()) - .setParent("parent-995424086") - .setResourceName("resourceName-384566343") - .setCategory("category50511102") - .setExternalUri("externalUri-1153085023") - .putAllSourceProperties(new HashMap()) - .setSecurityMarks(SecurityMarks.newBuilder().build()) - .setEventTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setCanonicalName("canonicalName2122381727") - .setIndicator(Indicator.newBuilder().build()) - .setVulnerability(Vulnerability.newBuilder().build()) - .setMuteUpdateTime(Timestamp.newBuilder().build()) - .putAllExternalSystems(new HashMap()) - .setMitreAttack(MitreAttack.newBuilder().build()) - .setAccess(Access.newBuilder().build()) - .addAllConnections(new ArrayList()) - .setMuteInitiator("muteInitiator1395645462") - .addAllProcesses(new ArrayList()) - .putAllContacts(new HashMap()) - .addAllCompliances(new ArrayList()) - .setDescription("description-1724546052") - .setExfiltration(Exfiltration.newBuilder().build()) - .addAllIamBindings(new ArrayList()) - .setNextSteps("nextSteps1206138868") - .addAllContainers(new ArrayList()) - .setKubernetes(Kubernetes.newBuilder().build()) - .setDatabase(Database.newBuilder().build()) - .build(); - client.updateFinding(finding); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateMuteConfigTest() throws Exception { - MuteConfig expectedResponse = - MuteConfig.newBuilder() - .setName( - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .build(); - mockService.addResponse(expectedResponse); - - MuteConfig muteConfig = - MuteConfig.newBuilder() - .setName( - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - MuteConfig actualResponse = client.updateMuteConfig(muteConfig, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateMuteConfigExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - MuteConfig muteConfig = - MuteConfig.newBuilder() - .setName( - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateMuteConfig(muteConfig, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateNotificationConfigTest() throws Exception { - NotificationConfig expectedResponse = - NotificationConfig.newBuilder() - .setName( - NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]").toString()) - .setDescription("description-1724546052") - .setPubsubTopic("pubsubTopic255880396") - .setServiceAccount("serviceAccount1079137720") - .build(); - mockService.addResponse(expectedResponse); - - NotificationConfig notificationConfig = - NotificationConfig.newBuilder() - .setName( - NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]").toString()) - .setDescription("description-1724546052") - .setPubsubTopic("pubsubTopic255880396") - .setServiceAccount("serviceAccount1079137720") - .build(); - - NotificationConfig actualResponse = client.updateNotificationConfig(notificationConfig); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateNotificationConfigExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - NotificationConfig notificationConfig = - NotificationConfig.newBuilder() - .setName( - NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]").toString()) - .setDescription("description-1724546052") - .setPubsubTopic("pubsubTopic255880396") - .setServiceAccount("serviceAccount1079137720") - .build(); - client.updateNotificationConfig(notificationConfig); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateNotificationConfigTest2() throws Exception { - NotificationConfig expectedResponse = - NotificationConfig.newBuilder() - .setName( - NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]").toString()) - .setDescription("description-1724546052") - .setPubsubTopic("pubsubTopic255880396") - .setServiceAccount("serviceAccount1079137720") - .build(); - mockService.addResponse(expectedResponse); - - NotificationConfig notificationConfig = - NotificationConfig.newBuilder() - .setName( - NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]").toString()) - .setDescription("description-1724546052") - .setPubsubTopic("pubsubTopic255880396") - .setServiceAccount("serviceAccount1079137720") - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - NotificationConfig actualResponse = - client.updateNotificationConfig(notificationConfig, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateNotificationConfigExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - NotificationConfig notificationConfig = - NotificationConfig.newBuilder() - .setName( - NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]").toString()) - .setDescription("description-1724546052") - .setPubsubTopic("pubsubTopic255880396") - .setServiceAccount("serviceAccount1079137720") - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateNotificationConfig(notificationConfig, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateOrganizationSettingsTest() throws Exception { - OrganizationSettings expectedResponse = - OrganizationSettings.newBuilder() - .setName(OrganizationSettingsName.of("[ORGANIZATION]").toString()) - .setEnableAssetDiscovery(true) - .setAssetDiscoveryConfig(OrganizationSettings.AssetDiscoveryConfig.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - OrganizationSettings organizationSettings = - OrganizationSettings.newBuilder() - .setName(OrganizationSettingsName.of("[ORGANIZATION]").toString()) - .setEnableAssetDiscovery(true) - .setAssetDiscoveryConfig(OrganizationSettings.AssetDiscoveryConfig.newBuilder().build()) - .build(); - - OrganizationSettings actualResponse = client.updateOrganizationSettings(organizationSettings); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateOrganizationSettingsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - OrganizationSettings organizationSettings = - OrganizationSettings.newBuilder() - .setName(OrganizationSettingsName.of("[ORGANIZATION]").toString()) - .setEnableAssetDiscovery(true) - .setAssetDiscoveryConfig( - OrganizationSettings.AssetDiscoveryConfig.newBuilder().build()) - .build(); - client.updateOrganizationSettings(organizationSettings); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateSourceTest() throws Exception { - Source expectedResponse = - Source.newBuilder() - .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCanonicalName("canonicalName2122381727") - .build(); - mockService.addResponse(expectedResponse); - - Source source = - Source.newBuilder() - .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCanonicalName("canonicalName2122381727") - .build(); - - Source actualResponse = client.updateSource(source); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateSourceExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - Source source = - Source.newBuilder() - .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCanonicalName("canonicalName2122381727") - .build(); - client.updateSource(source); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateSecurityMarksTest() throws Exception { - SecurityMarks expectedResponse = - SecurityMarks.newBuilder() - .setName("name3373707") - .putAllMarks(new HashMap()) - .setCanonicalName("canonicalName2122381727") - .build(); - mockService.addResponse(expectedResponse); - - SecurityMarks securityMarks = - SecurityMarks.newBuilder() - .setName("organizations/organization-5924/assets/asset-5924/securityMarks") - .putAllMarks(new HashMap()) - .setCanonicalName("canonicalName2122381727") - .build(); - - SecurityMarks actualResponse = client.updateSecurityMarks(securityMarks); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateSecurityMarksExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - SecurityMarks securityMarks = - SecurityMarks.newBuilder() - .setName("organizations/organization-5924/assets/asset-5924/securityMarks") - .putAllMarks(new HashMap()) - .setCanonicalName("canonicalName2122381727") - .build(); - client.updateSecurityMarks(securityMarks); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createBigQueryExportTest() throws Exception { - BigQueryExport expectedResponse = - BigQueryExport.newBuilder() - .setName( - BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]") - .toString()) - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setDataset("dataset1443214456") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .setPrincipal("principal-1812041682") - .build(); - mockService.addResponse(expectedResponse); - - FolderName parent = FolderName.of("[FOLDER]"); - BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); - String bigQueryExportId = "bigQueryExportId1024198583"; - - BigQueryExport actualResponse = - client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createBigQueryExportExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - FolderName parent = FolderName.of("[FOLDER]"); - BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); - String bigQueryExportId = "bigQueryExportId1024198583"; - client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createBigQueryExportTest2() throws Exception { - BigQueryExport expectedResponse = - BigQueryExport.newBuilder() - .setName( - BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]") - .toString()) - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setDataset("dataset1443214456") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .setPrincipal("principal-1812041682") - .build(); - mockService.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); - String bigQueryExportId = "bigQueryExportId1024198583"; - - BigQueryExport actualResponse = - client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createBigQueryExportExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); - String bigQueryExportId = "bigQueryExportId1024198583"; - client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createBigQueryExportTest3() throws Exception { - BigQueryExport expectedResponse = - BigQueryExport.newBuilder() - .setName( - BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]") - .toString()) - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setDataset("dataset1443214456") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .setPrincipal("principal-1812041682") - .build(); - mockService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); - String bigQueryExportId = "bigQueryExportId1024198583"; - - BigQueryExport actualResponse = - client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createBigQueryExportExceptionTest3() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); - String bigQueryExportId = "bigQueryExportId1024198583"; - client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createBigQueryExportTest4() throws Exception { - BigQueryExport expectedResponse = - BigQueryExport.newBuilder() - .setName( - BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]") - .toString()) - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setDataset("dataset1443214456") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .setPrincipal("principal-1812041682") - .build(); - mockService.addResponse(expectedResponse); - - String parent = "organizations/organization-8287"; - BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); - String bigQueryExportId = "bigQueryExportId1024198583"; - - BigQueryExport actualResponse = - client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createBigQueryExportExceptionTest4() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "organizations/organization-8287"; - BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); - String bigQueryExportId = "bigQueryExportId1024198583"; - client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteBigQueryExportTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - BigQueryExportName name = - BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]"); - - client.deleteBigQueryExport(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteBigQueryExportExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - BigQueryExportName name = - BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]"); - client.deleteBigQueryExport(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteBigQueryExportTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "organizations/organization-3683/bigQueryExports/bigQueryExport-3683"; - - client.deleteBigQueryExport(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteBigQueryExportExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "organizations/organization-3683/bigQueryExports/bigQueryExport-3683"; - client.deleteBigQueryExport(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateBigQueryExportTest() throws Exception { - BigQueryExport expectedResponse = - BigQueryExport.newBuilder() - .setName( - BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]") - .toString()) - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setDataset("dataset1443214456") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .setPrincipal("principal-1812041682") - .build(); - mockService.addResponse(expectedResponse); - - BigQueryExport bigQueryExport = - BigQueryExport.newBuilder() - .setName( - BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]") - .toString()) - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setDataset("dataset1443214456") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .setPrincipal("principal-1812041682") - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - BigQueryExport actualResponse = client.updateBigQueryExport(bigQueryExport, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateBigQueryExportExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - BigQueryExport bigQueryExport = - BigQueryExport.newBuilder() - .setName( - BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]") - .toString()) - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setDataset("dataset1443214456") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .setPrincipal("principal-1812041682") - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateBigQueryExport(bigQueryExport, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listBigQueryExportsTest() throws Exception { - BigQueryExport responsesElement = BigQueryExport.newBuilder().build(); - ListBigQueryExportsResponse expectedResponse = - ListBigQueryExportsResponse.newBuilder() - .setNextPageToken("") - .addAllBigQueryExports(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - FolderName parent = FolderName.of("[FOLDER]"); - - ListBigQueryExportsPagedResponse pagedListResponse = client.listBigQueryExports(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBigQueryExportsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listBigQueryExportsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - FolderName parent = FolderName.of("[FOLDER]"); - client.listBigQueryExports(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listBigQueryExportsTest2() throws Exception { - BigQueryExport responsesElement = BigQueryExport.newBuilder().build(); - ListBigQueryExportsResponse expectedResponse = - ListBigQueryExportsResponse.newBuilder() - .setNextPageToken("") - .addAllBigQueryExports(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - - ListBigQueryExportsPagedResponse pagedListResponse = client.listBigQueryExports(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBigQueryExportsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listBigQueryExportsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - client.listBigQueryExports(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listBigQueryExportsTest3() throws Exception { - BigQueryExport responsesElement = BigQueryExport.newBuilder().build(); - ListBigQueryExportsResponse expectedResponse = - ListBigQueryExportsResponse.newBuilder() - .setNextPageToken("") - .addAllBigQueryExports(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - - ListBigQueryExportsPagedResponse pagedListResponse = client.listBigQueryExports(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBigQueryExportsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listBigQueryExportsExceptionTest3() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - client.listBigQueryExports(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listBigQueryExportsTest4() throws Exception { - BigQueryExport responsesElement = BigQueryExport.newBuilder().build(); - ListBigQueryExportsResponse expectedResponse = - ListBigQueryExportsResponse.newBuilder() - .setNextPageToken("") - .addAllBigQueryExports(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "organizations/organization-8287"; - - ListBigQueryExportsPagedResponse pagedListResponse = client.listBigQueryExports(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBigQueryExportsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listBigQueryExportsExceptionTest4() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "organizations/organization-8287"; - client.listBigQueryExports(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientTest.java b/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientTest.java deleted file mode 100644 index e06c74740a66..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientTest.java +++ /dev/null @@ -1,3884 +0,0 @@ -/* - * Copyright 2022 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 static com.google.cloud.securitycenter.v1.SecurityCenterClient.GroupAssetsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.GroupFindingsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListAssetsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListBigQueryExportsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListFindingsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListMuteConfigsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListNotificationConfigsPagedResponse; -import static com.google.cloud.securitycenter.v1.SecurityCenterClient.ListSourcesPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.api.gax.grpc.testing.MockServiceHelper; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.resourcenames.ResourceName; -import com.google.common.collect.Lists; -import com.google.iam.v1.AuditConfig; -import com.google.iam.v1.Binding; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Any; -import com.google.protobuf.ByteString; -import com.google.protobuf.Duration; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import com.google.protobuf.Value; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.UUID; -import java.util.concurrent.ExecutionException; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class SecurityCenterClientTest { - private static MockSecurityCenter mockSecurityCenter; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private SecurityCenterClient client; - - @BeforeClass - public static void startStaticServer() { - mockSecurityCenter = new MockSecurityCenter(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockSecurityCenter)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - SecurityCenterSettings settings = - SecurityCenterSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = SecurityCenterClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void bulkMuteFindingsTest() throws Exception { - BulkMuteFindingsResponse expectedResponse = BulkMuteFindingsResponse.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("bulkMuteFindingsTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockSecurityCenter.addResponse(resultOperation); - - ResourceName parent = FolderName.of("[FOLDER]"); - - BulkMuteFindingsResponse actualResponse = client.bulkMuteFindingsAsync(parent).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - BulkMuteFindingsRequest actualRequest = ((BulkMuteFindingsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void bulkMuteFindingsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - ResourceName parent = FolderName.of("[FOLDER]"); - client.bulkMuteFindingsAsync(parent).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void bulkMuteFindingsTest2() throws Exception { - BulkMuteFindingsResponse expectedResponse = BulkMuteFindingsResponse.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("bulkMuteFindingsTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockSecurityCenter.addResponse(resultOperation); - - String parent = "parent-995424086"; - - BulkMuteFindingsResponse actualResponse = client.bulkMuteFindingsAsync(parent).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - BulkMuteFindingsRequest actualRequest = ((BulkMuteFindingsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void bulkMuteFindingsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - String parent = "parent-995424086"; - client.bulkMuteFindingsAsync(parent).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void createSourceTest() throws Exception { - Source expectedResponse = - Source.newBuilder() - .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCanonicalName("canonicalName2122381727") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - Source source = Source.newBuilder().build(); - - Source actualResponse = client.createSource(parent, source); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateSourceRequest actualRequest = ((CreateSourceRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(source, actualRequest.getSource()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createSourceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - Source source = Source.newBuilder().build(); - client.createSource(parent, source); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createSourceTest2() throws Exception { - Source expectedResponse = - Source.newBuilder() - .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCanonicalName("canonicalName2122381727") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - String parent = "parent-995424086"; - Source source = Source.newBuilder().build(); - - Source actualResponse = client.createSource(parent, source); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateSourceRequest actualRequest = ((CreateSourceRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(source, actualRequest.getSource()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createSourceExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - String parent = "parent-995424086"; - Source source = Source.newBuilder().build(); - client.createSource(parent, source); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createFindingTest() throws Exception { - Finding expectedResponse = - Finding.newBuilder() - .setName( - FindingName.ofOrganizationSourceFindingName( - "[ORGANIZATION]", "[SOURCE]", "[FINDING]") - .toString()) - .setParent("parent-995424086") - .setResourceName("resourceName-384566343") - .setCategory("category50511102") - .setExternalUri("externalUri-1153085023") - .putAllSourceProperties(new HashMap()) - .setSecurityMarks(SecurityMarks.newBuilder().build()) - .setEventTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setCanonicalName("canonicalName2122381727") - .setIndicator(Indicator.newBuilder().build()) - .setVulnerability(Vulnerability.newBuilder().build()) - .setMuteUpdateTime(Timestamp.newBuilder().build()) - .putAllExternalSystems(new HashMap()) - .setMitreAttack(MitreAttack.newBuilder().build()) - .setAccess(Access.newBuilder().build()) - .addAllConnections(new ArrayList()) - .setMuteInitiator("muteInitiator1395645462") - .addAllProcesses(new ArrayList()) - .putAllContacts(new HashMap()) - .addAllCompliances(new ArrayList()) - .setDescription("description-1724546052") - .setExfiltration(Exfiltration.newBuilder().build()) - .addAllIamBindings(new ArrayList()) - .setNextSteps("nextSteps1206138868") - .addAllContainers(new ArrayList()) - .setKubernetes(Kubernetes.newBuilder().build()) - .setDatabase(Database.newBuilder().build()) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); - String findingId = "findingId439150212"; - Finding finding = Finding.newBuilder().build(); - - Finding actualResponse = client.createFinding(parent, findingId, finding); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateFindingRequest actualRequest = ((CreateFindingRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(findingId, actualRequest.getFindingId()); - Assert.assertEquals(finding, actualRequest.getFinding()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createFindingExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); - String findingId = "findingId439150212"; - Finding finding = Finding.newBuilder().build(); - client.createFinding(parent, findingId, finding); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createFindingTest2() throws Exception { - Finding expectedResponse = - Finding.newBuilder() - .setName( - FindingName.ofOrganizationSourceFindingName( - "[ORGANIZATION]", "[SOURCE]", "[FINDING]") - .toString()) - .setParent("parent-995424086") - .setResourceName("resourceName-384566343") - .setCategory("category50511102") - .setExternalUri("externalUri-1153085023") - .putAllSourceProperties(new HashMap()) - .setSecurityMarks(SecurityMarks.newBuilder().build()) - .setEventTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setCanonicalName("canonicalName2122381727") - .setIndicator(Indicator.newBuilder().build()) - .setVulnerability(Vulnerability.newBuilder().build()) - .setMuteUpdateTime(Timestamp.newBuilder().build()) - .putAllExternalSystems(new HashMap()) - .setMitreAttack(MitreAttack.newBuilder().build()) - .setAccess(Access.newBuilder().build()) - .addAllConnections(new ArrayList()) - .setMuteInitiator("muteInitiator1395645462") - .addAllProcesses(new ArrayList()) - .putAllContacts(new HashMap()) - .addAllCompliances(new ArrayList()) - .setDescription("description-1724546052") - .setExfiltration(Exfiltration.newBuilder().build()) - .addAllIamBindings(new ArrayList()) - .setNextSteps("nextSteps1206138868") - .addAllContainers(new ArrayList()) - .setKubernetes(Kubernetes.newBuilder().build()) - .setDatabase(Database.newBuilder().build()) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - String parent = "parent-995424086"; - String findingId = "findingId439150212"; - Finding finding = Finding.newBuilder().build(); - - Finding actualResponse = client.createFinding(parent, findingId, finding); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateFindingRequest actualRequest = ((CreateFindingRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(findingId, actualRequest.getFindingId()); - Assert.assertEquals(finding, actualRequest.getFinding()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createFindingExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - String parent = "parent-995424086"; - String findingId = "findingId439150212"; - Finding finding = Finding.newBuilder().build(); - client.createFinding(parent, findingId, finding); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createMuteConfigTest() throws Exception { - MuteConfig expectedResponse = - MuteConfig.newBuilder() - .setName( - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - FolderName parent = FolderName.of("[FOLDER]"); - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - - MuteConfig actualResponse = client.createMuteConfig(parent, muteConfig); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateMuteConfigRequest actualRequest = ((CreateMuteConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(muteConfig, actualRequest.getMuteConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createMuteConfigExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - FolderName parent = FolderName.of("[FOLDER]"); - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - client.createMuteConfig(parent, muteConfig); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createMuteConfigTest2() throws Exception { - MuteConfig expectedResponse = - MuteConfig.newBuilder() - .setName( - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - - MuteConfig actualResponse = client.createMuteConfig(parent, muteConfig); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateMuteConfigRequest actualRequest = ((CreateMuteConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(muteConfig, actualRequest.getMuteConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createMuteConfigExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - client.createMuteConfig(parent, muteConfig); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createMuteConfigTest3() throws Exception { - MuteConfig expectedResponse = - MuteConfig.newBuilder() - .setName( - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - - MuteConfig actualResponse = client.createMuteConfig(parent, muteConfig); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateMuteConfigRequest actualRequest = ((CreateMuteConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(muteConfig, actualRequest.getMuteConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createMuteConfigExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - client.createMuteConfig(parent, muteConfig); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createMuteConfigTest4() throws Exception { - MuteConfig expectedResponse = - MuteConfig.newBuilder() - .setName( - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - String parent = "parent-995424086"; - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - - MuteConfig actualResponse = client.createMuteConfig(parent, muteConfig); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateMuteConfigRequest actualRequest = ((CreateMuteConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(muteConfig, actualRequest.getMuteConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createMuteConfigExceptionTest4() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - String parent = "parent-995424086"; - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - client.createMuteConfig(parent, muteConfig); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createMuteConfigTest5() throws Exception { - MuteConfig expectedResponse = - MuteConfig.newBuilder() - .setName( - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - FolderName parent = FolderName.of("[FOLDER]"); - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - String muteConfigId = "muteConfigId1689669942"; - - MuteConfig actualResponse = client.createMuteConfig(parent, muteConfig, muteConfigId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateMuteConfigRequest actualRequest = ((CreateMuteConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(muteConfig, actualRequest.getMuteConfig()); - Assert.assertEquals(muteConfigId, actualRequest.getMuteConfigId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createMuteConfigExceptionTest5() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - FolderName parent = FolderName.of("[FOLDER]"); - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - String muteConfigId = "muteConfigId1689669942"; - client.createMuteConfig(parent, muteConfig, muteConfigId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createMuteConfigTest6() throws Exception { - MuteConfig expectedResponse = - MuteConfig.newBuilder() - .setName( - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - String muteConfigId = "muteConfigId1689669942"; - - MuteConfig actualResponse = client.createMuteConfig(parent, muteConfig, muteConfigId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateMuteConfigRequest actualRequest = ((CreateMuteConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(muteConfig, actualRequest.getMuteConfig()); - Assert.assertEquals(muteConfigId, actualRequest.getMuteConfigId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createMuteConfigExceptionTest6() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - String muteConfigId = "muteConfigId1689669942"; - client.createMuteConfig(parent, muteConfig, muteConfigId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createMuteConfigTest7() throws Exception { - MuteConfig expectedResponse = - MuteConfig.newBuilder() - .setName( - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - String muteConfigId = "muteConfigId1689669942"; - - MuteConfig actualResponse = client.createMuteConfig(parent, muteConfig, muteConfigId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateMuteConfigRequest actualRequest = ((CreateMuteConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(muteConfig, actualRequest.getMuteConfig()); - Assert.assertEquals(muteConfigId, actualRequest.getMuteConfigId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createMuteConfigExceptionTest7() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - String muteConfigId = "muteConfigId1689669942"; - client.createMuteConfig(parent, muteConfig, muteConfigId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createMuteConfigTest8() throws Exception { - MuteConfig expectedResponse = - MuteConfig.newBuilder() - .setName( - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - String parent = "parent-995424086"; - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - String muteConfigId = "muteConfigId1689669942"; - - MuteConfig actualResponse = client.createMuteConfig(parent, muteConfig, muteConfigId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateMuteConfigRequest actualRequest = ((CreateMuteConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(muteConfig, actualRequest.getMuteConfig()); - Assert.assertEquals(muteConfigId, actualRequest.getMuteConfigId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createMuteConfigExceptionTest8() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - String parent = "parent-995424086"; - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - String muteConfigId = "muteConfigId1689669942"; - client.createMuteConfig(parent, muteConfig, muteConfigId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createNotificationConfigTest() throws Exception { - NotificationConfig expectedResponse = - NotificationConfig.newBuilder() - .setName( - NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]").toString()) - .setDescription("description-1724546052") - .setPubsubTopic("pubsubTopic255880396") - .setServiceAccount("serviceAccount1079137720") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); - - NotificationConfig actualResponse = client.createNotificationConfig(parent, notificationConfig); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateNotificationConfigRequest actualRequest = - ((CreateNotificationConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(notificationConfig, actualRequest.getNotificationConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createNotificationConfigExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); - client.createNotificationConfig(parent, notificationConfig); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createNotificationConfigTest2() throws Exception { - NotificationConfig expectedResponse = - NotificationConfig.newBuilder() - .setName( - NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]").toString()) - .setDescription("description-1724546052") - .setPubsubTopic("pubsubTopic255880396") - .setServiceAccount("serviceAccount1079137720") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - String parent = "parent-995424086"; - NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); - - NotificationConfig actualResponse = client.createNotificationConfig(parent, notificationConfig); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateNotificationConfigRequest actualRequest = - ((CreateNotificationConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(notificationConfig, actualRequest.getNotificationConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createNotificationConfigExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - String parent = "parent-995424086"; - NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); - client.createNotificationConfig(parent, notificationConfig); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createNotificationConfigTest3() throws Exception { - NotificationConfig expectedResponse = - NotificationConfig.newBuilder() - .setName( - NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]").toString()) - .setDescription("description-1724546052") - .setPubsubTopic("pubsubTopic255880396") - .setServiceAccount("serviceAccount1079137720") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - String configId = "configId-580140035"; - NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); - - NotificationConfig actualResponse = - client.createNotificationConfig(parent, configId, notificationConfig); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateNotificationConfigRequest actualRequest = - ((CreateNotificationConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(configId, actualRequest.getConfigId()); - Assert.assertEquals(notificationConfig, actualRequest.getNotificationConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createNotificationConfigExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - String configId = "configId-580140035"; - NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); - client.createNotificationConfig(parent, configId, notificationConfig); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createNotificationConfigTest4() throws Exception { - NotificationConfig expectedResponse = - NotificationConfig.newBuilder() - .setName( - NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]").toString()) - .setDescription("description-1724546052") - .setPubsubTopic("pubsubTopic255880396") - .setServiceAccount("serviceAccount1079137720") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - String parent = "parent-995424086"; - String configId = "configId-580140035"; - NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); - - NotificationConfig actualResponse = - client.createNotificationConfig(parent, configId, notificationConfig); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateNotificationConfigRequest actualRequest = - ((CreateNotificationConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(configId, actualRequest.getConfigId()); - Assert.assertEquals(notificationConfig, actualRequest.getNotificationConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createNotificationConfigExceptionTest4() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - String parent = "parent-995424086"; - String configId = "configId-580140035"; - NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); - client.createNotificationConfig(parent, configId, notificationConfig); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteMuteConfigTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockSecurityCenter.addResponse(expectedResponse); - - MuteConfigName name = - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]"); - - client.deleteMuteConfig(name); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteMuteConfigRequest actualRequest = ((DeleteMuteConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteMuteConfigExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - MuteConfigName name = - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]"); - client.deleteMuteConfig(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteMuteConfigTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockSecurityCenter.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteMuteConfig(name); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteMuteConfigRequest actualRequest = ((DeleteMuteConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteMuteConfigExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - String name = "name3373707"; - client.deleteMuteConfig(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteNotificationConfigTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockSecurityCenter.addResponse(expectedResponse); - - NotificationConfigName name = - NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]"); - - client.deleteNotificationConfig(name); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteNotificationConfigRequest actualRequest = - ((DeleteNotificationConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteNotificationConfigExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - NotificationConfigName name = - NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]"); - client.deleteNotificationConfig(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteNotificationConfigTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockSecurityCenter.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteNotificationConfig(name); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteNotificationConfigRequest actualRequest = - ((DeleteNotificationConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteNotificationConfigExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - String name = "name3373707"; - client.deleteNotificationConfig(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getBigQueryExportTest() throws Exception { - BigQueryExport expectedResponse = - BigQueryExport.newBuilder() - .setName( - BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]") - .toString()) - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setDataset("dataset1443214456") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .setPrincipal("principal-1812041682") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - BigQueryExportName name = - BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]"); - - BigQueryExport actualResponse = client.getBigQueryExport(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetBigQueryExportRequest actualRequest = ((GetBigQueryExportRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getBigQueryExportExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - BigQueryExportName name = - BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]"); - client.getBigQueryExport(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getBigQueryExportTest2() throws Exception { - BigQueryExport expectedResponse = - BigQueryExport.newBuilder() - .setName( - BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]") - .toString()) - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setDataset("dataset1443214456") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .setPrincipal("principal-1812041682") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - String name = "name3373707"; - - BigQueryExport actualResponse = client.getBigQueryExport(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetBigQueryExportRequest actualRequest = ((GetBigQueryExportRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getBigQueryExportExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - String name = "name3373707"; - client.getBigQueryExport(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getIamPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); - - 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(resource.toString(), actualRequest.getResource()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getIamPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); - client.getIamPolicy(resource); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getIamPolicyTest2() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - String resource = "resource-341064690"; - - 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(resource, actualRequest.getResource()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getIamPolicyExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - String resource = "resource-341064690"; - client.getIamPolicy(resource); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getMuteConfigTest() throws Exception { - MuteConfig expectedResponse = - MuteConfig.newBuilder() - .setName( - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - MuteConfigName name = - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]"); - - MuteConfig actualResponse = client.getMuteConfig(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetMuteConfigRequest actualRequest = ((GetMuteConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getMuteConfigExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - MuteConfigName name = - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]"); - client.getMuteConfig(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getMuteConfigTest2() throws Exception { - MuteConfig expectedResponse = - MuteConfig.newBuilder() - .setName( - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - String name = "name3373707"; - - MuteConfig actualResponse = client.getMuteConfig(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetMuteConfigRequest actualRequest = ((GetMuteConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getMuteConfigExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - String name = "name3373707"; - client.getMuteConfig(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getNotificationConfigTest() throws Exception { - NotificationConfig expectedResponse = - NotificationConfig.newBuilder() - .setName( - NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]").toString()) - .setDescription("description-1724546052") - .setPubsubTopic("pubsubTopic255880396") - .setServiceAccount("serviceAccount1079137720") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - NotificationConfigName name = - NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]"); - - NotificationConfig actualResponse = client.getNotificationConfig(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetNotificationConfigRequest actualRequest = - ((GetNotificationConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getNotificationConfigExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - NotificationConfigName name = - NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]"); - client.getNotificationConfig(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getNotificationConfigTest2() throws Exception { - NotificationConfig expectedResponse = - NotificationConfig.newBuilder() - .setName( - NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]").toString()) - .setDescription("description-1724546052") - .setPubsubTopic("pubsubTopic255880396") - .setServiceAccount("serviceAccount1079137720") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - String name = "name3373707"; - - NotificationConfig actualResponse = client.getNotificationConfig(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetNotificationConfigRequest actualRequest = - ((GetNotificationConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getNotificationConfigExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - String name = "name3373707"; - client.getNotificationConfig(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getOrganizationSettingsTest() throws Exception { - OrganizationSettings expectedResponse = - OrganizationSettings.newBuilder() - .setName(OrganizationSettingsName.of("[ORGANIZATION]").toString()) - .setEnableAssetDiscovery(true) - .setAssetDiscoveryConfig(OrganizationSettings.AssetDiscoveryConfig.newBuilder().build()) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - OrganizationSettingsName name = OrganizationSettingsName.of("[ORGANIZATION]"); - - OrganizationSettings actualResponse = client.getOrganizationSettings(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetOrganizationSettingsRequest actualRequest = - ((GetOrganizationSettingsRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getOrganizationSettingsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - OrganizationSettingsName name = OrganizationSettingsName.of("[ORGANIZATION]"); - client.getOrganizationSettings(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getOrganizationSettingsTest2() throws Exception { - OrganizationSettings expectedResponse = - OrganizationSettings.newBuilder() - .setName(OrganizationSettingsName.of("[ORGANIZATION]").toString()) - .setEnableAssetDiscovery(true) - .setAssetDiscoveryConfig(OrganizationSettings.AssetDiscoveryConfig.newBuilder().build()) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - String name = "name3373707"; - - OrganizationSettings actualResponse = client.getOrganizationSettings(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetOrganizationSettingsRequest actualRequest = - ((GetOrganizationSettingsRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getOrganizationSettingsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - String name = "name3373707"; - client.getOrganizationSettings(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getSourceTest() throws Exception { - Source expectedResponse = - Source.newBuilder() - .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCanonicalName("canonicalName2122381727") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - SourceName name = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); - - Source actualResponse = client.getSource(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetSourceRequest actualRequest = ((GetSourceRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getSourceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - SourceName name = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); - client.getSource(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getSourceTest2() throws Exception { - Source expectedResponse = - Source.newBuilder() - .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCanonicalName("canonicalName2122381727") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - String name = "name3373707"; - - Source actualResponse = client.getSource(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetSourceRequest actualRequest = ((GetSourceRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getSourceExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - String name = "name3373707"; - client.getSource(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void groupAssetsTest() throws Exception { - GroupResult responsesElement = GroupResult.newBuilder().build(); - GroupAssetsResponse expectedResponse = - GroupAssetsResponse.newBuilder() - .setNextPageToken("") - .addAllGroupByResults(Arrays.asList(responsesElement)) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - GroupAssetsRequest request = - GroupAssetsRequest.newBuilder() - .setParent(OrganizationName.of("[ORGANIZATION]").toString()) - .setFilter("filter-1274492040") - .setGroupBy("groupBy293428022") - .setCompareDuration(Duration.newBuilder().build()) - .setReadTime(Timestamp.newBuilder().build()) - .setPageToken("pageToken873572522") - .setPageSize(883849137) - .build(); - - 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()); - GroupAssetsRequest actualRequest = ((GroupAssetsRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getParent(), actualRequest.getParent()); - Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); - Assert.assertEquals(request.getGroupBy(), actualRequest.getGroupBy()); - Assert.assertEquals(request.getCompareDuration(), actualRequest.getCompareDuration()); - Assert.assertEquals(request.getReadTime(), actualRequest.getReadTime()); - Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); - Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void groupAssetsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - GroupAssetsRequest request = - GroupAssetsRequest.newBuilder() - .setParent(OrganizationName.of("[ORGANIZATION]").toString()) - .setFilter("filter-1274492040") - .setGroupBy("groupBy293428022") - .setCompareDuration(Duration.newBuilder().build()) - .setReadTime(Timestamp.newBuilder().build()) - .setPageToken("pageToken873572522") - .setPageSize(883849137) - .build(); - client.groupAssets(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void groupFindingsTest() throws Exception { - GroupResult responsesElement = GroupResult.newBuilder().build(); - GroupFindingsResponse expectedResponse = - GroupFindingsResponse.newBuilder() - .setNextPageToken("") - .addAllGroupByResults(Arrays.asList(responsesElement)) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); - String groupBy = "groupBy293428022"; - - 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()); - GroupFindingsRequest actualRequest = ((GroupFindingsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(groupBy, actualRequest.getGroupBy()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void groupFindingsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); - String groupBy = "groupBy293428022"; - client.groupFindings(parent, groupBy); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void groupFindingsTest2() throws Exception { - GroupResult responsesElement = GroupResult.newBuilder().build(); - GroupFindingsResponse expectedResponse = - GroupFindingsResponse.newBuilder() - .setNextPageToken("") - .addAllGroupByResults(Arrays.asList(responsesElement)) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - String parent = "parent-995424086"; - String groupBy = "groupBy293428022"; - - 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()); - GroupFindingsRequest actualRequest = ((GroupFindingsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(groupBy, actualRequest.getGroupBy()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void groupFindingsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - String parent = "parent-995424086"; - String groupBy = "groupBy293428022"; - client.groupFindings(parent, groupBy); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listAssetsTest() throws Exception { - ListAssetsResponse.ListAssetsResult responsesElement = - ListAssetsResponse.ListAssetsResult.newBuilder().build(); - ListAssetsResponse expectedResponse = - ListAssetsResponse.newBuilder() - .setNextPageToken("") - .addAllListAssetsResults(Arrays.asList(responsesElement)) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - ListAssetsRequest request = - ListAssetsRequest.newBuilder() - .setParent(OrganizationName.of("[ORGANIZATION]").toString()) - .setFilter("filter-1274492040") - .setOrderBy("orderBy-1207110587") - .setReadTime(Timestamp.newBuilder().build()) - .setCompareDuration(Duration.newBuilder().build()) - .setFieldMask(FieldMask.newBuilder().build()) - .setPageToken("pageToken873572522") - .setPageSize(883849137) - .build(); - - ListAssetsPagedResponse pagedListResponse = client.listAssets(request); - - List resources = - Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getListAssetsResultsList().get(0), resources.get(0)); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListAssetsRequest actualRequest = ((ListAssetsRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getParent(), actualRequest.getParent()); - Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); - Assert.assertEquals(request.getOrderBy(), actualRequest.getOrderBy()); - Assert.assertEquals(request.getReadTime(), actualRequest.getReadTime()); - Assert.assertEquals(request.getCompareDuration(), actualRequest.getCompareDuration()); - Assert.assertEquals(request.getFieldMask(), actualRequest.getFieldMask()); - Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); - Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listAssetsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - ListAssetsRequest request = - ListAssetsRequest.newBuilder() - .setParent(OrganizationName.of("[ORGANIZATION]").toString()) - .setFilter("filter-1274492040") - .setOrderBy("orderBy-1207110587") - .setReadTime(Timestamp.newBuilder().build()) - .setCompareDuration(Duration.newBuilder().build()) - .setFieldMask(FieldMask.newBuilder().build()) - .setPageToken("pageToken873572522") - .setPageSize(883849137) - .build(); - client.listAssets(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listFindingsTest() throws Exception { - ListFindingsResponse.ListFindingsResult responsesElement = - ListFindingsResponse.ListFindingsResult.newBuilder().build(); - ListFindingsResponse expectedResponse = - ListFindingsResponse.newBuilder() - .setNextPageToken("") - .addAllListFindingsResults(Arrays.asList(responsesElement)) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - ListFindingsRequest request = - ListFindingsRequest.newBuilder() - .setParent(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) - .setFilter("filter-1274492040") - .setOrderBy("orderBy-1207110587") - .setReadTime(Timestamp.newBuilder().build()) - .setCompareDuration(Duration.newBuilder().build()) - .setFieldMask(FieldMask.newBuilder().build()) - .setPageToken("pageToken873572522") - .setPageSize(883849137) - .build(); - - ListFindingsPagedResponse pagedListResponse = client.listFindings(request); - - List resources = - Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getListFindingsResultsList().get(0), resources.get(0)); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListFindingsRequest actualRequest = ((ListFindingsRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getParent(), actualRequest.getParent()); - Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); - Assert.assertEquals(request.getOrderBy(), actualRequest.getOrderBy()); - Assert.assertEquals(request.getReadTime(), actualRequest.getReadTime()); - Assert.assertEquals(request.getCompareDuration(), actualRequest.getCompareDuration()); - Assert.assertEquals(request.getFieldMask(), actualRequest.getFieldMask()); - Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); - Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listFindingsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - ListFindingsRequest request = - ListFindingsRequest.newBuilder() - .setParent( - SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) - .setFilter("filter-1274492040") - .setOrderBy("orderBy-1207110587") - .setReadTime(Timestamp.newBuilder().build()) - .setCompareDuration(Duration.newBuilder().build()) - .setFieldMask(FieldMask.newBuilder().build()) - .setPageToken("pageToken873572522") - .setPageSize(883849137) - .build(); - client.listFindings(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listMuteConfigsTest() throws Exception { - MuteConfig responsesElement = MuteConfig.newBuilder().build(); - ListMuteConfigsResponse expectedResponse = - ListMuteConfigsResponse.newBuilder() - .setNextPageToken("") - .addAllMuteConfigs(Arrays.asList(responsesElement)) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - FolderName parent = FolderName.of("[FOLDER]"); - - ListMuteConfigsPagedResponse pagedListResponse = client.listMuteConfigs(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getMuteConfigsList().get(0), resources.get(0)); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListMuteConfigsRequest actualRequest = ((ListMuteConfigsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listMuteConfigsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - FolderName parent = FolderName.of("[FOLDER]"); - client.listMuteConfigs(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listMuteConfigsTest2() throws Exception { - MuteConfig responsesElement = MuteConfig.newBuilder().build(); - ListMuteConfigsResponse expectedResponse = - ListMuteConfigsResponse.newBuilder() - .setNextPageToken("") - .addAllMuteConfigs(Arrays.asList(responsesElement)) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - - ListMuteConfigsPagedResponse pagedListResponse = client.listMuteConfigs(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getMuteConfigsList().get(0), resources.get(0)); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListMuteConfigsRequest actualRequest = ((ListMuteConfigsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listMuteConfigsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - client.listMuteConfigs(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listMuteConfigsTest3() throws Exception { - MuteConfig responsesElement = MuteConfig.newBuilder().build(); - ListMuteConfigsResponse expectedResponse = - ListMuteConfigsResponse.newBuilder() - .setNextPageToken("") - .addAllMuteConfigs(Arrays.asList(responsesElement)) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - - ListMuteConfigsPagedResponse pagedListResponse = client.listMuteConfigs(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getMuteConfigsList().get(0), resources.get(0)); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListMuteConfigsRequest actualRequest = ((ListMuteConfigsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listMuteConfigsExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - client.listMuteConfigs(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listMuteConfigsTest4() throws Exception { - MuteConfig responsesElement = MuteConfig.newBuilder().build(); - ListMuteConfigsResponse expectedResponse = - ListMuteConfigsResponse.newBuilder() - .setNextPageToken("") - .addAllMuteConfigs(Arrays.asList(responsesElement)) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListMuteConfigsPagedResponse pagedListResponse = client.listMuteConfigs(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getMuteConfigsList().get(0), resources.get(0)); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListMuteConfigsRequest actualRequest = ((ListMuteConfigsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listMuteConfigsExceptionTest4() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - String parent = "parent-995424086"; - client.listMuteConfigs(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listNotificationConfigsTest() throws Exception { - NotificationConfig responsesElement = NotificationConfig.newBuilder().build(); - ListNotificationConfigsResponse expectedResponse = - ListNotificationConfigsResponse.newBuilder() - .setNextPageToken("") - .addAllNotificationConfigs(Arrays.asList(responsesElement)) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - - ListNotificationConfigsPagedResponse pagedListResponse = client.listNotificationConfigs(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getNotificationConfigsList().get(0), resources.get(0)); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListNotificationConfigsRequest actualRequest = - ((ListNotificationConfigsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listNotificationConfigsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - client.listNotificationConfigs(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listNotificationConfigsTest2() throws Exception { - NotificationConfig responsesElement = NotificationConfig.newBuilder().build(); - ListNotificationConfigsResponse expectedResponse = - ListNotificationConfigsResponse.newBuilder() - .setNextPageToken("") - .addAllNotificationConfigs(Arrays.asList(responsesElement)) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListNotificationConfigsPagedResponse pagedListResponse = client.listNotificationConfigs(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getNotificationConfigsList().get(0), resources.get(0)); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListNotificationConfigsRequest actualRequest = - ((ListNotificationConfigsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listNotificationConfigsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - String parent = "parent-995424086"; - client.listNotificationConfigs(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listSourcesTest() throws Exception { - Source responsesElement = Source.newBuilder().build(); - ListSourcesResponse expectedResponse = - ListSourcesResponse.newBuilder() - .setNextPageToken("") - .addAllSources(Arrays.asList(responsesElement)) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - FolderName parent = FolderName.of("[FOLDER]"); - - ListSourcesPagedResponse pagedListResponse = client.listSources(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getSourcesList().get(0), resources.get(0)); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListSourcesRequest actualRequest = ((ListSourcesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listSourcesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - FolderName parent = FolderName.of("[FOLDER]"); - client.listSources(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listSourcesTest2() throws Exception { - Source responsesElement = Source.newBuilder().build(); - ListSourcesResponse expectedResponse = - ListSourcesResponse.newBuilder() - .setNextPageToken("") - .addAllSources(Arrays.asList(responsesElement)) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - - ListSourcesPagedResponse pagedListResponse = client.listSources(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getSourcesList().get(0), resources.get(0)); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListSourcesRequest actualRequest = ((ListSourcesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listSourcesExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - client.listSources(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listSourcesTest3() throws Exception { - Source responsesElement = Source.newBuilder().build(); - ListSourcesResponse expectedResponse = - ListSourcesResponse.newBuilder() - .setNextPageToken("") - .addAllSources(Arrays.asList(responsesElement)) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - - ListSourcesPagedResponse pagedListResponse = client.listSources(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getSourcesList().get(0), resources.get(0)); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListSourcesRequest actualRequest = ((ListSourcesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listSourcesExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - client.listSources(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listSourcesTest4() throws Exception { - Source responsesElement = Source.newBuilder().build(); - ListSourcesResponse expectedResponse = - ListSourcesResponse.newBuilder() - .setNextPageToken("") - .addAllSources(Arrays.asList(responsesElement)) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListSourcesPagedResponse pagedListResponse = client.listSources(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getSourcesList().get(0), resources.get(0)); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListSourcesRequest actualRequest = ((ListSourcesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listSourcesExceptionTest4() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - String parent = "parent-995424086"; - client.listSources(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void runAssetDiscoveryTest() throws Exception { - RunAssetDiscoveryResponse expectedResponse = - RunAssetDiscoveryResponse.newBuilder().setDuration(Duration.newBuilder().build()).build(); - Operation resultOperation = - Operation.newBuilder() - .setName("runAssetDiscoveryTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockSecurityCenter.addResponse(resultOperation); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - - RunAssetDiscoveryResponse actualResponse = client.runAssetDiscoveryAsync(parent).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RunAssetDiscoveryRequest actualRequest = ((RunAssetDiscoveryRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void runAssetDiscoveryExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - client.runAssetDiscoveryAsync(parent).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void runAssetDiscoveryTest2() throws Exception { - RunAssetDiscoveryResponse expectedResponse = - RunAssetDiscoveryResponse.newBuilder().setDuration(Duration.newBuilder().build()).build(); - Operation resultOperation = - Operation.newBuilder() - .setName("runAssetDiscoveryTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockSecurityCenter.addResponse(resultOperation); - - String parent = "parent-995424086"; - - RunAssetDiscoveryResponse actualResponse = client.runAssetDiscoveryAsync(parent).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RunAssetDiscoveryRequest actualRequest = ((RunAssetDiscoveryRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void runAssetDiscoveryExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - String parent = "parent-995424086"; - client.runAssetDiscoveryAsync(parent).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void setFindingStateTest() throws Exception { - Finding expectedResponse = - Finding.newBuilder() - .setName( - FindingName.ofOrganizationSourceFindingName( - "[ORGANIZATION]", "[SOURCE]", "[FINDING]") - .toString()) - .setParent("parent-995424086") - .setResourceName("resourceName-384566343") - .setCategory("category50511102") - .setExternalUri("externalUri-1153085023") - .putAllSourceProperties(new HashMap()) - .setSecurityMarks(SecurityMarks.newBuilder().build()) - .setEventTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setCanonicalName("canonicalName2122381727") - .setIndicator(Indicator.newBuilder().build()) - .setVulnerability(Vulnerability.newBuilder().build()) - .setMuteUpdateTime(Timestamp.newBuilder().build()) - .putAllExternalSystems(new HashMap()) - .setMitreAttack(MitreAttack.newBuilder().build()) - .setAccess(Access.newBuilder().build()) - .addAllConnections(new ArrayList()) - .setMuteInitiator("muteInitiator1395645462") - .addAllProcesses(new ArrayList()) - .putAllContacts(new HashMap()) - .addAllCompliances(new ArrayList()) - .setDescription("description-1724546052") - .setExfiltration(Exfiltration.newBuilder().build()) - .addAllIamBindings(new ArrayList()) - .setNextSteps("nextSteps1206138868") - .addAllContainers(new ArrayList()) - .setKubernetes(Kubernetes.newBuilder().build()) - .setDatabase(Database.newBuilder().build()) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - FindingName name = - FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]"); - Finding.State state = Finding.State.forNumber(0); - Timestamp startTime = Timestamp.newBuilder().build(); - - Finding actualResponse = client.setFindingState(name, state, startTime); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - SetFindingStateRequest actualRequest = ((SetFindingStateRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertEquals(state, actualRequest.getState()); - Assert.assertEquals(startTime, actualRequest.getStartTime()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void setFindingStateExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - FindingName name = - FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]"); - Finding.State state = Finding.State.forNumber(0); - Timestamp startTime = Timestamp.newBuilder().build(); - client.setFindingState(name, state, startTime); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void setFindingStateTest2() throws Exception { - Finding expectedResponse = - Finding.newBuilder() - .setName( - FindingName.ofOrganizationSourceFindingName( - "[ORGANIZATION]", "[SOURCE]", "[FINDING]") - .toString()) - .setParent("parent-995424086") - .setResourceName("resourceName-384566343") - .setCategory("category50511102") - .setExternalUri("externalUri-1153085023") - .putAllSourceProperties(new HashMap()) - .setSecurityMarks(SecurityMarks.newBuilder().build()) - .setEventTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setCanonicalName("canonicalName2122381727") - .setIndicator(Indicator.newBuilder().build()) - .setVulnerability(Vulnerability.newBuilder().build()) - .setMuteUpdateTime(Timestamp.newBuilder().build()) - .putAllExternalSystems(new HashMap()) - .setMitreAttack(MitreAttack.newBuilder().build()) - .setAccess(Access.newBuilder().build()) - .addAllConnections(new ArrayList()) - .setMuteInitiator("muteInitiator1395645462") - .addAllProcesses(new ArrayList()) - .putAllContacts(new HashMap()) - .addAllCompliances(new ArrayList()) - .setDescription("description-1724546052") - .setExfiltration(Exfiltration.newBuilder().build()) - .addAllIamBindings(new ArrayList()) - .setNextSteps("nextSteps1206138868") - .addAllContainers(new ArrayList()) - .setKubernetes(Kubernetes.newBuilder().build()) - .setDatabase(Database.newBuilder().build()) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - String name = "name3373707"; - Finding.State state = Finding.State.forNumber(0); - Timestamp startTime = Timestamp.newBuilder().build(); - - Finding actualResponse = client.setFindingState(name, state, startTime); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - SetFindingStateRequest actualRequest = ((SetFindingStateRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertEquals(state, actualRequest.getState()); - Assert.assertEquals(startTime, actualRequest.getStartTime()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void setFindingStateExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - String name = "name3373707"; - Finding.State state = Finding.State.forNumber(0); - Timestamp startTime = Timestamp.newBuilder().build(); - client.setFindingState(name, state, startTime); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void setMuteTest() throws Exception { - Finding expectedResponse = - Finding.newBuilder() - .setName( - FindingName.ofOrganizationSourceFindingName( - "[ORGANIZATION]", "[SOURCE]", "[FINDING]") - .toString()) - .setParent("parent-995424086") - .setResourceName("resourceName-384566343") - .setCategory("category50511102") - .setExternalUri("externalUri-1153085023") - .putAllSourceProperties(new HashMap()) - .setSecurityMarks(SecurityMarks.newBuilder().build()) - .setEventTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setCanonicalName("canonicalName2122381727") - .setIndicator(Indicator.newBuilder().build()) - .setVulnerability(Vulnerability.newBuilder().build()) - .setMuteUpdateTime(Timestamp.newBuilder().build()) - .putAllExternalSystems(new HashMap()) - .setMitreAttack(MitreAttack.newBuilder().build()) - .setAccess(Access.newBuilder().build()) - .addAllConnections(new ArrayList()) - .setMuteInitiator("muteInitiator1395645462") - .addAllProcesses(new ArrayList()) - .putAllContacts(new HashMap()) - .addAllCompliances(new ArrayList()) - .setDescription("description-1724546052") - .setExfiltration(Exfiltration.newBuilder().build()) - .addAllIamBindings(new ArrayList()) - .setNextSteps("nextSteps1206138868") - .addAllContainers(new ArrayList()) - .setKubernetes(Kubernetes.newBuilder().build()) - .setDatabase(Database.newBuilder().build()) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - FindingName name = - FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]"); - Finding.Mute mute = Finding.Mute.forNumber(0); - - Finding actualResponse = client.setMute(name, mute); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - SetMuteRequest actualRequest = ((SetMuteRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertEquals(mute, actualRequest.getMute()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void setMuteExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - FindingName name = - FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]"); - Finding.Mute mute = Finding.Mute.forNumber(0); - client.setMute(name, mute); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void setMuteTest2() throws Exception { - Finding expectedResponse = - Finding.newBuilder() - .setName( - FindingName.ofOrganizationSourceFindingName( - "[ORGANIZATION]", "[SOURCE]", "[FINDING]") - .toString()) - .setParent("parent-995424086") - .setResourceName("resourceName-384566343") - .setCategory("category50511102") - .setExternalUri("externalUri-1153085023") - .putAllSourceProperties(new HashMap()) - .setSecurityMarks(SecurityMarks.newBuilder().build()) - .setEventTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setCanonicalName("canonicalName2122381727") - .setIndicator(Indicator.newBuilder().build()) - .setVulnerability(Vulnerability.newBuilder().build()) - .setMuteUpdateTime(Timestamp.newBuilder().build()) - .putAllExternalSystems(new HashMap()) - .setMitreAttack(MitreAttack.newBuilder().build()) - .setAccess(Access.newBuilder().build()) - .addAllConnections(new ArrayList()) - .setMuteInitiator("muteInitiator1395645462") - .addAllProcesses(new ArrayList()) - .putAllContacts(new HashMap()) - .addAllCompliances(new ArrayList()) - .setDescription("description-1724546052") - .setExfiltration(Exfiltration.newBuilder().build()) - .addAllIamBindings(new ArrayList()) - .setNextSteps("nextSteps1206138868") - .addAllContainers(new ArrayList()) - .setKubernetes(Kubernetes.newBuilder().build()) - .setDatabase(Database.newBuilder().build()) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - String name = "name3373707"; - Finding.Mute mute = Finding.Mute.forNumber(0); - - Finding actualResponse = client.setMute(name, mute); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - SetMuteRequest actualRequest = ((SetMuteRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertEquals(mute, actualRequest.getMute()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void setMuteExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - String name = "name3373707"; - Finding.Mute mute = Finding.Mute.forNumber(0); - client.setMute(name, mute); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void setIamPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); - Policy policy = Policy.newBuilder().build(); - - Policy actualResponse = client.setIamPolicy(resource, policy); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(resource.toString(), actualRequest.getResource()); - Assert.assertEquals(policy, actualRequest.getPolicy()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void setIamPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); - Policy policy = Policy.newBuilder().build(); - client.setIamPolicy(resource, policy); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void setIamPolicyTest2() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - String resource = "resource-341064690"; - Policy policy = Policy.newBuilder().build(); - - Policy actualResponse = client.setIamPolicy(resource, policy); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(resource, actualRequest.getResource()); - Assert.assertEquals(policy, actualRequest.getPolicy()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void setIamPolicyExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - String resource = "resource-341064690"; - Policy policy = Policy.newBuilder().build(); - client.setIamPolicy(resource, policy); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void testIamPermissionsTest() throws Exception { - TestIamPermissionsResponse expectedResponse = - TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); - mockSecurityCenter.addResponse(expectedResponse); - - ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); - 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(resource.toString(), actualRequest.getResource()); - Assert.assertEquals(permissions, actualRequest.getPermissionsList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void testIamPermissionsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]"); - List permissions = new ArrayList<>(); - client.testIamPermissions(resource, permissions); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void testIamPermissionsTest2() throws Exception { - TestIamPermissionsResponse expectedResponse = - TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); - mockSecurityCenter.addResponse(expectedResponse); - - String resource = "resource-341064690"; - 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(resource, actualRequest.getResource()); - Assert.assertEquals(permissions, actualRequest.getPermissionsList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void testIamPermissionsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - String resource = "resource-341064690"; - List permissions = new ArrayList<>(); - client.testIamPermissions(resource, permissions); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateExternalSystemTest() throws Exception { - ExternalSystem expectedResponse = - ExternalSystem.newBuilder() - .setName("name3373707") - .addAllAssignees(new ArrayList()) - .setExternalUid("externalUid-1153085307") - .setStatus("status-892481550") - .setExternalSystemUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - ExternalSystem externalSystem = ExternalSystem.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - ExternalSystem actualResponse = client.updateExternalSystem(externalSystem, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateExternalSystemRequest actualRequest = - ((UpdateExternalSystemRequest) actualRequests.get(0)); - - Assert.assertEquals(externalSystem, actualRequest.getExternalSystem()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateExternalSystemExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - ExternalSystem externalSystem = ExternalSystem.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateExternalSystem(externalSystem, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateFindingTest() throws Exception { - Finding expectedResponse = - Finding.newBuilder() - .setName( - FindingName.ofOrganizationSourceFindingName( - "[ORGANIZATION]", "[SOURCE]", "[FINDING]") - .toString()) - .setParent("parent-995424086") - .setResourceName("resourceName-384566343") - .setCategory("category50511102") - .setExternalUri("externalUri-1153085023") - .putAllSourceProperties(new HashMap()) - .setSecurityMarks(SecurityMarks.newBuilder().build()) - .setEventTime(Timestamp.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setCanonicalName("canonicalName2122381727") - .setIndicator(Indicator.newBuilder().build()) - .setVulnerability(Vulnerability.newBuilder().build()) - .setMuteUpdateTime(Timestamp.newBuilder().build()) - .putAllExternalSystems(new HashMap()) - .setMitreAttack(MitreAttack.newBuilder().build()) - .setAccess(Access.newBuilder().build()) - .addAllConnections(new ArrayList()) - .setMuteInitiator("muteInitiator1395645462") - .addAllProcesses(new ArrayList()) - .putAllContacts(new HashMap()) - .addAllCompliances(new ArrayList()) - .setDescription("description-1724546052") - .setExfiltration(Exfiltration.newBuilder().build()) - .addAllIamBindings(new ArrayList()) - .setNextSteps("nextSteps1206138868") - .addAllContainers(new ArrayList()) - .setKubernetes(Kubernetes.newBuilder().build()) - .setDatabase(Database.newBuilder().build()) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - Finding finding = Finding.newBuilder().build(); - - Finding actualResponse = client.updateFinding(finding); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateFindingRequest actualRequest = ((UpdateFindingRequest) actualRequests.get(0)); - - Assert.assertEquals(finding, actualRequest.getFinding()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateFindingExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - Finding finding = Finding.newBuilder().build(); - client.updateFinding(finding); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateMuteConfigTest() throws Exception { - MuteConfig expectedResponse = - MuteConfig.newBuilder() - .setName( - MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - MuteConfig actualResponse = client.updateMuteConfig(muteConfig, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateMuteConfigRequest actualRequest = ((UpdateMuteConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(muteConfig, actualRequest.getMuteConfig()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateMuteConfigExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - MuteConfig muteConfig = MuteConfig.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateMuteConfig(muteConfig, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateNotificationConfigTest() throws Exception { - NotificationConfig expectedResponse = - NotificationConfig.newBuilder() - .setName( - NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]").toString()) - .setDescription("description-1724546052") - .setPubsubTopic("pubsubTopic255880396") - .setServiceAccount("serviceAccount1079137720") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); - - NotificationConfig actualResponse = client.updateNotificationConfig(notificationConfig); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateNotificationConfigRequest actualRequest = - ((UpdateNotificationConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(notificationConfig, actualRequest.getNotificationConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateNotificationConfigExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); - client.updateNotificationConfig(notificationConfig); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateNotificationConfigTest2() throws Exception { - NotificationConfig expectedResponse = - NotificationConfig.newBuilder() - .setName( - NotificationConfigName.of("[ORGANIZATION]", "[NOTIFICATION_CONFIG]").toString()) - .setDescription("description-1724546052") - .setPubsubTopic("pubsubTopic255880396") - .setServiceAccount("serviceAccount1079137720") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - NotificationConfig actualResponse = - client.updateNotificationConfig(notificationConfig, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateNotificationConfigRequest actualRequest = - ((UpdateNotificationConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(notificationConfig, actualRequest.getNotificationConfig()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateNotificationConfigExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateNotificationConfig(notificationConfig, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateOrganizationSettingsTest() throws Exception { - OrganizationSettings expectedResponse = - OrganizationSettings.newBuilder() - .setName(OrganizationSettingsName.of("[ORGANIZATION]").toString()) - .setEnableAssetDiscovery(true) - .setAssetDiscoveryConfig(OrganizationSettings.AssetDiscoveryConfig.newBuilder().build()) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - OrganizationSettings organizationSettings = OrganizationSettings.newBuilder().build(); - - OrganizationSettings actualResponse = client.updateOrganizationSettings(organizationSettings); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateOrganizationSettingsRequest actualRequest = - ((UpdateOrganizationSettingsRequest) actualRequests.get(0)); - - Assert.assertEquals(organizationSettings, actualRequest.getOrganizationSettings()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateOrganizationSettingsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - OrganizationSettings organizationSettings = OrganizationSettings.newBuilder().build(); - client.updateOrganizationSettings(organizationSettings); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateSourceTest() throws Exception { - Source expectedResponse = - Source.newBuilder() - .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCanonicalName("canonicalName2122381727") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - Source source = Source.newBuilder().build(); - - Source actualResponse = client.updateSource(source); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateSourceRequest actualRequest = ((UpdateSourceRequest) actualRequests.get(0)); - - Assert.assertEquals(source, actualRequest.getSource()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateSourceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - Source source = Source.newBuilder().build(); - client.updateSource(source); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateSecurityMarksTest() throws Exception { - SecurityMarks expectedResponse = - SecurityMarks.newBuilder() - .setName("name3373707") - .putAllMarks(new HashMap()) - .setCanonicalName("canonicalName2122381727") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - SecurityMarks securityMarks = SecurityMarks.newBuilder().build(); - - SecurityMarks actualResponse = client.updateSecurityMarks(securityMarks); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateSecurityMarksRequest actualRequest = ((UpdateSecurityMarksRequest) actualRequests.get(0)); - - Assert.assertEquals(securityMarks, actualRequest.getSecurityMarks()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateSecurityMarksExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - SecurityMarks securityMarks = SecurityMarks.newBuilder().build(); - client.updateSecurityMarks(securityMarks); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createBigQueryExportTest() throws Exception { - BigQueryExport expectedResponse = - BigQueryExport.newBuilder() - .setName( - BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]") - .toString()) - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setDataset("dataset1443214456") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .setPrincipal("principal-1812041682") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - FolderName parent = FolderName.of("[FOLDER]"); - BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); - String bigQueryExportId = "bigQueryExportId1024198583"; - - BigQueryExport actualResponse = - client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateBigQueryExportRequest actualRequest = - ((CreateBigQueryExportRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(bigQueryExport, actualRequest.getBigQueryExport()); - Assert.assertEquals(bigQueryExportId, actualRequest.getBigQueryExportId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createBigQueryExportExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - FolderName parent = FolderName.of("[FOLDER]"); - BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); - String bigQueryExportId = "bigQueryExportId1024198583"; - client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createBigQueryExportTest2() throws Exception { - BigQueryExport expectedResponse = - BigQueryExport.newBuilder() - .setName( - BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]") - .toString()) - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setDataset("dataset1443214456") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .setPrincipal("principal-1812041682") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); - String bigQueryExportId = "bigQueryExportId1024198583"; - - BigQueryExport actualResponse = - client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateBigQueryExportRequest actualRequest = - ((CreateBigQueryExportRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(bigQueryExport, actualRequest.getBigQueryExport()); - Assert.assertEquals(bigQueryExportId, actualRequest.getBigQueryExportId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createBigQueryExportExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); - String bigQueryExportId = "bigQueryExportId1024198583"; - client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createBigQueryExportTest3() throws Exception { - BigQueryExport expectedResponse = - BigQueryExport.newBuilder() - .setName( - BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]") - .toString()) - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setDataset("dataset1443214456") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .setPrincipal("principal-1812041682") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); - String bigQueryExportId = "bigQueryExportId1024198583"; - - BigQueryExport actualResponse = - client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateBigQueryExportRequest actualRequest = - ((CreateBigQueryExportRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(bigQueryExport, actualRequest.getBigQueryExport()); - Assert.assertEquals(bigQueryExportId, actualRequest.getBigQueryExportId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createBigQueryExportExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); - String bigQueryExportId = "bigQueryExportId1024198583"; - client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createBigQueryExportTest4() throws Exception { - BigQueryExport expectedResponse = - BigQueryExport.newBuilder() - .setName( - BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]") - .toString()) - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setDataset("dataset1443214456") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .setPrincipal("principal-1812041682") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - String parent = "parent-995424086"; - BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); - String bigQueryExportId = "bigQueryExportId1024198583"; - - BigQueryExport actualResponse = - client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateBigQueryExportRequest actualRequest = - ((CreateBigQueryExportRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(bigQueryExport, actualRequest.getBigQueryExport()); - Assert.assertEquals(bigQueryExportId, actualRequest.getBigQueryExportId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createBigQueryExportExceptionTest4() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - String parent = "parent-995424086"; - BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); - String bigQueryExportId = "bigQueryExportId1024198583"; - client.createBigQueryExport(parent, bigQueryExport, bigQueryExportId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteBigQueryExportTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockSecurityCenter.addResponse(expectedResponse); - - BigQueryExportName name = - BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]"); - - client.deleteBigQueryExport(name); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteBigQueryExportRequest actualRequest = - ((DeleteBigQueryExportRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteBigQueryExportExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - BigQueryExportName name = - BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]"); - client.deleteBigQueryExport(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteBigQueryExportTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockSecurityCenter.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteBigQueryExport(name); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteBigQueryExportRequest actualRequest = - ((DeleteBigQueryExportRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteBigQueryExportExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - String name = "name3373707"; - client.deleteBigQueryExport(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateBigQueryExportTest() throws Exception { - BigQueryExport expectedResponse = - BigQueryExport.newBuilder() - .setName( - BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]") - .toString()) - .setDescription("description-1724546052") - .setFilter("filter-1274492040") - .setDataset("dataset1443214456") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setMostRecentEditor("mostRecentEditor-833861941") - .setPrincipal("principal-1812041682") - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - BigQueryExport actualResponse = client.updateBigQueryExport(bigQueryExport, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateBigQueryExportRequest actualRequest = - ((UpdateBigQueryExportRequest) actualRequests.get(0)); - - Assert.assertEquals(bigQueryExport, actualRequest.getBigQueryExport()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateBigQueryExportExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateBigQueryExport(bigQueryExport, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listBigQueryExportsTest() throws Exception { - BigQueryExport responsesElement = BigQueryExport.newBuilder().build(); - ListBigQueryExportsResponse expectedResponse = - ListBigQueryExportsResponse.newBuilder() - .setNextPageToken("") - .addAllBigQueryExports(Arrays.asList(responsesElement)) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - FolderName parent = FolderName.of("[FOLDER]"); - - ListBigQueryExportsPagedResponse pagedListResponse = client.listBigQueryExports(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBigQueryExportsList().get(0), resources.get(0)); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListBigQueryExportsRequest actualRequest = ((ListBigQueryExportsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listBigQueryExportsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - FolderName parent = FolderName.of("[FOLDER]"); - client.listBigQueryExports(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listBigQueryExportsTest2() throws Exception { - BigQueryExport responsesElement = BigQueryExport.newBuilder().build(); - ListBigQueryExportsResponse expectedResponse = - ListBigQueryExportsResponse.newBuilder() - .setNextPageToken("") - .addAllBigQueryExports(Arrays.asList(responsesElement)) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - - ListBigQueryExportsPagedResponse pagedListResponse = client.listBigQueryExports(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBigQueryExportsList().get(0), resources.get(0)); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListBigQueryExportsRequest actualRequest = ((ListBigQueryExportsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listBigQueryExportsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - client.listBigQueryExports(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listBigQueryExportsTest3() throws Exception { - BigQueryExport responsesElement = BigQueryExport.newBuilder().build(); - ListBigQueryExportsResponse expectedResponse = - ListBigQueryExportsResponse.newBuilder() - .setNextPageToken("") - .addAllBigQueryExports(Arrays.asList(responsesElement)) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - - ListBigQueryExportsPagedResponse pagedListResponse = client.listBigQueryExports(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBigQueryExportsList().get(0), resources.get(0)); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListBigQueryExportsRequest actualRequest = ((ListBigQueryExportsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listBigQueryExportsExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - client.listBigQueryExports(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listBigQueryExportsTest4() throws Exception { - BigQueryExport responsesElement = BigQueryExport.newBuilder().build(); - ListBigQueryExportsResponse expectedResponse = - ListBigQueryExportsResponse.newBuilder() - .setNextPageToken("") - .addAllBigQueryExports(Arrays.asList(responsesElement)) - .build(); - mockSecurityCenter.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListBigQueryExportsPagedResponse pagedListResponse = client.listBigQueryExports(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBigQueryExportsList().get(0), resources.get(0)); - - List actualRequests = mockSecurityCenter.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListBigQueryExportsRequest actualRequest = ((ListBigQueryExportsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listBigQueryExportsExceptionTest4() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSecurityCenter.addException(exception); - - try { - String parent = "parent-995424086"; - client.listBigQueryExports(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/owl-bot-staging/java-securitycenter/v1/grpc-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterGrpc.java b/owl-bot-staging/java-securitycenter/v1/grpc-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterGrpc.java deleted file mode 100644 index be404ce375c6..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/grpc-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterGrpc.java +++ /dev/null @@ -1,3397 +0,0 @@ -package com.google.cloud.securitycenter.v1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - *
- * V1 APIs for Security Center service.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/securitycenter/v1/securitycenter_service.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class SecurityCenterGrpc { - - private SecurityCenterGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.securitycenter.v1.SecurityCenter"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getBulkMuteFindingsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "BulkMuteFindings", - requestType = com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getBulkMuteFindingsMethod() { - io.grpc.MethodDescriptor getBulkMuteFindingsMethod; - if ((getBulkMuteFindingsMethod = SecurityCenterGrpc.getBulkMuteFindingsMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getBulkMuteFindingsMethod = SecurityCenterGrpc.getBulkMuteFindingsMethod) == null) { - SecurityCenterGrpc.getBulkMuteFindingsMethod = getBulkMuteFindingsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BulkMuteFindings")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("BulkMuteFindings")) - .build(); - } - } - } - return getBulkMuteFindingsMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateSourceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateSource", - requestType = com.google.cloud.securitycenter.v1.CreateSourceRequest.class, - responseType = com.google.cloud.securitycenter.v1.Source.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateSourceMethod() { - io.grpc.MethodDescriptor getCreateSourceMethod; - if ((getCreateSourceMethod = SecurityCenterGrpc.getCreateSourceMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getCreateSourceMethod = SecurityCenterGrpc.getCreateSourceMethod) == null) { - SecurityCenterGrpc.getCreateSourceMethod = getCreateSourceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateSource")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.CreateSourceRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.Source.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("CreateSource")) - .build(); - } - } - } - return getCreateSourceMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateFindingMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateFinding", - requestType = com.google.cloud.securitycenter.v1.CreateFindingRequest.class, - responseType = com.google.cloud.securitycenter.v1.Finding.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateFindingMethod() { - io.grpc.MethodDescriptor getCreateFindingMethod; - if ((getCreateFindingMethod = SecurityCenterGrpc.getCreateFindingMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getCreateFindingMethod = SecurityCenterGrpc.getCreateFindingMethod) == null) { - SecurityCenterGrpc.getCreateFindingMethod = getCreateFindingMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateFinding")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.CreateFindingRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.Finding.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("CreateFinding")) - .build(); - } - } - } - return getCreateFindingMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateMuteConfigMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateMuteConfig", - requestType = com.google.cloud.securitycenter.v1.CreateMuteConfigRequest.class, - responseType = com.google.cloud.securitycenter.v1.MuteConfig.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateMuteConfigMethod() { - io.grpc.MethodDescriptor getCreateMuteConfigMethod; - if ((getCreateMuteConfigMethod = SecurityCenterGrpc.getCreateMuteConfigMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getCreateMuteConfigMethod = SecurityCenterGrpc.getCreateMuteConfigMethod) == null) { - SecurityCenterGrpc.getCreateMuteConfigMethod = getCreateMuteConfigMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateMuteConfig")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.CreateMuteConfigRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.MuteConfig.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("CreateMuteConfig")) - .build(); - } - } - } - return getCreateMuteConfigMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateNotificationConfigMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateNotificationConfig", - requestType = com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest.class, - responseType = com.google.cloud.securitycenter.v1.NotificationConfig.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateNotificationConfigMethod() { - io.grpc.MethodDescriptor getCreateNotificationConfigMethod; - if ((getCreateNotificationConfigMethod = SecurityCenterGrpc.getCreateNotificationConfigMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getCreateNotificationConfigMethod = SecurityCenterGrpc.getCreateNotificationConfigMethod) == null) { - SecurityCenterGrpc.getCreateNotificationConfigMethod = getCreateNotificationConfigMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateNotificationConfig")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.NotificationConfig.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("CreateNotificationConfig")) - .build(); - } - } - } - return getCreateNotificationConfigMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteMuteConfigMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteMuteConfig", - requestType = com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteMuteConfigMethod() { - io.grpc.MethodDescriptor getDeleteMuteConfigMethod; - if ((getDeleteMuteConfigMethod = SecurityCenterGrpc.getDeleteMuteConfigMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getDeleteMuteConfigMethod = SecurityCenterGrpc.getDeleteMuteConfigMethod) == null) { - SecurityCenterGrpc.getDeleteMuteConfigMethod = getDeleteMuteConfigMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteMuteConfig")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("DeleteMuteConfig")) - .build(); - } - } - } - return getDeleteMuteConfigMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteNotificationConfigMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteNotificationConfig", - requestType = com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteNotificationConfigMethod() { - io.grpc.MethodDescriptor getDeleteNotificationConfigMethod; - if ((getDeleteNotificationConfigMethod = SecurityCenterGrpc.getDeleteNotificationConfigMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getDeleteNotificationConfigMethod = SecurityCenterGrpc.getDeleteNotificationConfigMethod) == null) { - SecurityCenterGrpc.getDeleteNotificationConfigMethod = getDeleteNotificationConfigMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteNotificationConfig")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("DeleteNotificationConfig")) - .build(); - } - } - } - return getDeleteNotificationConfigMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetBigQueryExportMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetBigQueryExport", - requestType = com.google.cloud.securitycenter.v1.GetBigQueryExportRequest.class, - responseType = com.google.cloud.securitycenter.v1.BigQueryExport.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetBigQueryExportMethod() { - io.grpc.MethodDescriptor getGetBigQueryExportMethod; - if ((getGetBigQueryExportMethod = SecurityCenterGrpc.getGetBigQueryExportMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getGetBigQueryExportMethod = SecurityCenterGrpc.getGetBigQueryExportMethod) == null) { - SecurityCenterGrpc.getGetBigQueryExportMethod = getGetBigQueryExportMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBigQueryExport")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.GetBigQueryExportRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.BigQueryExport.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("GetBigQueryExport")) - .build(); - } - } - } - return getGetBigQueryExportMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetIamPolicyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetIamPolicy", - requestType = com.google.iam.v1.GetIamPolicyRequest.class, - responseType = com.google.iam.v1.Policy.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetIamPolicyMethod() { - io.grpc.MethodDescriptor getGetIamPolicyMethod; - if ((getGetIamPolicyMethod = SecurityCenterGrpc.getGetIamPolicyMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getGetIamPolicyMethod = SecurityCenterGrpc.getGetIamPolicyMethod) == null) { - SecurityCenterGrpc.getGetIamPolicyMethod = getGetIamPolicyMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetIamPolicy")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.iam.v1.GetIamPolicyRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.iam.v1.Policy.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("GetIamPolicy")) - .build(); - } - } - } - return getGetIamPolicyMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetMuteConfigMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetMuteConfig", - requestType = com.google.cloud.securitycenter.v1.GetMuteConfigRequest.class, - responseType = com.google.cloud.securitycenter.v1.MuteConfig.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetMuteConfigMethod() { - io.grpc.MethodDescriptor getGetMuteConfigMethod; - if ((getGetMuteConfigMethod = SecurityCenterGrpc.getGetMuteConfigMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getGetMuteConfigMethod = SecurityCenterGrpc.getGetMuteConfigMethod) == null) { - SecurityCenterGrpc.getGetMuteConfigMethod = getGetMuteConfigMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetMuteConfig")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.GetMuteConfigRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.MuteConfig.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("GetMuteConfig")) - .build(); - } - } - } - return getGetMuteConfigMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetNotificationConfigMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetNotificationConfig", - requestType = com.google.cloud.securitycenter.v1.GetNotificationConfigRequest.class, - responseType = com.google.cloud.securitycenter.v1.NotificationConfig.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetNotificationConfigMethod() { - io.grpc.MethodDescriptor getGetNotificationConfigMethod; - if ((getGetNotificationConfigMethod = SecurityCenterGrpc.getGetNotificationConfigMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getGetNotificationConfigMethod = SecurityCenterGrpc.getGetNotificationConfigMethod) == null) { - SecurityCenterGrpc.getGetNotificationConfigMethod = getGetNotificationConfigMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNotificationConfig")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.GetNotificationConfigRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.NotificationConfig.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("GetNotificationConfig")) - .build(); - } - } - } - return getGetNotificationConfigMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetOrganizationSettingsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetOrganizationSettings", - requestType = com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest.class, - responseType = com.google.cloud.securitycenter.v1.OrganizationSettings.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetOrganizationSettingsMethod() { - io.grpc.MethodDescriptor getGetOrganizationSettingsMethod; - if ((getGetOrganizationSettingsMethod = SecurityCenterGrpc.getGetOrganizationSettingsMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getGetOrganizationSettingsMethod = SecurityCenterGrpc.getGetOrganizationSettingsMethod) == null) { - SecurityCenterGrpc.getGetOrganizationSettingsMethod = getGetOrganizationSettingsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetOrganizationSettings")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.OrganizationSettings.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("GetOrganizationSettings")) - .build(); - } - } - } - return getGetOrganizationSettingsMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetSourceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetSource", - requestType = com.google.cloud.securitycenter.v1.GetSourceRequest.class, - responseType = com.google.cloud.securitycenter.v1.Source.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetSourceMethod() { - io.grpc.MethodDescriptor getGetSourceMethod; - if ((getGetSourceMethod = SecurityCenterGrpc.getGetSourceMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getGetSourceMethod = SecurityCenterGrpc.getGetSourceMethod) == null) { - SecurityCenterGrpc.getGetSourceMethod = getGetSourceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSource")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.GetSourceRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.Source.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("GetSource")) - .build(); - } - } - } - return getGetSourceMethod; - } - - private static volatile io.grpc.MethodDescriptor getGroupAssetsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GroupAssets", - requestType = com.google.cloud.securitycenter.v1.GroupAssetsRequest.class, - responseType = com.google.cloud.securitycenter.v1.GroupAssetsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGroupAssetsMethod() { - io.grpc.MethodDescriptor getGroupAssetsMethod; - if ((getGroupAssetsMethod = SecurityCenterGrpc.getGroupAssetsMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getGroupAssetsMethod = SecurityCenterGrpc.getGroupAssetsMethod) == null) { - SecurityCenterGrpc.getGroupAssetsMethod = getGroupAssetsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GroupAssets")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.GroupAssetsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.GroupAssetsResponse.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("GroupAssets")) - .build(); - } - } - } - return getGroupAssetsMethod; - } - - private static volatile io.grpc.MethodDescriptor getGroupFindingsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GroupFindings", - requestType = com.google.cloud.securitycenter.v1.GroupFindingsRequest.class, - responseType = com.google.cloud.securitycenter.v1.GroupFindingsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGroupFindingsMethod() { - io.grpc.MethodDescriptor getGroupFindingsMethod; - if ((getGroupFindingsMethod = SecurityCenterGrpc.getGroupFindingsMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getGroupFindingsMethod = SecurityCenterGrpc.getGroupFindingsMethod) == null) { - SecurityCenterGrpc.getGroupFindingsMethod = getGroupFindingsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GroupFindings")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.GroupFindingsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.GroupFindingsResponse.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("GroupFindings")) - .build(); - } - } - } - return getGroupFindingsMethod; - } - - private static volatile io.grpc.MethodDescriptor getListAssetsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListAssets", - requestType = com.google.cloud.securitycenter.v1.ListAssetsRequest.class, - responseType = com.google.cloud.securitycenter.v1.ListAssetsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListAssetsMethod() { - io.grpc.MethodDescriptor getListAssetsMethod; - if ((getListAssetsMethod = SecurityCenterGrpc.getListAssetsMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getListAssetsMethod = SecurityCenterGrpc.getListAssetsMethod) == null) { - SecurityCenterGrpc.getListAssetsMethod = getListAssetsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAssets")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.ListAssetsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.ListAssetsResponse.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("ListAssets")) - .build(); - } - } - } - return getListAssetsMethod; - } - - private static volatile io.grpc.MethodDescriptor getListFindingsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListFindings", - requestType = com.google.cloud.securitycenter.v1.ListFindingsRequest.class, - responseType = com.google.cloud.securitycenter.v1.ListFindingsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListFindingsMethod() { - io.grpc.MethodDescriptor getListFindingsMethod; - if ((getListFindingsMethod = SecurityCenterGrpc.getListFindingsMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getListFindingsMethod = SecurityCenterGrpc.getListFindingsMethod) == null) { - SecurityCenterGrpc.getListFindingsMethod = getListFindingsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListFindings")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.ListFindingsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.ListFindingsResponse.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("ListFindings")) - .build(); - } - } - } - return getListFindingsMethod; - } - - private static volatile io.grpc.MethodDescriptor getListMuteConfigsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListMuteConfigs", - requestType = com.google.cloud.securitycenter.v1.ListMuteConfigsRequest.class, - responseType = com.google.cloud.securitycenter.v1.ListMuteConfigsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListMuteConfigsMethod() { - io.grpc.MethodDescriptor getListMuteConfigsMethod; - if ((getListMuteConfigsMethod = SecurityCenterGrpc.getListMuteConfigsMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getListMuteConfigsMethod = SecurityCenterGrpc.getListMuteConfigsMethod) == null) { - SecurityCenterGrpc.getListMuteConfigsMethod = getListMuteConfigsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListMuteConfigs")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.ListMuteConfigsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.ListMuteConfigsResponse.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("ListMuteConfigs")) - .build(); - } - } - } - return getListMuteConfigsMethod; - } - - private static volatile io.grpc.MethodDescriptor getListNotificationConfigsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListNotificationConfigs", - requestType = com.google.cloud.securitycenter.v1.ListNotificationConfigsRequest.class, - responseType = com.google.cloud.securitycenter.v1.ListNotificationConfigsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListNotificationConfigsMethod() { - io.grpc.MethodDescriptor getListNotificationConfigsMethod; - if ((getListNotificationConfigsMethod = SecurityCenterGrpc.getListNotificationConfigsMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getListNotificationConfigsMethod = SecurityCenterGrpc.getListNotificationConfigsMethod) == null) { - SecurityCenterGrpc.getListNotificationConfigsMethod = getListNotificationConfigsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListNotificationConfigs")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.ListNotificationConfigsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.ListNotificationConfigsResponse.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("ListNotificationConfigs")) - .build(); - } - } - } - return getListNotificationConfigsMethod; - } - - private static volatile io.grpc.MethodDescriptor getListSourcesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListSources", - requestType = com.google.cloud.securitycenter.v1.ListSourcesRequest.class, - responseType = com.google.cloud.securitycenter.v1.ListSourcesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListSourcesMethod() { - io.grpc.MethodDescriptor getListSourcesMethod; - if ((getListSourcesMethod = SecurityCenterGrpc.getListSourcesMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getListSourcesMethod = SecurityCenterGrpc.getListSourcesMethod) == null) { - SecurityCenterGrpc.getListSourcesMethod = getListSourcesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSources")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.ListSourcesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.ListSourcesResponse.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("ListSources")) - .build(); - } - } - } - return getListSourcesMethod; - } - - private static volatile io.grpc.MethodDescriptor getRunAssetDiscoveryMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RunAssetDiscovery", - requestType = com.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRunAssetDiscoveryMethod() { - io.grpc.MethodDescriptor getRunAssetDiscoveryMethod; - if ((getRunAssetDiscoveryMethod = SecurityCenterGrpc.getRunAssetDiscoveryMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getRunAssetDiscoveryMethod = SecurityCenterGrpc.getRunAssetDiscoveryMethod) == null) { - SecurityCenterGrpc.getRunAssetDiscoveryMethod = getRunAssetDiscoveryMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RunAssetDiscovery")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("RunAssetDiscovery")) - .build(); - } - } - } - return getRunAssetDiscoveryMethod; - } - - private static volatile io.grpc.MethodDescriptor getSetFindingStateMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SetFindingState", - requestType = com.google.cloud.securitycenter.v1.SetFindingStateRequest.class, - responseType = com.google.cloud.securitycenter.v1.Finding.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSetFindingStateMethod() { - io.grpc.MethodDescriptor getSetFindingStateMethod; - if ((getSetFindingStateMethod = SecurityCenterGrpc.getSetFindingStateMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getSetFindingStateMethod = SecurityCenterGrpc.getSetFindingStateMethod) == null) { - SecurityCenterGrpc.getSetFindingStateMethod = getSetFindingStateMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetFindingState")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.SetFindingStateRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.Finding.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("SetFindingState")) - .build(); - } - } - } - return getSetFindingStateMethod; - } - - private static volatile io.grpc.MethodDescriptor getSetMuteMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SetMute", - requestType = com.google.cloud.securitycenter.v1.SetMuteRequest.class, - responseType = com.google.cloud.securitycenter.v1.Finding.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSetMuteMethod() { - io.grpc.MethodDescriptor getSetMuteMethod; - if ((getSetMuteMethod = SecurityCenterGrpc.getSetMuteMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getSetMuteMethod = SecurityCenterGrpc.getSetMuteMethod) == null) { - SecurityCenterGrpc.getSetMuteMethod = getSetMuteMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetMute")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.SetMuteRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.Finding.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("SetMute")) - .build(); - } - } - } - return getSetMuteMethod; - } - - private static volatile io.grpc.MethodDescriptor getSetIamPolicyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SetIamPolicy", - requestType = com.google.iam.v1.SetIamPolicyRequest.class, - responseType = com.google.iam.v1.Policy.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSetIamPolicyMethod() { - io.grpc.MethodDescriptor getSetIamPolicyMethod; - if ((getSetIamPolicyMethod = SecurityCenterGrpc.getSetIamPolicyMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getSetIamPolicyMethod = SecurityCenterGrpc.getSetIamPolicyMethod) == null) { - SecurityCenterGrpc.getSetIamPolicyMethod = getSetIamPolicyMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetIamPolicy")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.iam.v1.SetIamPolicyRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.iam.v1.Policy.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("SetIamPolicy")) - .build(); - } - } - } - return getSetIamPolicyMethod; - } - - private static volatile io.grpc.MethodDescriptor getTestIamPermissionsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "TestIamPermissions", - requestType = com.google.iam.v1.TestIamPermissionsRequest.class, - responseType = com.google.iam.v1.TestIamPermissionsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getTestIamPermissionsMethod() { - io.grpc.MethodDescriptor getTestIamPermissionsMethod; - if ((getTestIamPermissionsMethod = SecurityCenterGrpc.getTestIamPermissionsMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getTestIamPermissionsMethod = SecurityCenterGrpc.getTestIamPermissionsMethod) == null) { - SecurityCenterGrpc.getTestIamPermissionsMethod = getTestIamPermissionsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "TestIamPermissions")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.iam.v1.TestIamPermissionsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.iam.v1.TestIamPermissionsResponse.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("TestIamPermissions")) - .build(); - } - } - } - return getTestIamPermissionsMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateExternalSystemMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateExternalSystem", - requestType = com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest.class, - responseType = com.google.cloud.securitycenter.v1.ExternalSystem.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateExternalSystemMethod() { - io.grpc.MethodDescriptor getUpdateExternalSystemMethod; - if ((getUpdateExternalSystemMethod = SecurityCenterGrpc.getUpdateExternalSystemMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getUpdateExternalSystemMethod = SecurityCenterGrpc.getUpdateExternalSystemMethod) == null) { - SecurityCenterGrpc.getUpdateExternalSystemMethod = getUpdateExternalSystemMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateExternalSystem")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.ExternalSystem.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("UpdateExternalSystem")) - .build(); - } - } - } - return getUpdateExternalSystemMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateFindingMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateFinding", - requestType = com.google.cloud.securitycenter.v1.UpdateFindingRequest.class, - responseType = com.google.cloud.securitycenter.v1.Finding.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateFindingMethod() { - io.grpc.MethodDescriptor getUpdateFindingMethod; - if ((getUpdateFindingMethod = SecurityCenterGrpc.getUpdateFindingMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getUpdateFindingMethod = SecurityCenterGrpc.getUpdateFindingMethod) == null) { - SecurityCenterGrpc.getUpdateFindingMethod = getUpdateFindingMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateFinding")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.UpdateFindingRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.Finding.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("UpdateFinding")) - .build(); - } - } - } - return getUpdateFindingMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateMuteConfigMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateMuteConfig", - requestType = com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest.class, - responseType = com.google.cloud.securitycenter.v1.MuteConfig.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateMuteConfigMethod() { - io.grpc.MethodDescriptor getUpdateMuteConfigMethod; - if ((getUpdateMuteConfigMethod = SecurityCenterGrpc.getUpdateMuteConfigMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getUpdateMuteConfigMethod = SecurityCenterGrpc.getUpdateMuteConfigMethod) == null) { - SecurityCenterGrpc.getUpdateMuteConfigMethod = getUpdateMuteConfigMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateMuteConfig")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.MuteConfig.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("UpdateMuteConfig")) - .build(); - } - } - } - return getUpdateMuteConfigMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateNotificationConfigMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateNotificationConfig", - requestType = com.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest.class, - responseType = com.google.cloud.securitycenter.v1.NotificationConfig.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateNotificationConfigMethod() { - io.grpc.MethodDescriptor getUpdateNotificationConfigMethod; - if ((getUpdateNotificationConfigMethod = SecurityCenterGrpc.getUpdateNotificationConfigMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getUpdateNotificationConfigMethod = SecurityCenterGrpc.getUpdateNotificationConfigMethod) == null) { - SecurityCenterGrpc.getUpdateNotificationConfigMethod = getUpdateNotificationConfigMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateNotificationConfig")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.NotificationConfig.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("UpdateNotificationConfig")) - .build(); - } - } - } - return getUpdateNotificationConfigMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateOrganizationSettingsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateOrganizationSettings", - requestType = com.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest.class, - responseType = com.google.cloud.securitycenter.v1.OrganizationSettings.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateOrganizationSettingsMethod() { - io.grpc.MethodDescriptor getUpdateOrganizationSettingsMethod; - if ((getUpdateOrganizationSettingsMethod = SecurityCenterGrpc.getUpdateOrganizationSettingsMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getUpdateOrganizationSettingsMethod = SecurityCenterGrpc.getUpdateOrganizationSettingsMethod) == null) { - SecurityCenterGrpc.getUpdateOrganizationSettingsMethod = getUpdateOrganizationSettingsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateOrganizationSettings")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.OrganizationSettings.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("UpdateOrganizationSettings")) - .build(); - } - } - } - return getUpdateOrganizationSettingsMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateSourceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateSource", - requestType = com.google.cloud.securitycenter.v1.UpdateSourceRequest.class, - responseType = com.google.cloud.securitycenter.v1.Source.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateSourceMethod() { - io.grpc.MethodDescriptor getUpdateSourceMethod; - if ((getUpdateSourceMethod = SecurityCenterGrpc.getUpdateSourceMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getUpdateSourceMethod = SecurityCenterGrpc.getUpdateSourceMethod) == null) { - SecurityCenterGrpc.getUpdateSourceMethod = getUpdateSourceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateSource")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.UpdateSourceRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.Source.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("UpdateSource")) - .build(); - } - } - } - return getUpdateSourceMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateSecurityMarksMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateSecurityMarks", - requestType = com.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest.class, - responseType = com.google.cloud.securitycenter.v1.SecurityMarks.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateSecurityMarksMethod() { - io.grpc.MethodDescriptor getUpdateSecurityMarksMethod; - if ((getUpdateSecurityMarksMethod = SecurityCenterGrpc.getUpdateSecurityMarksMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getUpdateSecurityMarksMethod = SecurityCenterGrpc.getUpdateSecurityMarksMethod) == null) { - SecurityCenterGrpc.getUpdateSecurityMarksMethod = getUpdateSecurityMarksMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateSecurityMarks")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.SecurityMarks.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("UpdateSecurityMarks")) - .build(); - } - } - } - return getUpdateSecurityMarksMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateBigQueryExportMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateBigQueryExport", - requestType = com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest.class, - responseType = com.google.cloud.securitycenter.v1.BigQueryExport.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateBigQueryExportMethod() { - io.grpc.MethodDescriptor getCreateBigQueryExportMethod; - if ((getCreateBigQueryExportMethod = SecurityCenterGrpc.getCreateBigQueryExportMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getCreateBigQueryExportMethod = SecurityCenterGrpc.getCreateBigQueryExportMethod) == null) { - SecurityCenterGrpc.getCreateBigQueryExportMethod = getCreateBigQueryExportMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateBigQueryExport")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.BigQueryExport.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("CreateBigQueryExport")) - .build(); - } - } - } - return getCreateBigQueryExportMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteBigQueryExportMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteBigQueryExport", - requestType = com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteBigQueryExportMethod() { - io.grpc.MethodDescriptor getDeleteBigQueryExportMethod; - if ((getDeleteBigQueryExportMethod = SecurityCenterGrpc.getDeleteBigQueryExportMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getDeleteBigQueryExportMethod = SecurityCenterGrpc.getDeleteBigQueryExportMethod) == null) { - SecurityCenterGrpc.getDeleteBigQueryExportMethod = getDeleteBigQueryExportMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteBigQueryExport")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("DeleteBigQueryExport")) - .build(); - } - } - } - return getDeleteBigQueryExportMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateBigQueryExportMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateBigQueryExport", - requestType = com.google.cloud.securitycenter.v1.UpdateBigQueryExportRequest.class, - responseType = com.google.cloud.securitycenter.v1.BigQueryExport.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateBigQueryExportMethod() { - io.grpc.MethodDescriptor getUpdateBigQueryExportMethod; - if ((getUpdateBigQueryExportMethod = SecurityCenterGrpc.getUpdateBigQueryExportMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getUpdateBigQueryExportMethod = SecurityCenterGrpc.getUpdateBigQueryExportMethod) == null) { - SecurityCenterGrpc.getUpdateBigQueryExportMethod = getUpdateBigQueryExportMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateBigQueryExport")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.UpdateBigQueryExportRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.BigQueryExport.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("UpdateBigQueryExport")) - .build(); - } - } - } - return getUpdateBigQueryExportMethod; - } - - private static volatile io.grpc.MethodDescriptor getListBigQueryExportsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListBigQueryExports", - requestType = com.google.cloud.securitycenter.v1.ListBigQueryExportsRequest.class, - responseType = com.google.cloud.securitycenter.v1.ListBigQueryExportsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListBigQueryExportsMethod() { - io.grpc.MethodDescriptor getListBigQueryExportsMethod; - if ((getListBigQueryExportsMethod = SecurityCenterGrpc.getListBigQueryExportsMethod) == null) { - synchronized (SecurityCenterGrpc.class) { - if ((getListBigQueryExportsMethod = SecurityCenterGrpc.getListBigQueryExportsMethod) == null) { - SecurityCenterGrpc.getListBigQueryExportsMethod = getListBigQueryExportsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListBigQueryExports")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.ListBigQueryExportsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.securitycenter.v1.ListBigQueryExportsResponse.getDefaultInstance())) - .setSchemaDescriptor(new SecurityCenterMethodDescriptorSupplier("ListBigQueryExports")) - .build(); - } - } - } - return getListBigQueryExportsMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static SecurityCenterStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public SecurityCenterStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SecurityCenterStub(channel, callOptions); - } - }; - return SecurityCenterStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static SecurityCenterBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public SecurityCenterBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SecurityCenterBlockingStub(channel, callOptions); - } - }; - return SecurityCenterBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static SecurityCenterFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public SecurityCenterFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SecurityCenterFutureStub(channel, callOptions); - } - }; - return SecurityCenterFutureStub.newStub(factory, channel); - } - - /** - *
-   * V1 APIs for Security Center service.
-   * 
- */ - public static abstract class SecurityCenterImplBase implements io.grpc.BindableService { - - /** - *
-     * Kicks off an LRO to bulk mute findings for a parent based on a filter. The
-     * parent can be either an organization, folder or project. The findings
-     * matched by the filter will be muted after the LRO is done.
-     * 
- */ - public void bulkMuteFindings(com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBulkMuteFindingsMethod(), responseObserver); - } - - /** - *
-     * Creates a source.
-     * 
- */ - public void createSource(com.google.cloud.securitycenter.v1.CreateSourceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateSourceMethod(), responseObserver); - } - - /** - *
-     * Creates a finding. The corresponding source must exist for finding creation
-     * to succeed.
-     * 
- */ - public void createFinding(com.google.cloud.securitycenter.v1.CreateFindingRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateFindingMethod(), responseObserver); - } - - /** - *
-     * Creates a mute config.
-     * 
- */ - public void createMuteConfig(com.google.cloud.securitycenter.v1.CreateMuteConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateMuteConfigMethod(), responseObserver); - } - - /** - *
-     * Creates a notification config.
-     * 
- */ - public void createNotificationConfig(com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateNotificationConfigMethod(), responseObserver); - } - - /** - *
-     * Deletes an existing mute config.
-     * 
- */ - public void deleteMuteConfig(com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteMuteConfigMethod(), responseObserver); - } - - /** - *
-     * Deletes a notification config.
-     * 
- */ - public void deleteNotificationConfig(com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteNotificationConfigMethod(), responseObserver); - } - - /** - *
-     * Gets a big query export.
-     * 
- */ - public void getBigQueryExport(com.google.cloud.securitycenter.v1.GetBigQueryExportRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBigQueryExportMethod(), responseObserver); - } - - /** - *
-     * Gets the access control policy on the specified Source.
-     * 
- */ - public void getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetIamPolicyMethod(), responseObserver); - } - - /** - *
-     * Gets a mute config.
-     * 
- */ - public void getMuteConfig(com.google.cloud.securitycenter.v1.GetMuteConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetMuteConfigMethod(), responseObserver); - } - - /** - *
-     * Gets a notification config.
-     * 
- */ - public void getNotificationConfig(com.google.cloud.securitycenter.v1.GetNotificationConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNotificationConfigMethod(), responseObserver); - } - - /** - *
-     * Gets the settings for an organization.
-     * 
- */ - public void getOrganizationSettings(com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetOrganizationSettingsMethod(), responseObserver); - } - - /** - *
-     * Gets a source.
-     * 
- */ - public void getSource(com.google.cloud.securitycenter.v1.GetSourceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSourceMethod(), responseObserver); - } - - /** - *
-     * Filters an organization's assets and  groups them by their specified
-     * properties.
-     * 
- */ - public void groupAssets(com.google.cloud.securitycenter.v1.GroupAssetsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGroupAssetsMethod(), responseObserver); - } - - /** - *
-     * 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,
-     * /v1/folders/{folder_id}/sources/-/findings,
-     * /v1/projects/{project_id}/sources/-/findings
-     * 
- */ - public void groupFindings(com.google.cloud.securitycenter.v1.GroupFindingsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGroupFindingsMethod(), responseObserver); - } - - /** - *
-     * Lists an organization's assets.
-     * 
- */ - public void listAssets(com.google.cloud.securitycenter.v1.ListAssetsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListAssetsMethod(), responseObserver); - } - - /** - *
-     * Lists an organization or source's findings.
-     * To list across all sources provide a `-` as the source id.
-     * Example: /v1/organizations/{organization_id}/sources/-/findings
-     * 
- */ - public void listFindings(com.google.cloud.securitycenter.v1.ListFindingsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListFindingsMethod(), responseObserver); - } - - /** - *
-     * Lists mute configs.
-     * 
- */ - public void listMuteConfigs(com.google.cloud.securitycenter.v1.ListMuteConfigsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListMuteConfigsMethod(), responseObserver); - } - - /** - *
-     * Lists notification configs.
-     * 
- */ - public void listNotificationConfigs(com.google.cloud.securitycenter.v1.ListNotificationConfigsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListNotificationConfigsMethod(), responseObserver); - } - - /** - *
-     * Lists all sources belonging to an organization.
-     * 
- */ - public void listSources(com.google.cloud.securitycenter.v1.ListSourcesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListSourcesMethod(), responseObserver); - } - - /** - *
-     * Runs asset discovery. The discovery is tracked with a long-running
-     * operation.
-     * This API can only be called with limited frequency for an organization. If
-     * it is called too frequently the caller will receive a TOO_MANY_REQUESTS
-     * error.
-     * 
- */ - public void runAssetDiscovery(com.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRunAssetDiscoveryMethod(), responseObserver); - } - - /** - *
-     * Updates the state of a finding.
-     * 
- */ - public void setFindingState(com.google.cloud.securitycenter.v1.SetFindingStateRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetFindingStateMethod(), responseObserver); - } - - /** - *
-     * Updates the mute state of a finding.
-     * 
- */ - public void setMute(com.google.cloud.securitycenter.v1.SetMuteRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetMuteMethod(), responseObserver); - } - - /** - *
-     * Sets the access control policy on the specified Source.
-     * 
- */ - public void setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetIamPolicyMethod(), responseObserver); - } - - /** - *
-     * Returns the permissions that a caller has on the specified source.
-     * 
- */ - public void testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getTestIamPermissionsMethod(), responseObserver); - } - - /** - *
-     * Updates external system. This is for a given finding.
-     * 
- */ - public void updateExternalSystem(com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateExternalSystemMethod(), responseObserver); - } - - /** - *
-     * Creates or updates a finding. The corresponding source must exist for a
-     * finding creation to succeed.
-     * 
- */ - public void updateFinding(com.google.cloud.securitycenter.v1.UpdateFindingRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateFindingMethod(), responseObserver); - } - - /** - *
-     * Updates a mute config.
-     * 
- */ - public void updateMuteConfig(com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateMuteConfigMethod(), responseObserver); - } - - /** - *
-     * Updates a notification config. The following update
-     * fields are allowed: description, pubsub_topic, streaming_config.filter
-     * 
- */ - public void updateNotificationConfig(com.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateNotificationConfigMethod(), responseObserver); - } - - /** - *
-     * Updates an organization's settings.
-     * 
- */ - public void updateOrganizationSettings(com.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateOrganizationSettingsMethod(), responseObserver); - } - - /** - *
-     * Updates a source.
-     * 
- */ - public void updateSource(com.google.cloud.securitycenter.v1.UpdateSourceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateSourceMethod(), responseObserver); - } - - /** - *
-     * Updates security marks.
-     * 
- */ - public void updateSecurityMarks(com.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateSecurityMarksMethod(), responseObserver); - } - - /** - *
-     * Creates a big query export.
-     * 
- */ - public void createBigQueryExport(com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateBigQueryExportMethod(), responseObserver); - } - - /** - *
-     * Deletes an existing big query export.
-     * 
- */ - public void deleteBigQueryExport(com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteBigQueryExportMethod(), responseObserver); - } - - /** - *
-     * Updates a BigQuery export.
-     * 
- */ - public void updateBigQueryExport(com.google.cloud.securitycenter.v1.UpdateBigQueryExportRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateBigQueryExportMethod(), responseObserver); - } - - /** - *
-     * Lists BigQuery exports. Note that when requesting BigQuery exports at a
-     * given level all exports under that level are also returned e.g. if
-     * requesting BigQuery exports under a folder, then all BigQuery exports
-     * immediately under the folder plus the ones created under the projects
-     * within the folder are returned.
-     * 
- */ - public void listBigQueryExports(com.google.cloud.securitycenter.v1.ListBigQueryExportsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListBigQueryExportsMethod(), responseObserver); - } - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getBulkMuteFindingsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest, - com.google.longrunning.Operation>( - this, METHODID_BULK_MUTE_FINDINGS))) - .addMethod( - getCreateSourceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.CreateSourceRequest, - com.google.cloud.securitycenter.v1.Source>( - this, METHODID_CREATE_SOURCE))) - .addMethod( - getCreateFindingMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.CreateFindingRequest, - com.google.cloud.securitycenter.v1.Finding>( - this, METHODID_CREATE_FINDING))) - .addMethod( - getCreateMuteConfigMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.CreateMuteConfigRequest, - com.google.cloud.securitycenter.v1.MuteConfig>( - this, METHODID_CREATE_MUTE_CONFIG))) - .addMethod( - getCreateNotificationConfigMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest, - com.google.cloud.securitycenter.v1.NotificationConfig>( - this, METHODID_CREATE_NOTIFICATION_CONFIG))) - .addMethod( - getDeleteMuteConfigMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest, - com.google.protobuf.Empty>( - this, METHODID_DELETE_MUTE_CONFIG))) - .addMethod( - getDeleteNotificationConfigMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest, - com.google.protobuf.Empty>( - this, METHODID_DELETE_NOTIFICATION_CONFIG))) - .addMethod( - getGetBigQueryExportMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.GetBigQueryExportRequest, - com.google.cloud.securitycenter.v1.BigQueryExport>( - this, METHODID_GET_BIG_QUERY_EXPORT))) - .addMethod( - getGetIamPolicyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.iam.v1.GetIamPolicyRequest, - com.google.iam.v1.Policy>( - this, METHODID_GET_IAM_POLICY))) - .addMethod( - getGetMuteConfigMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.GetMuteConfigRequest, - com.google.cloud.securitycenter.v1.MuteConfig>( - this, METHODID_GET_MUTE_CONFIG))) - .addMethod( - getGetNotificationConfigMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.GetNotificationConfigRequest, - com.google.cloud.securitycenter.v1.NotificationConfig>( - this, METHODID_GET_NOTIFICATION_CONFIG))) - .addMethod( - getGetOrganizationSettingsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest, - com.google.cloud.securitycenter.v1.OrganizationSettings>( - this, METHODID_GET_ORGANIZATION_SETTINGS))) - .addMethod( - getGetSourceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.GetSourceRequest, - com.google.cloud.securitycenter.v1.Source>( - this, METHODID_GET_SOURCE))) - .addMethod( - getGroupAssetsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.GroupAssetsRequest, - com.google.cloud.securitycenter.v1.GroupAssetsResponse>( - this, METHODID_GROUP_ASSETS))) - .addMethod( - getGroupFindingsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.GroupFindingsRequest, - com.google.cloud.securitycenter.v1.GroupFindingsResponse>( - this, METHODID_GROUP_FINDINGS))) - .addMethod( - getListAssetsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.ListAssetsRequest, - com.google.cloud.securitycenter.v1.ListAssetsResponse>( - this, METHODID_LIST_ASSETS))) - .addMethod( - getListFindingsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.ListFindingsRequest, - com.google.cloud.securitycenter.v1.ListFindingsResponse>( - this, METHODID_LIST_FINDINGS))) - .addMethod( - getListMuteConfigsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.ListMuteConfigsRequest, - com.google.cloud.securitycenter.v1.ListMuteConfigsResponse>( - this, METHODID_LIST_MUTE_CONFIGS))) - .addMethod( - getListNotificationConfigsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.ListNotificationConfigsRequest, - com.google.cloud.securitycenter.v1.ListNotificationConfigsResponse>( - this, METHODID_LIST_NOTIFICATION_CONFIGS))) - .addMethod( - getListSourcesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.ListSourcesRequest, - com.google.cloud.securitycenter.v1.ListSourcesResponse>( - this, METHODID_LIST_SOURCES))) - .addMethod( - getRunAssetDiscoveryMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest, - com.google.longrunning.Operation>( - this, METHODID_RUN_ASSET_DISCOVERY))) - .addMethod( - getSetFindingStateMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.SetFindingStateRequest, - com.google.cloud.securitycenter.v1.Finding>( - this, METHODID_SET_FINDING_STATE))) - .addMethod( - getSetMuteMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.SetMuteRequest, - com.google.cloud.securitycenter.v1.Finding>( - this, METHODID_SET_MUTE))) - .addMethod( - getSetIamPolicyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.iam.v1.SetIamPolicyRequest, - com.google.iam.v1.Policy>( - this, METHODID_SET_IAM_POLICY))) - .addMethod( - getTestIamPermissionsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.iam.v1.TestIamPermissionsRequest, - com.google.iam.v1.TestIamPermissionsResponse>( - this, METHODID_TEST_IAM_PERMISSIONS))) - .addMethod( - getUpdateExternalSystemMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest, - com.google.cloud.securitycenter.v1.ExternalSystem>( - this, METHODID_UPDATE_EXTERNAL_SYSTEM))) - .addMethod( - getUpdateFindingMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.UpdateFindingRequest, - com.google.cloud.securitycenter.v1.Finding>( - this, METHODID_UPDATE_FINDING))) - .addMethod( - getUpdateMuteConfigMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest, - com.google.cloud.securitycenter.v1.MuteConfig>( - this, METHODID_UPDATE_MUTE_CONFIG))) - .addMethod( - getUpdateNotificationConfigMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest, - com.google.cloud.securitycenter.v1.NotificationConfig>( - this, METHODID_UPDATE_NOTIFICATION_CONFIG))) - .addMethod( - getUpdateOrganizationSettingsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest, - com.google.cloud.securitycenter.v1.OrganizationSettings>( - this, METHODID_UPDATE_ORGANIZATION_SETTINGS))) - .addMethod( - getUpdateSourceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.UpdateSourceRequest, - com.google.cloud.securitycenter.v1.Source>( - this, METHODID_UPDATE_SOURCE))) - .addMethod( - getUpdateSecurityMarksMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest, - com.google.cloud.securitycenter.v1.SecurityMarks>( - this, METHODID_UPDATE_SECURITY_MARKS))) - .addMethod( - getCreateBigQueryExportMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest, - com.google.cloud.securitycenter.v1.BigQueryExport>( - this, METHODID_CREATE_BIG_QUERY_EXPORT))) - .addMethod( - getDeleteBigQueryExportMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest, - com.google.protobuf.Empty>( - this, METHODID_DELETE_BIG_QUERY_EXPORT))) - .addMethod( - getUpdateBigQueryExportMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.UpdateBigQueryExportRequest, - com.google.cloud.securitycenter.v1.BigQueryExport>( - this, METHODID_UPDATE_BIG_QUERY_EXPORT))) - .addMethod( - getListBigQueryExportsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.securitycenter.v1.ListBigQueryExportsRequest, - com.google.cloud.securitycenter.v1.ListBigQueryExportsResponse>( - this, METHODID_LIST_BIG_QUERY_EXPORTS))) - .build(); - } - } - - /** - *
-   * V1 APIs for Security Center service.
-   * 
- */ - public static final class SecurityCenterStub extends io.grpc.stub.AbstractAsyncStub { - private SecurityCenterStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected SecurityCenterStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SecurityCenterStub(channel, callOptions); - } - - /** - *
-     * Kicks off an LRO to bulk mute findings for a parent based on a filter. The
-     * parent can be either an organization, folder or project. The findings
-     * matched by the filter will be muted after the LRO is done.
-     * 
- */ - public void bulkMuteFindings(com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getBulkMuteFindingsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates a source.
-     * 
- */ - public void createSource(com.google.cloud.securitycenter.v1.CreateSourceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateSourceMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates a finding. The corresponding source must exist for finding creation
-     * to succeed.
-     * 
- */ - public void createFinding(com.google.cloud.securitycenter.v1.CreateFindingRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateFindingMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates a mute config.
-     * 
- */ - public void createMuteConfig(com.google.cloud.securitycenter.v1.CreateMuteConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateMuteConfigMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates a notification config.
-     * 
- */ - public void createNotificationConfig(com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateNotificationConfigMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Deletes an existing mute config.
-     * 
- */ - public void deleteMuteConfig(com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteMuteConfigMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Deletes a notification config.
-     * 
- */ - public void deleteNotificationConfig(com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteNotificationConfigMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets a big query export.
-     * 
- */ - public void getBigQueryExport(com.google.cloud.securitycenter.v1.GetBigQueryExportRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetBigQueryExportMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets the access control policy on the specified Source.
-     * 
- */ - public void getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets a mute config.
-     * 
- */ - public void getMuteConfig(com.google.cloud.securitycenter.v1.GetMuteConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetMuteConfigMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets a notification config.
-     * 
- */ - public void getNotificationConfig(com.google.cloud.securitycenter.v1.GetNotificationConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetNotificationConfigMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets the settings for an organization.
-     * 
- */ - public void getOrganizationSettings(com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetOrganizationSettingsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets a source.
-     * 
- */ - public void getSource(com.google.cloud.securitycenter.v1.GetSourceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetSourceMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Filters an organization's assets and  groups them by their specified
-     * properties.
-     * 
- */ - public void groupAssets(com.google.cloud.securitycenter.v1.GroupAssetsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGroupAssetsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * 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,
-     * /v1/folders/{folder_id}/sources/-/findings,
-     * /v1/projects/{project_id}/sources/-/findings
-     * 
- */ - public void groupFindings(com.google.cloud.securitycenter.v1.GroupFindingsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGroupFindingsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists an organization's assets.
-     * 
- */ - public void listAssets(com.google.cloud.securitycenter.v1.ListAssetsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListAssetsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists an organization or source's findings.
-     * To list across all sources provide a `-` as the source id.
-     * Example: /v1/organizations/{organization_id}/sources/-/findings
-     * 
- */ - public void listFindings(com.google.cloud.securitycenter.v1.ListFindingsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListFindingsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists mute configs.
-     * 
- */ - public void listMuteConfigs(com.google.cloud.securitycenter.v1.ListMuteConfigsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListMuteConfigsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists notification configs.
-     * 
- */ - public void listNotificationConfigs(com.google.cloud.securitycenter.v1.ListNotificationConfigsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListNotificationConfigsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists all sources belonging to an organization.
-     * 
- */ - public void listSources(com.google.cloud.securitycenter.v1.ListSourcesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListSourcesMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Runs asset discovery. The discovery is tracked with a long-running
-     * operation.
-     * This API can only be called with limited frequency for an organization. If
-     * it is called too frequently the caller will receive a TOO_MANY_REQUESTS
-     * error.
-     * 
- */ - public void runAssetDiscovery(com.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRunAssetDiscoveryMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Updates the state of a finding.
-     * 
- */ - public void setFindingState(com.google.cloud.securitycenter.v1.SetFindingStateRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSetFindingStateMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Updates the mute state of a finding.
-     * 
- */ - public void setMute(com.google.cloud.securitycenter.v1.SetMuteRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSetMuteMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Sets the access control policy on the specified Source.
-     * 
- */ - public void setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Returns the permissions that a caller has on the specified source.
-     * 
- */ - public void testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Updates external system. This is for a given finding.
-     * 
- */ - public void updateExternalSystem(com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateExternalSystemMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates or updates a finding. The corresponding source must exist for a
-     * finding creation to succeed.
-     * 
- */ - public void updateFinding(com.google.cloud.securitycenter.v1.UpdateFindingRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateFindingMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Updates a mute config.
-     * 
- */ - public void updateMuteConfig(com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateMuteConfigMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Updates a notification config. The following update
-     * fields are allowed: description, pubsub_topic, streaming_config.filter
-     * 
- */ - public void updateNotificationConfig(com.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateNotificationConfigMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Updates an organization's settings.
-     * 
- */ - public void updateOrganizationSettings(com.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateOrganizationSettingsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Updates a source.
-     * 
- */ - public void updateSource(com.google.cloud.securitycenter.v1.UpdateSourceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateSourceMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Updates security marks.
-     * 
- */ - public void updateSecurityMarks(com.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateSecurityMarksMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates a big query export.
-     * 
- */ - public void createBigQueryExport(com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateBigQueryExportMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Deletes an existing big query export.
-     * 
- */ - public void deleteBigQueryExport(com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteBigQueryExportMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Updates a BigQuery export.
-     * 
- */ - public void updateBigQueryExport(com.google.cloud.securitycenter.v1.UpdateBigQueryExportRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateBigQueryExportMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists BigQuery exports. Note that when requesting BigQuery exports at a
-     * given level all exports under that level are also returned e.g. if
-     * requesting BigQuery exports under a folder, then all BigQuery exports
-     * immediately under the folder plus the ones created under the projects
-     * within the folder are returned.
-     * 
- */ - public void listBigQueryExports(com.google.cloud.securitycenter.v1.ListBigQueryExportsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListBigQueryExportsMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - *
-   * V1 APIs for Security Center service.
-   * 
- */ - public static final class SecurityCenterBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private SecurityCenterBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected SecurityCenterBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SecurityCenterBlockingStub(channel, callOptions); - } - - /** - *
-     * Kicks off an LRO to bulk mute findings for a parent based on a filter. The
-     * parent can be either an organization, folder or project. The findings
-     * matched by the filter will be muted after the LRO is done.
-     * 
- */ - public com.google.longrunning.Operation bulkMuteFindings(com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getBulkMuteFindingsMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates a source.
-     * 
- */ - public com.google.cloud.securitycenter.v1.Source createSource(com.google.cloud.securitycenter.v1.CreateSourceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateSourceMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates a finding. The corresponding source must exist for finding creation
-     * to succeed.
-     * 
- */ - public com.google.cloud.securitycenter.v1.Finding createFinding(com.google.cloud.securitycenter.v1.CreateFindingRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateFindingMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates a mute config.
-     * 
- */ - public com.google.cloud.securitycenter.v1.MuteConfig createMuteConfig(com.google.cloud.securitycenter.v1.CreateMuteConfigRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateMuteConfigMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates a notification config.
-     * 
- */ - public com.google.cloud.securitycenter.v1.NotificationConfig createNotificationConfig(com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateNotificationConfigMethod(), getCallOptions(), request); - } - - /** - *
-     * Deletes an existing mute config.
-     * 
- */ - public com.google.protobuf.Empty deleteMuteConfig(com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteMuteConfigMethod(), getCallOptions(), request); - } - - /** - *
-     * Deletes a notification config.
-     * 
- */ - public com.google.protobuf.Empty deleteNotificationConfig(com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteNotificationConfigMethod(), getCallOptions(), request); - } - - /** - *
-     * Gets a big query export.
-     * 
- */ - public com.google.cloud.securitycenter.v1.BigQueryExport getBigQueryExport(com.google.cloud.securitycenter.v1.GetBigQueryExportRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetBigQueryExportMethod(), getCallOptions(), request); - } - - /** - *
-     * Gets the access control policy on the specified Source.
-     * 
- */ - public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetIamPolicyMethod(), getCallOptions(), request); - } - - /** - *
-     * Gets a mute config.
-     * 
- */ - public com.google.cloud.securitycenter.v1.MuteConfig getMuteConfig(com.google.cloud.securitycenter.v1.GetMuteConfigRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetMuteConfigMethod(), getCallOptions(), request); - } - - /** - *
-     * Gets a notification config.
-     * 
- */ - public com.google.cloud.securitycenter.v1.NotificationConfig getNotificationConfig(com.google.cloud.securitycenter.v1.GetNotificationConfigRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetNotificationConfigMethod(), getCallOptions(), request); - } - - /** - *
-     * Gets the settings for an organization.
-     * 
- */ - public com.google.cloud.securitycenter.v1.OrganizationSettings getOrganizationSettings(com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetOrganizationSettingsMethod(), getCallOptions(), request); - } - - /** - *
-     * Gets a source.
-     * 
- */ - public com.google.cloud.securitycenter.v1.Source getSource(com.google.cloud.securitycenter.v1.GetSourceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetSourceMethod(), getCallOptions(), request); - } - - /** - *
-     * Filters an organization's assets and  groups them by their specified
-     * properties.
-     * 
- */ - public com.google.cloud.securitycenter.v1.GroupAssetsResponse groupAssets(com.google.cloud.securitycenter.v1.GroupAssetsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGroupAssetsMethod(), getCallOptions(), request); - } - - /** - *
-     * 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,
-     * /v1/folders/{folder_id}/sources/-/findings,
-     * /v1/projects/{project_id}/sources/-/findings
-     * 
- */ - public com.google.cloud.securitycenter.v1.GroupFindingsResponse groupFindings(com.google.cloud.securitycenter.v1.GroupFindingsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGroupFindingsMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists an organization's assets.
-     * 
- */ - public com.google.cloud.securitycenter.v1.ListAssetsResponse listAssets(com.google.cloud.securitycenter.v1.ListAssetsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListAssetsMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists an organization or source's findings.
-     * To list across all sources provide a `-` as the source id.
-     * Example: /v1/organizations/{organization_id}/sources/-/findings
-     * 
- */ - public com.google.cloud.securitycenter.v1.ListFindingsResponse listFindings(com.google.cloud.securitycenter.v1.ListFindingsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListFindingsMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists mute configs.
-     * 
- */ - public com.google.cloud.securitycenter.v1.ListMuteConfigsResponse listMuteConfigs(com.google.cloud.securitycenter.v1.ListMuteConfigsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListMuteConfigsMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists notification configs.
-     * 
- */ - public com.google.cloud.securitycenter.v1.ListNotificationConfigsResponse listNotificationConfigs(com.google.cloud.securitycenter.v1.ListNotificationConfigsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListNotificationConfigsMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists all sources belonging to an organization.
-     * 
- */ - public com.google.cloud.securitycenter.v1.ListSourcesResponse listSources(com.google.cloud.securitycenter.v1.ListSourcesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListSourcesMethod(), getCallOptions(), request); - } - - /** - *
-     * Runs asset discovery. The discovery is tracked with a long-running
-     * operation.
-     * This API can only be called with limited frequency for an organization. If
-     * it is called too frequently the caller will receive a TOO_MANY_REQUESTS
-     * error.
-     * 
- */ - public com.google.longrunning.Operation runAssetDiscovery(com.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRunAssetDiscoveryMethod(), getCallOptions(), request); - } - - /** - *
-     * Updates the state of a finding.
-     * 
- */ - public com.google.cloud.securitycenter.v1.Finding setFindingState(com.google.cloud.securitycenter.v1.SetFindingStateRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSetFindingStateMethod(), getCallOptions(), request); - } - - /** - *
-     * Updates the mute state of a finding.
-     * 
- */ - public com.google.cloud.securitycenter.v1.Finding setMute(com.google.cloud.securitycenter.v1.SetMuteRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSetMuteMethod(), getCallOptions(), request); - } - - /** - *
-     * Sets the access control policy on the specified Source.
-     * 
- */ - public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSetIamPolicyMethod(), getCallOptions(), request); - } - - /** - *
-     * Returns the permissions that a caller has on the specified source.
-     * 
- */ - public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getTestIamPermissionsMethod(), getCallOptions(), request); - } - - /** - *
-     * Updates external system. This is for a given finding.
-     * 
- */ - public com.google.cloud.securitycenter.v1.ExternalSystem updateExternalSystem(com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateExternalSystemMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates or updates a finding. The corresponding source must exist for a
-     * finding creation to succeed.
-     * 
- */ - public com.google.cloud.securitycenter.v1.Finding updateFinding(com.google.cloud.securitycenter.v1.UpdateFindingRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateFindingMethod(), getCallOptions(), request); - } - - /** - *
-     * Updates a mute config.
-     * 
- */ - public com.google.cloud.securitycenter.v1.MuteConfig updateMuteConfig(com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateMuteConfigMethod(), getCallOptions(), request); - } - - /** - *
-     * Updates a notification config. The following update
-     * fields are allowed: description, pubsub_topic, streaming_config.filter
-     * 
- */ - public com.google.cloud.securitycenter.v1.NotificationConfig updateNotificationConfig(com.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateNotificationConfigMethod(), getCallOptions(), request); - } - - /** - *
-     * Updates an organization's settings.
-     * 
- */ - public com.google.cloud.securitycenter.v1.OrganizationSettings updateOrganizationSettings(com.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateOrganizationSettingsMethod(), getCallOptions(), request); - } - - /** - *
-     * Updates a source.
-     * 
- */ - public com.google.cloud.securitycenter.v1.Source updateSource(com.google.cloud.securitycenter.v1.UpdateSourceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateSourceMethod(), getCallOptions(), request); - } - - /** - *
-     * Updates security marks.
-     * 
- */ - public com.google.cloud.securitycenter.v1.SecurityMarks updateSecurityMarks(com.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateSecurityMarksMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates a big query export.
-     * 
- */ - public com.google.cloud.securitycenter.v1.BigQueryExport createBigQueryExport(com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateBigQueryExportMethod(), getCallOptions(), request); - } - - /** - *
-     * Deletes an existing big query export.
-     * 
- */ - public com.google.protobuf.Empty deleteBigQueryExport(com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteBigQueryExportMethod(), getCallOptions(), request); - } - - /** - *
-     * Updates a BigQuery export.
-     * 
- */ - public com.google.cloud.securitycenter.v1.BigQueryExport updateBigQueryExport(com.google.cloud.securitycenter.v1.UpdateBigQueryExportRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateBigQueryExportMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists BigQuery exports. Note that when requesting BigQuery exports at a
-     * given level all exports under that level are also returned e.g. if
-     * requesting BigQuery exports under a folder, then all BigQuery exports
-     * immediately under the folder plus the ones created under the projects
-     * within the folder are returned.
-     * 
- */ - public com.google.cloud.securitycenter.v1.ListBigQueryExportsResponse listBigQueryExports(com.google.cloud.securitycenter.v1.ListBigQueryExportsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListBigQueryExportsMethod(), getCallOptions(), request); - } - } - - /** - *
-   * V1 APIs for Security Center service.
-   * 
- */ - public static final class SecurityCenterFutureStub extends io.grpc.stub.AbstractFutureStub { - private SecurityCenterFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected SecurityCenterFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SecurityCenterFutureStub(channel, callOptions); - } - - /** - *
-     * Kicks off an LRO to bulk mute findings for a parent based on a filter. The
-     * parent can be either an organization, folder or project. The findings
-     * matched by the filter will be muted after the LRO is done.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture bulkMuteFindings( - com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getBulkMuteFindingsMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates a source.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createSource( - com.google.cloud.securitycenter.v1.CreateSourceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateSourceMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates a finding. The corresponding source must exist for finding creation
-     * to succeed.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createFinding( - com.google.cloud.securitycenter.v1.CreateFindingRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateFindingMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates a mute config.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createMuteConfig( - com.google.cloud.securitycenter.v1.CreateMuteConfigRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateMuteConfigMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates a notification config.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createNotificationConfig( - com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateNotificationConfigMethod(), getCallOptions()), request); - } - - /** - *
-     * Deletes an existing mute config.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteMuteConfig( - com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteMuteConfigMethod(), getCallOptions()), request); - } - - /** - *
-     * Deletes a notification config.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteNotificationConfig( - com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteNotificationConfigMethod(), getCallOptions()), request); - } - - /** - *
-     * Gets a big query export.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getBigQueryExport( - com.google.cloud.securitycenter.v1.GetBigQueryExportRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetBigQueryExportMethod(), getCallOptions()), request); - } - - /** - *
-     * Gets the access control policy on the specified Source.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getIamPolicy( - com.google.iam.v1.GetIamPolicyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), request); - } - - /** - *
-     * Gets a mute config.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getMuteConfig( - com.google.cloud.securitycenter.v1.GetMuteConfigRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetMuteConfigMethod(), getCallOptions()), request); - } - - /** - *
-     * Gets a notification config.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getNotificationConfig( - com.google.cloud.securitycenter.v1.GetNotificationConfigRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetNotificationConfigMethod(), getCallOptions()), request); - } - - /** - *
-     * Gets the settings for an organization.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getOrganizationSettings( - com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetOrganizationSettingsMethod(), getCallOptions()), request); - } - - /** - *
-     * Gets a source.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getSource( - com.google.cloud.securitycenter.v1.GetSourceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetSourceMethod(), getCallOptions()), request); - } - - /** - *
-     * Filters an organization's assets and  groups them by their specified
-     * properties.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture groupAssets( - com.google.cloud.securitycenter.v1.GroupAssetsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGroupAssetsMethod(), getCallOptions()), request); - } - - /** - *
-     * 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,
-     * /v1/folders/{folder_id}/sources/-/findings,
-     * /v1/projects/{project_id}/sources/-/findings
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture groupFindings( - com.google.cloud.securitycenter.v1.GroupFindingsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGroupFindingsMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists an organization's assets.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listAssets( - com.google.cloud.securitycenter.v1.ListAssetsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListAssetsMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists an organization or source's findings.
-     * To list across all sources provide a `-` as the source id.
-     * Example: /v1/organizations/{organization_id}/sources/-/findings
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listFindings( - com.google.cloud.securitycenter.v1.ListFindingsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListFindingsMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists mute configs.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listMuteConfigs( - com.google.cloud.securitycenter.v1.ListMuteConfigsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListMuteConfigsMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists notification configs.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listNotificationConfigs( - com.google.cloud.securitycenter.v1.ListNotificationConfigsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListNotificationConfigsMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists all sources belonging to an organization.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listSources( - com.google.cloud.securitycenter.v1.ListSourcesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListSourcesMethod(), getCallOptions()), request); - } - - /** - *
-     * Runs asset discovery. The discovery is tracked with a long-running
-     * operation.
-     * This API can only be called with limited frequency for an organization. If
-     * it is called too frequently the caller will receive a TOO_MANY_REQUESTS
-     * error.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture runAssetDiscovery( - com.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRunAssetDiscoveryMethod(), getCallOptions()), request); - } - - /** - *
-     * Updates the state of a finding.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture setFindingState( - com.google.cloud.securitycenter.v1.SetFindingStateRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSetFindingStateMethod(), getCallOptions()), request); - } - - /** - *
-     * Updates the mute state of a finding.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture setMute( - com.google.cloud.securitycenter.v1.SetMuteRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSetMuteMethod(), getCallOptions()), request); - } - - /** - *
-     * Sets the access control policy on the specified Source.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture setIamPolicy( - com.google.iam.v1.SetIamPolicyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()), request); - } - - /** - *
-     * Returns the permissions that a caller has on the specified source.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture testIamPermissions( - com.google.iam.v1.TestIamPermissionsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), request); - } - - /** - *
-     * Updates external system. This is for a given finding.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture updateExternalSystem( - com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateExternalSystemMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates or updates a finding. The corresponding source must exist for a
-     * finding creation to succeed.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture updateFinding( - com.google.cloud.securitycenter.v1.UpdateFindingRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateFindingMethod(), getCallOptions()), request); - } - - /** - *
-     * Updates a mute config.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture updateMuteConfig( - com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateMuteConfigMethod(), getCallOptions()), request); - } - - /** - *
-     * Updates a notification config. The following update
-     * fields are allowed: description, pubsub_topic, streaming_config.filter
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture updateNotificationConfig( - com.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateNotificationConfigMethod(), getCallOptions()), request); - } - - /** - *
-     * Updates an organization's settings.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture updateOrganizationSettings( - com.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateOrganizationSettingsMethod(), getCallOptions()), request); - } - - /** - *
-     * Updates a source.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture updateSource( - com.google.cloud.securitycenter.v1.UpdateSourceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateSourceMethod(), getCallOptions()), request); - } - - /** - *
-     * Updates security marks.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture updateSecurityMarks( - com.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateSecurityMarksMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates a big query export.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createBigQueryExport( - com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateBigQueryExportMethod(), getCallOptions()), request); - } - - /** - *
-     * Deletes an existing big query export.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteBigQueryExport( - com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteBigQueryExportMethod(), getCallOptions()), request); - } - - /** - *
-     * Updates a BigQuery export.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture updateBigQueryExport( - com.google.cloud.securitycenter.v1.UpdateBigQueryExportRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateBigQueryExportMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists BigQuery exports. Note that when requesting BigQuery exports at a
-     * given level all exports under that level are also returned e.g. if
-     * requesting BigQuery exports under a folder, then all BigQuery exports
-     * immediately under the folder plus the ones created under the projects
-     * within the folder are returned.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listBigQueryExports( - com.google.cloud.securitycenter.v1.ListBigQueryExportsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListBigQueryExportsMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_BULK_MUTE_FINDINGS = 0; - private static final int METHODID_CREATE_SOURCE = 1; - private static final int METHODID_CREATE_FINDING = 2; - private static final int METHODID_CREATE_MUTE_CONFIG = 3; - private static final int METHODID_CREATE_NOTIFICATION_CONFIG = 4; - private static final int METHODID_DELETE_MUTE_CONFIG = 5; - private static final int METHODID_DELETE_NOTIFICATION_CONFIG = 6; - private static final int METHODID_GET_BIG_QUERY_EXPORT = 7; - private static final int METHODID_GET_IAM_POLICY = 8; - private static final int METHODID_GET_MUTE_CONFIG = 9; - private static final int METHODID_GET_NOTIFICATION_CONFIG = 10; - private static final int METHODID_GET_ORGANIZATION_SETTINGS = 11; - private static final int METHODID_GET_SOURCE = 12; - private static final int METHODID_GROUP_ASSETS = 13; - private static final int METHODID_GROUP_FINDINGS = 14; - private static final int METHODID_LIST_ASSETS = 15; - private static final int METHODID_LIST_FINDINGS = 16; - private static final int METHODID_LIST_MUTE_CONFIGS = 17; - private static final int METHODID_LIST_NOTIFICATION_CONFIGS = 18; - private static final int METHODID_LIST_SOURCES = 19; - private static final int METHODID_RUN_ASSET_DISCOVERY = 20; - private static final int METHODID_SET_FINDING_STATE = 21; - private static final int METHODID_SET_MUTE = 22; - private static final int METHODID_SET_IAM_POLICY = 23; - private static final int METHODID_TEST_IAM_PERMISSIONS = 24; - private static final int METHODID_UPDATE_EXTERNAL_SYSTEM = 25; - private static final int METHODID_UPDATE_FINDING = 26; - private static final int METHODID_UPDATE_MUTE_CONFIG = 27; - private static final int METHODID_UPDATE_NOTIFICATION_CONFIG = 28; - private static final int METHODID_UPDATE_ORGANIZATION_SETTINGS = 29; - private static final int METHODID_UPDATE_SOURCE = 30; - private static final int METHODID_UPDATE_SECURITY_MARKS = 31; - private static final int METHODID_CREATE_BIG_QUERY_EXPORT = 32; - private static final int METHODID_DELETE_BIG_QUERY_EXPORT = 33; - private static final int METHODID_UPDATE_BIG_QUERY_EXPORT = 34; - private static final int METHODID_LIST_BIG_QUERY_EXPORTS = 35; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final SecurityCenterImplBase serviceImpl; - private final int methodId; - - MethodHandlers(SecurityCenterImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_BULK_MUTE_FINDINGS: - serviceImpl.bulkMuteFindings((com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_SOURCE: - serviceImpl.createSource((com.google.cloud.securitycenter.v1.CreateSourceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_FINDING: - serviceImpl.createFinding((com.google.cloud.securitycenter.v1.CreateFindingRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_MUTE_CONFIG: - serviceImpl.createMuteConfig((com.google.cloud.securitycenter.v1.CreateMuteConfigRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_NOTIFICATION_CONFIG: - serviceImpl.createNotificationConfig((com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_MUTE_CONFIG: - serviceImpl.deleteMuteConfig((com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_NOTIFICATION_CONFIG: - serviceImpl.deleteNotificationConfig((com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_BIG_QUERY_EXPORT: - serviceImpl.getBigQueryExport((com.google.cloud.securitycenter.v1.GetBigQueryExportRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_IAM_POLICY: - serviceImpl.getIamPolicy((com.google.iam.v1.GetIamPolicyRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_MUTE_CONFIG: - serviceImpl.getMuteConfig((com.google.cloud.securitycenter.v1.GetMuteConfigRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_NOTIFICATION_CONFIG: - serviceImpl.getNotificationConfig((com.google.cloud.securitycenter.v1.GetNotificationConfigRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_ORGANIZATION_SETTINGS: - serviceImpl.getOrganizationSettings((com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_SOURCE: - serviceImpl.getSource((com.google.cloud.securitycenter.v1.GetSourceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GROUP_ASSETS: - serviceImpl.groupAssets((com.google.cloud.securitycenter.v1.GroupAssetsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GROUP_FINDINGS: - serviceImpl.groupFindings((com.google.cloud.securitycenter.v1.GroupFindingsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_ASSETS: - serviceImpl.listAssets((com.google.cloud.securitycenter.v1.ListAssetsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_FINDINGS: - serviceImpl.listFindings((com.google.cloud.securitycenter.v1.ListFindingsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_MUTE_CONFIGS: - serviceImpl.listMuteConfigs((com.google.cloud.securitycenter.v1.ListMuteConfigsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_NOTIFICATION_CONFIGS: - serviceImpl.listNotificationConfigs((com.google.cloud.securitycenter.v1.ListNotificationConfigsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_SOURCES: - serviceImpl.listSources((com.google.cloud.securitycenter.v1.ListSourcesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_RUN_ASSET_DISCOVERY: - serviceImpl.runAssetDiscovery((com.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SET_FINDING_STATE: - serviceImpl.setFindingState((com.google.cloud.securitycenter.v1.SetFindingStateRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SET_MUTE: - serviceImpl.setMute((com.google.cloud.securitycenter.v1.SetMuteRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SET_IAM_POLICY: - serviceImpl.setIamPolicy((com.google.iam.v1.SetIamPolicyRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_TEST_IAM_PERMISSIONS: - serviceImpl.testIamPermissions((com.google.iam.v1.TestIamPermissionsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_EXTERNAL_SYSTEM: - serviceImpl.updateExternalSystem((com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_FINDING: - serviceImpl.updateFinding((com.google.cloud.securitycenter.v1.UpdateFindingRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_MUTE_CONFIG: - serviceImpl.updateMuteConfig((com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_NOTIFICATION_CONFIG: - serviceImpl.updateNotificationConfig((com.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_ORGANIZATION_SETTINGS: - serviceImpl.updateOrganizationSettings((com.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_SOURCE: - serviceImpl.updateSource((com.google.cloud.securitycenter.v1.UpdateSourceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_SECURITY_MARKS: - serviceImpl.updateSecurityMarks((com.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_BIG_QUERY_EXPORT: - serviceImpl.createBigQueryExport((com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_BIG_QUERY_EXPORT: - serviceImpl.deleteBigQueryExport((com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_BIG_QUERY_EXPORT: - serviceImpl.updateBigQueryExport((com.google.cloud.securitycenter.v1.UpdateBigQueryExportRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_BIG_QUERY_EXPORTS: - serviceImpl.listBigQueryExports((com.google.cloud.securitycenter.v1.ListBigQueryExportsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private static abstract class SecurityCenterBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - SecurityCenterBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("SecurityCenter"); - } - } - - private static final class SecurityCenterFileDescriptorSupplier - extends SecurityCenterBaseDescriptorSupplier { - SecurityCenterFileDescriptorSupplier() {} - } - - private static final class SecurityCenterMethodDescriptorSupplier - extends SecurityCenterBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - SecurityCenterMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (SecurityCenterGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new SecurityCenterFileDescriptorSupplier()) - .addMethod(getBulkMuteFindingsMethod()) - .addMethod(getCreateSourceMethod()) - .addMethod(getCreateFindingMethod()) - .addMethod(getCreateMuteConfigMethod()) - .addMethod(getCreateNotificationConfigMethod()) - .addMethod(getDeleteMuteConfigMethod()) - .addMethod(getDeleteNotificationConfigMethod()) - .addMethod(getGetBigQueryExportMethod()) - .addMethod(getGetIamPolicyMethod()) - .addMethod(getGetMuteConfigMethod()) - .addMethod(getGetNotificationConfigMethod()) - .addMethod(getGetOrganizationSettingsMethod()) - .addMethod(getGetSourceMethod()) - .addMethod(getGroupAssetsMethod()) - .addMethod(getGroupFindingsMethod()) - .addMethod(getListAssetsMethod()) - .addMethod(getListFindingsMethod()) - .addMethod(getListMuteConfigsMethod()) - .addMethod(getListNotificationConfigsMethod()) - .addMethod(getListSourcesMethod()) - .addMethod(getRunAssetDiscoveryMethod()) - .addMethod(getSetFindingStateMethod()) - .addMethod(getSetMuteMethod()) - .addMethod(getSetIamPolicyMethod()) - .addMethod(getTestIamPermissionsMethod()) - .addMethod(getUpdateExternalSystemMethod()) - .addMethod(getUpdateFindingMethod()) - .addMethod(getUpdateMuteConfigMethod()) - .addMethod(getUpdateNotificationConfigMethod()) - .addMethod(getUpdateOrganizationSettingsMethod()) - .addMethod(getUpdateSourceMethod()) - .addMethod(getUpdateSecurityMarksMethod()) - .addMethod(getCreateBigQueryExportMethod()) - .addMethod(getDeleteBigQueryExportMethod()) - .addMethod(getUpdateBigQueryExportMethod()) - .addMethod(getListBigQueryExportsMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Access.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Access.java deleted file mode 100644 index 0ff8db42353d..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Access.java +++ /dev/null @@ -1,1509 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/access.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Represents an access event.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Access} - */ -public final class Access extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Access) - AccessOrBuilder { -private static final long serialVersionUID = 0L; - // Use Access.newBuilder() to construct. - private Access(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Access() { - principalEmail_ = ""; - callerIp_ = ""; - userAgentFamily_ = ""; - serviceName_ = ""; - methodName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Access(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Access( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - principalEmail_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - callerIp_ = s; - break; - } - case 26: { - com.google.cloud.securitycenter.v1.Geolocation.Builder subBuilder = null; - if (callerIpGeo_ != null) { - subBuilder = callerIpGeo_.toBuilder(); - } - callerIpGeo_ = input.readMessage(com.google.cloud.securitycenter.v1.Geolocation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(callerIpGeo_); - callerIpGeo_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - userAgentFamily_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - serviceName_ = s; - break; - } - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - - methodName_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.AccessProto.internal_static_google_cloud_securitycenter_v1_Access_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.AccessProto.internal_static_google_cloud_securitycenter_v1_Access_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Access.class, com.google.cloud.securitycenter.v1.Access.Builder.class); - } - - public static final int PRINCIPAL_EMAIL_FIELD_NUMBER = 1; - private volatile java.lang.Object principalEmail_; - /** - *
-   * Associated email, such as "foo@google.com".
-   * 
- * - * string principal_email = 1; - * @return The principalEmail. - */ - @java.lang.Override - public java.lang.String getPrincipalEmail() { - java.lang.Object ref = principalEmail_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - principalEmail_ = s; - return s; - } - } - /** - *
-   * Associated email, such as "foo@google.com".
-   * 
- * - * string principal_email = 1; - * @return The bytes for principalEmail. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPrincipalEmailBytes() { - java.lang.Object ref = principalEmail_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - principalEmail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CALLER_IP_FIELD_NUMBER = 2; - private volatile java.lang.Object callerIp_; - /** - *
-   * Caller's IP address, such as "1.1.1.1".
-   * 
- * - * string caller_ip = 2; - * @return The callerIp. - */ - @java.lang.Override - public java.lang.String getCallerIp() { - java.lang.Object ref = callerIp_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - callerIp_ = s; - return s; - } - } - /** - *
-   * Caller's IP address, such as "1.1.1.1".
-   * 
- * - * string caller_ip = 2; - * @return The bytes for callerIp. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCallerIpBytes() { - java.lang.Object ref = callerIp_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - callerIp_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CALLER_IP_GEO_FIELD_NUMBER = 3; - private com.google.cloud.securitycenter.v1.Geolocation callerIpGeo_; - /** - *
-   * The caller IP's geolocation, which identifies where the call came from.
-   * 
- * - * .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; - * @return Whether the callerIpGeo field is set. - */ - @java.lang.Override - public boolean hasCallerIpGeo() { - return callerIpGeo_ != null; - } - /** - *
-   * The caller IP's geolocation, which identifies where the call came from.
-   * 
- * - * .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; - * @return The callerIpGeo. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Geolocation getCallerIpGeo() { - return callerIpGeo_ == null ? com.google.cloud.securitycenter.v1.Geolocation.getDefaultInstance() : callerIpGeo_; - } - /** - *
-   * The caller IP's geolocation, which identifies where the call came from.
-   * 
- * - * .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.GeolocationOrBuilder getCallerIpGeoOrBuilder() { - return getCallerIpGeo(); - } - - public static final int USER_AGENT_FAMILY_FIELD_NUMBER = 4; - private volatile java.lang.Object userAgentFamily_; - /** - *
-   * What kind of user agent is associated, e.g. operating system shells,
-   * embedded or stand-alone applications, etc.
-   * 
- * - * string user_agent_family = 4; - * @return The userAgentFamily. - */ - @java.lang.Override - public java.lang.String getUserAgentFamily() { - java.lang.Object ref = userAgentFamily_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - userAgentFamily_ = s; - return s; - } - } - /** - *
-   * What kind of user agent is associated, e.g. operating system shells,
-   * embedded or stand-alone applications, etc.
-   * 
- * - * string user_agent_family = 4; - * @return The bytes for userAgentFamily. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUserAgentFamilyBytes() { - java.lang.Object ref = userAgentFamily_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - userAgentFamily_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SERVICE_NAME_FIELD_NUMBER = 5; - private volatile java.lang.Object serviceName_; - /** - *
-   * This is the API service that the service account made a call to, e.g.
-   * "iam.googleapis.com"
-   * 
- * - * string service_name = 5; - * @return The serviceName. - */ - @java.lang.Override - public java.lang.String getServiceName() { - java.lang.Object ref = serviceName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - serviceName_ = s; - return s; - } - } - /** - *
-   * This is the API service that the service account made a call to, e.g.
-   * "iam.googleapis.com"
-   * 
- * - * string service_name = 5; - * @return The bytes for serviceName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getServiceNameBytes() { - java.lang.Object ref = serviceName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - serviceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int METHOD_NAME_FIELD_NUMBER = 6; - private volatile java.lang.Object methodName_; - /** - *
-   * The method that the service account called, e.g. "SetIamPolicy".
-   * 
- * - * string method_name = 6; - * @return The methodName. - */ - @java.lang.Override - public java.lang.String getMethodName() { - java.lang.Object ref = methodName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - methodName_ = s; - return s; - } - } - /** - *
-   * The method that the service account called, e.g. "SetIamPolicy".
-   * 
- * - * string method_name = 6; - * @return The bytes for methodName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMethodNameBytes() { - java.lang.Object ref = methodName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - methodName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principalEmail_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, principalEmail_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(callerIp_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, callerIp_); - } - if (callerIpGeo_ != null) { - output.writeMessage(3, getCallerIpGeo()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userAgentFamily_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, userAgentFamily_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, serviceName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(methodName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, methodName_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principalEmail_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, principalEmail_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(callerIp_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, callerIp_); - } - if (callerIpGeo_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getCallerIpGeo()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userAgentFamily_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, userAgentFamily_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, serviceName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(methodName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, methodName_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.Access)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.Access other = (com.google.cloud.securitycenter.v1.Access) obj; - - if (!getPrincipalEmail() - .equals(other.getPrincipalEmail())) return false; - if (!getCallerIp() - .equals(other.getCallerIp())) return false; - if (hasCallerIpGeo() != other.hasCallerIpGeo()) return false; - if (hasCallerIpGeo()) { - if (!getCallerIpGeo() - .equals(other.getCallerIpGeo())) return false; - } - if (!getUserAgentFamily() - .equals(other.getUserAgentFamily())) return false; - if (!getServiceName() - .equals(other.getServiceName())) return false; - if (!getMethodName() - .equals(other.getMethodName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PRINCIPAL_EMAIL_FIELD_NUMBER; - hash = (53 * hash) + getPrincipalEmail().hashCode(); - hash = (37 * hash) + CALLER_IP_FIELD_NUMBER; - hash = (53 * hash) + getCallerIp().hashCode(); - if (hasCallerIpGeo()) { - hash = (37 * hash) + CALLER_IP_GEO_FIELD_NUMBER; - hash = (53 * hash) + getCallerIpGeo().hashCode(); - } - hash = (37 * hash) + USER_AGENT_FAMILY_FIELD_NUMBER; - hash = (53 * hash) + getUserAgentFamily().hashCode(); - hash = (37 * hash) + SERVICE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getServiceName().hashCode(); - hash = (37 * hash) + METHOD_NAME_FIELD_NUMBER; - hash = (53 * hash) + getMethodName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.Access parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Access parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Access parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Access parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Access parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Access parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Access parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Access parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Access parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Access parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Access parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Access parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.Access prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Represents an access event.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Access} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Access) - com.google.cloud.securitycenter.v1.AccessOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.AccessProto.internal_static_google_cloud_securitycenter_v1_Access_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.AccessProto.internal_static_google_cloud_securitycenter_v1_Access_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Access.class, com.google.cloud.securitycenter.v1.Access.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.Access.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - principalEmail_ = ""; - - callerIp_ = ""; - - if (callerIpGeoBuilder_ == null) { - callerIpGeo_ = null; - } else { - callerIpGeo_ = null; - callerIpGeoBuilder_ = null; - } - userAgentFamily_ = ""; - - serviceName_ = ""; - - methodName_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.AccessProto.internal_static_google_cloud_securitycenter_v1_Access_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Access getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.Access.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Access build() { - com.google.cloud.securitycenter.v1.Access result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Access buildPartial() { - com.google.cloud.securitycenter.v1.Access result = new com.google.cloud.securitycenter.v1.Access(this); - result.principalEmail_ = principalEmail_; - result.callerIp_ = callerIp_; - if (callerIpGeoBuilder_ == null) { - result.callerIpGeo_ = callerIpGeo_; - } else { - result.callerIpGeo_ = callerIpGeoBuilder_.build(); - } - result.userAgentFamily_ = userAgentFamily_; - result.serviceName_ = serviceName_; - result.methodName_ = methodName_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.Access) { - return mergeFrom((com.google.cloud.securitycenter.v1.Access)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.Access other) { - if (other == com.google.cloud.securitycenter.v1.Access.getDefaultInstance()) return this; - if (!other.getPrincipalEmail().isEmpty()) { - principalEmail_ = other.principalEmail_; - onChanged(); - } - if (!other.getCallerIp().isEmpty()) { - callerIp_ = other.callerIp_; - onChanged(); - } - if (other.hasCallerIpGeo()) { - mergeCallerIpGeo(other.getCallerIpGeo()); - } - if (!other.getUserAgentFamily().isEmpty()) { - userAgentFamily_ = other.userAgentFamily_; - onChanged(); - } - if (!other.getServiceName().isEmpty()) { - serviceName_ = other.serviceName_; - onChanged(); - } - if (!other.getMethodName().isEmpty()) { - methodName_ = other.methodName_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.Access parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.Access) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object principalEmail_ = ""; - /** - *
-     * Associated email, such as "foo@google.com".
-     * 
- * - * string principal_email = 1; - * @return The principalEmail. - */ - public java.lang.String getPrincipalEmail() { - java.lang.Object ref = principalEmail_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - principalEmail_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Associated email, such as "foo@google.com".
-     * 
- * - * string principal_email = 1; - * @return The bytes for principalEmail. - */ - public com.google.protobuf.ByteString - getPrincipalEmailBytes() { - java.lang.Object ref = principalEmail_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - principalEmail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Associated email, such as "foo@google.com".
-     * 
- * - * string principal_email = 1; - * @param value The principalEmail to set. - * @return This builder for chaining. - */ - public Builder setPrincipalEmail( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - principalEmail_ = value; - onChanged(); - return this; - } - /** - *
-     * Associated email, such as "foo@google.com".
-     * 
- * - * string principal_email = 1; - * @return This builder for chaining. - */ - public Builder clearPrincipalEmail() { - - principalEmail_ = getDefaultInstance().getPrincipalEmail(); - onChanged(); - return this; - } - /** - *
-     * Associated email, such as "foo@google.com".
-     * 
- * - * string principal_email = 1; - * @param value The bytes for principalEmail to set. - * @return This builder for chaining. - */ - public Builder setPrincipalEmailBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - principalEmail_ = value; - onChanged(); - return this; - } - - private java.lang.Object callerIp_ = ""; - /** - *
-     * Caller's IP address, such as "1.1.1.1".
-     * 
- * - * string caller_ip = 2; - * @return The callerIp. - */ - public java.lang.String getCallerIp() { - java.lang.Object ref = callerIp_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - callerIp_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Caller's IP address, such as "1.1.1.1".
-     * 
- * - * string caller_ip = 2; - * @return The bytes for callerIp. - */ - public com.google.protobuf.ByteString - getCallerIpBytes() { - java.lang.Object ref = callerIp_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - callerIp_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Caller's IP address, such as "1.1.1.1".
-     * 
- * - * string caller_ip = 2; - * @param value The callerIp to set. - * @return This builder for chaining. - */ - public Builder setCallerIp( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - callerIp_ = value; - onChanged(); - return this; - } - /** - *
-     * Caller's IP address, such as "1.1.1.1".
-     * 
- * - * string caller_ip = 2; - * @return This builder for chaining. - */ - public Builder clearCallerIp() { - - callerIp_ = getDefaultInstance().getCallerIp(); - onChanged(); - return this; - } - /** - *
-     * Caller's IP address, such as "1.1.1.1".
-     * 
- * - * string caller_ip = 2; - * @param value The bytes for callerIp to set. - * @return This builder for chaining. - */ - public Builder setCallerIpBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - callerIp_ = value; - onChanged(); - return this; - } - - private com.google.cloud.securitycenter.v1.Geolocation callerIpGeo_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Geolocation, com.google.cloud.securitycenter.v1.Geolocation.Builder, com.google.cloud.securitycenter.v1.GeolocationOrBuilder> callerIpGeoBuilder_; - /** - *
-     * The caller IP's geolocation, which identifies where the call came from.
-     * 
- * - * .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; - * @return Whether the callerIpGeo field is set. - */ - public boolean hasCallerIpGeo() { - return callerIpGeoBuilder_ != null || callerIpGeo_ != null; - } - /** - *
-     * The caller IP's geolocation, which identifies where the call came from.
-     * 
- * - * .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; - * @return The callerIpGeo. - */ - public com.google.cloud.securitycenter.v1.Geolocation getCallerIpGeo() { - if (callerIpGeoBuilder_ == null) { - return callerIpGeo_ == null ? com.google.cloud.securitycenter.v1.Geolocation.getDefaultInstance() : callerIpGeo_; - } else { - return callerIpGeoBuilder_.getMessage(); - } - } - /** - *
-     * The caller IP's geolocation, which identifies where the call came from.
-     * 
- * - * .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; - */ - public Builder setCallerIpGeo(com.google.cloud.securitycenter.v1.Geolocation value) { - if (callerIpGeoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - callerIpGeo_ = value; - onChanged(); - } else { - callerIpGeoBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The caller IP's geolocation, which identifies where the call came from.
-     * 
- * - * .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; - */ - public Builder setCallerIpGeo( - com.google.cloud.securitycenter.v1.Geolocation.Builder builderForValue) { - if (callerIpGeoBuilder_ == null) { - callerIpGeo_ = builderForValue.build(); - onChanged(); - } else { - callerIpGeoBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The caller IP's geolocation, which identifies where the call came from.
-     * 
- * - * .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; - */ - public Builder mergeCallerIpGeo(com.google.cloud.securitycenter.v1.Geolocation value) { - if (callerIpGeoBuilder_ == null) { - if (callerIpGeo_ != null) { - callerIpGeo_ = - com.google.cloud.securitycenter.v1.Geolocation.newBuilder(callerIpGeo_).mergeFrom(value).buildPartial(); - } else { - callerIpGeo_ = value; - } - onChanged(); - } else { - callerIpGeoBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The caller IP's geolocation, which identifies where the call came from.
-     * 
- * - * .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; - */ - public Builder clearCallerIpGeo() { - if (callerIpGeoBuilder_ == null) { - callerIpGeo_ = null; - onChanged(); - } else { - callerIpGeo_ = null; - callerIpGeoBuilder_ = null; - } - - return this; - } - /** - *
-     * The caller IP's geolocation, which identifies where the call came from.
-     * 
- * - * .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; - */ - public com.google.cloud.securitycenter.v1.Geolocation.Builder getCallerIpGeoBuilder() { - - onChanged(); - return getCallerIpGeoFieldBuilder().getBuilder(); - } - /** - *
-     * The caller IP's geolocation, which identifies where the call came from.
-     * 
- * - * .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; - */ - public com.google.cloud.securitycenter.v1.GeolocationOrBuilder getCallerIpGeoOrBuilder() { - if (callerIpGeoBuilder_ != null) { - return callerIpGeoBuilder_.getMessageOrBuilder(); - } else { - return callerIpGeo_ == null ? - com.google.cloud.securitycenter.v1.Geolocation.getDefaultInstance() : callerIpGeo_; - } - } - /** - *
-     * The caller IP's geolocation, which identifies where the call came from.
-     * 
- * - * .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Geolocation, com.google.cloud.securitycenter.v1.Geolocation.Builder, com.google.cloud.securitycenter.v1.GeolocationOrBuilder> - getCallerIpGeoFieldBuilder() { - if (callerIpGeoBuilder_ == null) { - callerIpGeoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Geolocation, com.google.cloud.securitycenter.v1.Geolocation.Builder, com.google.cloud.securitycenter.v1.GeolocationOrBuilder>( - getCallerIpGeo(), - getParentForChildren(), - isClean()); - callerIpGeo_ = null; - } - return callerIpGeoBuilder_; - } - - private java.lang.Object userAgentFamily_ = ""; - /** - *
-     * What kind of user agent is associated, e.g. operating system shells,
-     * embedded or stand-alone applications, etc.
-     * 
- * - * string user_agent_family = 4; - * @return The userAgentFamily. - */ - public java.lang.String getUserAgentFamily() { - java.lang.Object ref = userAgentFamily_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - userAgentFamily_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * What kind of user agent is associated, e.g. operating system shells,
-     * embedded or stand-alone applications, etc.
-     * 
- * - * string user_agent_family = 4; - * @return The bytes for userAgentFamily. - */ - public com.google.protobuf.ByteString - getUserAgentFamilyBytes() { - java.lang.Object ref = userAgentFamily_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - userAgentFamily_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * What kind of user agent is associated, e.g. operating system shells,
-     * embedded or stand-alone applications, etc.
-     * 
- * - * string user_agent_family = 4; - * @param value The userAgentFamily to set. - * @return This builder for chaining. - */ - public Builder setUserAgentFamily( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - userAgentFamily_ = value; - onChanged(); - return this; - } - /** - *
-     * What kind of user agent is associated, e.g. operating system shells,
-     * embedded or stand-alone applications, etc.
-     * 
- * - * string user_agent_family = 4; - * @return This builder for chaining. - */ - public Builder clearUserAgentFamily() { - - userAgentFamily_ = getDefaultInstance().getUserAgentFamily(); - onChanged(); - return this; - } - /** - *
-     * What kind of user agent is associated, e.g. operating system shells,
-     * embedded or stand-alone applications, etc.
-     * 
- * - * string user_agent_family = 4; - * @param value The bytes for userAgentFamily to set. - * @return This builder for chaining. - */ - public Builder setUserAgentFamilyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - userAgentFamily_ = value; - onChanged(); - return this; - } - - private java.lang.Object serviceName_ = ""; - /** - *
-     * This is the API service that the service account made a call to, e.g.
-     * "iam.googleapis.com"
-     * 
- * - * string service_name = 5; - * @return The serviceName. - */ - public java.lang.String getServiceName() { - java.lang.Object ref = serviceName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - serviceName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * This is the API service that the service account made a call to, e.g.
-     * "iam.googleapis.com"
-     * 
- * - * string service_name = 5; - * @return The bytes for serviceName. - */ - public com.google.protobuf.ByteString - getServiceNameBytes() { - java.lang.Object ref = serviceName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - serviceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * This is the API service that the service account made a call to, e.g.
-     * "iam.googleapis.com"
-     * 
- * - * string service_name = 5; - * @param value The serviceName to set. - * @return This builder for chaining. - */ - public Builder setServiceName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - serviceName_ = value; - onChanged(); - return this; - } - /** - *
-     * This is the API service that the service account made a call to, e.g.
-     * "iam.googleapis.com"
-     * 
- * - * string service_name = 5; - * @return This builder for chaining. - */ - public Builder clearServiceName() { - - serviceName_ = getDefaultInstance().getServiceName(); - onChanged(); - return this; - } - /** - *
-     * This is the API service that the service account made a call to, e.g.
-     * "iam.googleapis.com"
-     * 
- * - * string service_name = 5; - * @param value The bytes for serviceName to set. - * @return This builder for chaining. - */ - public Builder setServiceNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - serviceName_ = value; - onChanged(); - return this; - } - - private java.lang.Object methodName_ = ""; - /** - *
-     * The method that the service account called, e.g. "SetIamPolicy".
-     * 
- * - * string method_name = 6; - * @return The methodName. - */ - public java.lang.String getMethodName() { - java.lang.Object ref = methodName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - methodName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The method that the service account called, e.g. "SetIamPolicy".
-     * 
- * - * string method_name = 6; - * @return The bytes for methodName. - */ - public com.google.protobuf.ByteString - getMethodNameBytes() { - java.lang.Object ref = methodName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - methodName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The method that the service account called, e.g. "SetIamPolicy".
-     * 
- * - * string method_name = 6; - * @param value The methodName to set. - * @return This builder for chaining. - */ - public Builder setMethodName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - methodName_ = value; - onChanged(); - return this; - } - /** - *
-     * The method that the service account called, e.g. "SetIamPolicy".
-     * 
- * - * string method_name = 6; - * @return This builder for chaining. - */ - public Builder clearMethodName() { - - methodName_ = getDefaultInstance().getMethodName(); - onChanged(); - return this; - } - /** - *
-     * The method that the service account called, e.g. "SetIamPolicy".
-     * 
- * - * string method_name = 6; - * @param value The bytes for methodName to set. - * @return This builder for chaining. - */ - public Builder setMethodNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - methodName_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Access) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Access) - private static final com.google.cloud.securitycenter.v1.Access DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Access(); - } - - public static com.google.cloud.securitycenter.v1.Access getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Access parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Access(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Access getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AccessOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AccessOrBuilder.java deleted file mode 100644 index e377e2faccab..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AccessOrBuilder.java +++ /dev/null @@ -1,140 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/access.proto - -package com.google.cloud.securitycenter.v1; - -public interface AccessOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Access) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Associated email, such as "foo@google.com".
-   * 
- * - * string principal_email = 1; - * @return The principalEmail. - */ - java.lang.String getPrincipalEmail(); - /** - *
-   * Associated email, such as "foo@google.com".
-   * 
- * - * string principal_email = 1; - * @return The bytes for principalEmail. - */ - com.google.protobuf.ByteString - getPrincipalEmailBytes(); - - /** - *
-   * Caller's IP address, such as "1.1.1.1".
-   * 
- * - * string caller_ip = 2; - * @return The callerIp. - */ - java.lang.String getCallerIp(); - /** - *
-   * Caller's IP address, such as "1.1.1.1".
-   * 
- * - * string caller_ip = 2; - * @return The bytes for callerIp. - */ - com.google.protobuf.ByteString - getCallerIpBytes(); - - /** - *
-   * The caller IP's geolocation, which identifies where the call came from.
-   * 
- * - * .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; - * @return Whether the callerIpGeo field is set. - */ - boolean hasCallerIpGeo(); - /** - *
-   * The caller IP's geolocation, which identifies where the call came from.
-   * 
- * - * .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; - * @return The callerIpGeo. - */ - com.google.cloud.securitycenter.v1.Geolocation getCallerIpGeo(); - /** - *
-   * The caller IP's geolocation, which identifies where the call came from.
-   * 
- * - * .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; - */ - com.google.cloud.securitycenter.v1.GeolocationOrBuilder getCallerIpGeoOrBuilder(); - - /** - *
-   * What kind of user agent is associated, e.g. operating system shells,
-   * embedded or stand-alone applications, etc.
-   * 
- * - * string user_agent_family = 4; - * @return The userAgentFamily. - */ - java.lang.String getUserAgentFamily(); - /** - *
-   * What kind of user agent is associated, e.g. operating system shells,
-   * embedded or stand-alone applications, etc.
-   * 
- * - * string user_agent_family = 4; - * @return The bytes for userAgentFamily. - */ - com.google.protobuf.ByteString - getUserAgentFamilyBytes(); - - /** - *
-   * This is the API service that the service account made a call to, e.g.
-   * "iam.googleapis.com"
-   * 
- * - * string service_name = 5; - * @return The serviceName. - */ - java.lang.String getServiceName(); - /** - *
-   * This is the API service that the service account made a call to, e.g.
-   * "iam.googleapis.com"
-   * 
- * - * string service_name = 5; - * @return The bytes for serviceName. - */ - com.google.protobuf.ByteString - getServiceNameBytes(); - - /** - *
-   * The method that the service account called, e.g. "SetIamPolicy".
-   * 
- * - * string method_name = 6; - * @return The methodName. - */ - java.lang.String getMethodName(); - /** - *
-   * The method that the service account called, e.g. "SetIamPolicy".
-   * 
- * - * string method_name = 6; - * @return The bytes for methodName. - */ - com.google.protobuf.ByteString - getMethodNameBytes(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AccessProto.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AccessProto.java deleted file mode 100644 index 8ac0c9a428a8..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AccessProto.java +++ /dev/null @@ -1,70 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/access.proto - -package com.google.cloud.securitycenter.v1; - -public final class AccessProto { - private AccessProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_Access_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_Access_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_Geolocation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_Geolocation_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n+google/cloud/securitycenter/v1/access." + - "proto\022\036google.cloud.securitycenter.v1\"\276\001" + - "\n\006Access\022\027\n\017principal_email\030\001 \001(\t\022\021\n\tcal" + - "ler_ip\030\002 \001(\t\022B\n\rcaller_ip_geo\030\003 \001(\0132+.go" + - "ogle.cloud.securitycenter.v1.Geolocation" + - "\022\031\n\021user_agent_family\030\004 \001(\t\022\024\n\014service_n" + - "ame\030\005 \001(\t\022\023\n\013method_name\030\006 \001(\t\"\"\n\013Geoloc" + - "ation\022\023\n\013region_code\030\001 \001(\tB\347\001\n\"com.googl" + - "e.cloud.securitycenter.v1B\013AccessProtoP\001" + - "ZLgoogle.golang.org/genproto/googleapis/" + - "cloud/securitycenter/v1;securitycenter\252\002" + - "\036Google.Cloud.SecurityCenter.V1\312\002\036Google" + - "\\Cloud\\SecurityCenter\\V1\352\002!Google::Cloud" + - "::SecurityCenter::V1b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_google_cloud_securitycenter_v1_Access_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_securitycenter_v1_Access_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_Access_descriptor, - new java.lang.String[] { "PrincipalEmail", "CallerIp", "CallerIpGeo", "UserAgentFamily", "ServiceName", "MethodName", }); - internal_static_google_cloud_securitycenter_v1_Geolocation_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_securitycenter_v1_Geolocation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_Geolocation_descriptor, - new java.lang.String[] { "RegionCode", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Asset.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Asset.java deleted file mode 100644 index fefa03084590..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Asset.java +++ /dev/null @@ -1,5665 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/asset.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Security Command Center representation of a Google Cloud
- * resource.
- * The Asset is a Security Command Center resource that captures information
- * about a single Google Cloud resource. All modifications to an Asset are only
- * within the context of Security Command Center and don't affect the referenced
- * Google Cloud resource.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Asset} - */ -public final class Asset extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Asset) - AssetOrBuilder { -private static final long serialVersionUID = 0L; - // Use Asset.newBuilder() to construct. - private Asset(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Asset() { - name_ = ""; - canonicalName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Asset(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Asset( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.Builder subBuilder = null; - if (securityCenterProperties_ != null) { - subBuilder = securityCenterProperties_.toBuilder(); - } - securityCenterProperties_ = input.readMessage(com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(securityCenterProperties_); - securityCenterProperties_ = subBuilder.buildPartial(); - } - - break; - } - case 58: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - resourceProperties_ = com.google.protobuf.MapField.newMapField( - ResourcePropertiesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - resourceProperties__ = input.readMessage( - ResourcePropertiesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - resourceProperties_.getMutableMap().put( - resourceProperties__.getKey(), resourceProperties__.getValue()); - break; - } - case 66: { - com.google.cloud.securitycenter.v1.SecurityMarks.Builder subBuilder = null; - if (securityMarks_ != null) { - subBuilder = securityMarks_.toBuilder(); - } - securityMarks_ = input.readMessage(com.google.cloud.securitycenter.v1.SecurityMarks.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(securityMarks_); - securityMarks_ = subBuilder.buildPartial(); - } - - break; - } - case 74: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 82: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 90: { - com.google.cloud.securitycenter.v1.Asset.IamPolicy.Builder subBuilder = null; - if (iamPolicy_ != null) { - subBuilder = iamPolicy_.toBuilder(); - } - iamPolicy_ = input.readMessage(com.google.cloud.securitycenter.v1.Asset.IamPolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(iamPolicy_); - iamPolicy_ = subBuilder.buildPartial(); - } - - break; - } - case 106: { - java.lang.String s = input.readStringRequireUtf8(); - - canonicalName_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.AssetOuterClass.internal_static_google_cloud_securitycenter_v1_Asset_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 7: - return internalGetResourceProperties(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.AssetOuterClass.internal_static_google_cloud_securitycenter_v1_Asset_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Asset.class, com.google.cloud.securitycenter.v1.Asset.Builder.class); - } - - public interface SecurityCenterPropertiesOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Asset.SecurityCenterProperties) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The full resource name of the Google Cloud resource this asset
-     * represents. This field is immutable after create time. See:
-     * https://cloud.google.com/apis/design/resource_names#full_resource_name
-     * 
- * - * string resource_name = 1; - * @return The resourceName. - */ - java.lang.String getResourceName(); - /** - *
-     * The full resource name of the Google Cloud resource this asset
-     * represents. This field is immutable after create time. See:
-     * https://cloud.google.com/apis/design/resource_names#full_resource_name
-     * 
- * - * string resource_name = 1; - * @return The bytes for resourceName. - */ - com.google.protobuf.ByteString - getResourceNameBytes(); - - /** - *
-     * The type of the Google Cloud resource. Examples include: APPLICATION,
-     * PROJECT, and ORGANIZATION. This is a case insensitive field defined by
-     * Security Command Center and/or the producer of the resource and is
-     * immutable after create time.
-     * 
- * - * string resource_type = 2; - * @return The resourceType. - */ - java.lang.String getResourceType(); - /** - *
-     * The type of the Google Cloud resource. Examples include: APPLICATION,
-     * PROJECT, and ORGANIZATION. This is a case insensitive field defined by
-     * Security Command Center and/or the producer of the resource and is
-     * immutable after create time.
-     * 
- * - * string resource_type = 2; - * @return The bytes for resourceType. - */ - com.google.protobuf.ByteString - getResourceTypeBytes(); - - /** - *
-     * The full resource name of the immediate parent of the resource. See:
-     * https://cloud.google.com/apis/design/resource_names#full_resource_name
-     * 
- * - * string resource_parent = 3; - * @return The resourceParent. - */ - java.lang.String getResourceParent(); - /** - *
-     * The full resource name of the immediate parent of the resource. See:
-     * https://cloud.google.com/apis/design/resource_names#full_resource_name
-     * 
- * - * string resource_parent = 3; - * @return The bytes for resourceParent. - */ - com.google.protobuf.ByteString - getResourceParentBytes(); - - /** - *
-     * The full resource name of the project the resource belongs to. See:
-     * https://cloud.google.com/apis/design/resource_names#full_resource_name
-     * 
- * - * string resource_project = 4; - * @return The resourceProject. - */ - java.lang.String getResourceProject(); - /** - *
-     * The full resource name of the project the resource belongs to. See:
-     * https://cloud.google.com/apis/design/resource_names#full_resource_name
-     * 
- * - * string resource_project = 4; - * @return The bytes for resourceProject. - */ - com.google.protobuf.ByteString - getResourceProjectBytes(); - - /** - *
-     * Owners of the Google Cloud resource.
-     * 
- * - * repeated string resource_owners = 5; - * @return A list containing the resourceOwners. - */ - java.util.List - getResourceOwnersList(); - /** - *
-     * Owners of the Google Cloud resource.
-     * 
- * - * repeated string resource_owners = 5; - * @return The count of resourceOwners. - */ - int getResourceOwnersCount(); - /** - *
-     * Owners of the Google Cloud resource.
-     * 
- * - * repeated string resource_owners = 5; - * @param index The index of the element to return. - * @return The resourceOwners at the given index. - */ - java.lang.String getResourceOwners(int index); - /** - *
-     * Owners of the Google Cloud resource.
-     * 
- * - * repeated string resource_owners = 5; - * @param index The index of the value to return. - * @return The bytes of the resourceOwners at the given index. - */ - com.google.protobuf.ByteString - getResourceOwnersBytes(int index); - - /** - *
-     * The user defined display name for this resource.
-     * 
- * - * string resource_display_name = 6; - * @return The resourceDisplayName. - */ - java.lang.String getResourceDisplayName(); - /** - *
-     * The user defined display name for this resource.
-     * 
- * - * string resource_display_name = 6; - * @return The bytes for resourceDisplayName. - */ - com.google.protobuf.ByteString - getResourceDisplayNameBytes(); - - /** - *
-     * The user defined display name for the parent of this resource.
-     * 
- * - * string resource_parent_display_name = 7; - * @return The resourceParentDisplayName. - */ - java.lang.String getResourceParentDisplayName(); - /** - *
-     * The user defined display name for the parent of this resource.
-     * 
- * - * string resource_parent_display_name = 7; - * @return The bytes for resourceParentDisplayName. - */ - com.google.protobuf.ByteString - getResourceParentDisplayNameBytes(); - - /** - *
-     * The user defined display name for the project of this resource.
-     * 
- * - * string resource_project_display_name = 8; - * @return The resourceProjectDisplayName. - */ - java.lang.String getResourceProjectDisplayName(); - /** - *
-     * The user defined display name for the project of this resource.
-     * 
- * - * string resource_project_display_name = 8; - * @return The bytes for resourceProjectDisplayName. - */ - com.google.protobuf.ByteString - getResourceProjectDisplayNameBytes(); - - /** - *
-     * Contains a Folder message for each folder in the assets ancestry.
-     * The first folder is the deepest nested folder, and the last folder is the
-     * folder directly under the Organization.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Folder folders = 10; - */ - java.util.List - getFoldersList(); - /** - *
-     * Contains a Folder message for each folder in the assets ancestry.
-     * The first folder is the deepest nested folder, and the last folder is the
-     * folder directly under the Organization.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Folder folders = 10; - */ - com.google.cloud.securitycenter.v1.Folder getFolders(int index); - /** - *
-     * Contains a Folder message for each folder in the assets ancestry.
-     * The first folder is the deepest nested folder, and the last folder is the
-     * folder directly under the Organization.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Folder folders = 10; - */ - int getFoldersCount(); - /** - *
-     * Contains a Folder message for each folder in the assets ancestry.
-     * The first folder is the deepest nested folder, and the last folder is the
-     * folder directly under the Organization.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Folder folders = 10; - */ - java.util.List - getFoldersOrBuilderList(); - /** - *
-     * Contains a Folder message for each folder in the assets ancestry.
-     * The first folder is the deepest nested folder, and the last folder is the
-     * folder directly under the Organization.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Folder folders = 10; - */ - com.google.cloud.securitycenter.v1.FolderOrBuilder getFoldersOrBuilder( - int index); - } - /** - *
-   * Security Command Center managed properties. These properties are managed by
-   * Security Command Center and cannot be modified by the user.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Asset.SecurityCenterProperties} - */ - public static final class SecurityCenterProperties extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Asset.SecurityCenterProperties) - SecurityCenterPropertiesOrBuilder { - private static final long serialVersionUID = 0L; - // Use SecurityCenterProperties.newBuilder() to construct. - private SecurityCenterProperties(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SecurityCenterProperties() { - resourceName_ = ""; - resourceType_ = ""; - resourceParent_ = ""; - resourceProject_ = ""; - resourceOwners_ = com.google.protobuf.LazyStringArrayList.EMPTY; - resourceDisplayName_ = ""; - resourceParentDisplayName_ = ""; - resourceProjectDisplayName_ = ""; - folders_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SecurityCenterProperties(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private SecurityCenterProperties( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - resourceName_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - resourceType_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - resourceParent_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - resourceProject_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - resourceOwners_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - resourceOwners_.add(s); - break; - } - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - - resourceDisplayName_ = s; - break; - } - case 58: { - java.lang.String s = input.readStringRequireUtf8(); - - resourceParentDisplayName_ = s; - break; - } - case 66: { - java.lang.String s = input.readStringRequireUtf8(); - - resourceProjectDisplayName_ = s; - break; - } - case 82: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - folders_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - folders_.add( - input.readMessage(com.google.cloud.securitycenter.v1.Folder.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - resourceOwners_ = resourceOwners_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - folders_ = java.util.Collections.unmodifiableList(folders_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.AssetOuterClass.internal_static_google_cloud_securitycenter_v1_Asset_SecurityCenterProperties_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.AssetOuterClass.internal_static_google_cloud_securitycenter_v1_Asset_SecurityCenterProperties_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.class, com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.Builder.class); - } - - public static final int RESOURCE_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object resourceName_; - /** - *
-     * The full resource name of the Google Cloud resource this asset
-     * represents. This field is immutable after create time. See:
-     * https://cloud.google.com/apis/design/resource_names#full_resource_name
-     * 
- * - * string resource_name = 1; - * @return The resourceName. - */ - @java.lang.Override - public java.lang.String getResourceName() { - java.lang.Object ref = resourceName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceName_ = s; - return s; - } - } - /** - *
-     * The full resource name of the Google Cloud resource this asset
-     * represents. This field is immutable after create time. See:
-     * https://cloud.google.com/apis/design/resource_names#full_resource_name
-     * 
- * - * string resource_name = 1; - * @return The bytes for resourceName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getResourceNameBytes() { - java.lang.Object ref = resourceName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESOURCE_TYPE_FIELD_NUMBER = 2; - private volatile java.lang.Object resourceType_; - /** - *
-     * The type of the Google Cloud resource. Examples include: APPLICATION,
-     * PROJECT, and ORGANIZATION. This is a case insensitive field defined by
-     * Security Command Center and/or the producer of the resource and is
-     * immutable after create time.
-     * 
- * - * string resource_type = 2; - * @return The resourceType. - */ - @java.lang.Override - public java.lang.String getResourceType() { - java.lang.Object ref = resourceType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceType_ = s; - return s; - } - } - /** - *
-     * The type of the Google Cloud resource. Examples include: APPLICATION,
-     * PROJECT, and ORGANIZATION. This is a case insensitive field defined by
-     * Security Command Center and/or the producer of the resource and is
-     * immutable after create time.
-     * 
- * - * string resource_type = 2; - * @return The bytes for resourceType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getResourceTypeBytes() { - java.lang.Object ref = resourceType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESOURCE_PARENT_FIELD_NUMBER = 3; - private volatile java.lang.Object resourceParent_; - /** - *
-     * The full resource name of the immediate parent of the resource. See:
-     * https://cloud.google.com/apis/design/resource_names#full_resource_name
-     * 
- * - * string resource_parent = 3; - * @return The resourceParent. - */ - @java.lang.Override - public java.lang.String getResourceParent() { - java.lang.Object ref = resourceParent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceParent_ = s; - return s; - } - } - /** - *
-     * The full resource name of the immediate parent of the resource. See:
-     * https://cloud.google.com/apis/design/resource_names#full_resource_name
-     * 
- * - * string resource_parent = 3; - * @return The bytes for resourceParent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getResourceParentBytes() { - java.lang.Object ref = resourceParent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceParent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESOURCE_PROJECT_FIELD_NUMBER = 4; - private volatile java.lang.Object resourceProject_; - /** - *
-     * The full resource name of the project the resource belongs to. See:
-     * https://cloud.google.com/apis/design/resource_names#full_resource_name
-     * 
- * - * string resource_project = 4; - * @return The resourceProject. - */ - @java.lang.Override - public java.lang.String getResourceProject() { - java.lang.Object ref = resourceProject_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceProject_ = s; - return s; - } - } - /** - *
-     * The full resource name of the project the resource belongs to. See:
-     * https://cloud.google.com/apis/design/resource_names#full_resource_name
-     * 
- * - * string resource_project = 4; - * @return The bytes for resourceProject. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getResourceProjectBytes() { - java.lang.Object ref = resourceProject_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceProject_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESOURCE_OWNERS_FIELD_NUMBER = 5; - private com.google.protobuf.LazyStringList resourceOwners_; - /** - *
-     * Owners of the Google Cloud resource.
-     * 
- * - * repeated string resource_owners = 5; - * @return A list containing the resourceOwners. - */ - public com.google.protobuf.ProtocolStringList - getResourceOwnersList() { - return resourceOwners_; - } - /** - *
-     * Owners of the Google Cloud resource.
-     * 
- * - * repeated string resource_owners = 5; - * @return The count of resourceOwners. - */ - public int getResourceOwnersCount() { - return resourceOwners_.size(); - } - /** - *
-     * Owners of the Google Cloud resource.
-     * 
- * - * repeated string resource_owners = 5; - * @param index The index of the element to return. - * @return The resourceOwners at the given index. - */ - public java.lang.String getResourceOwners(int index) { - return resourceOwners_.get(index); - } - /** - *
-     * Owners of the Google Cloud resource.
-     * 
- * - * repeated string resource_owners = 5; - * @param index The index of the value to return. - * @return The bytes of the resourceOwners at the given index. - */ - public com.google.protobuf.ByteString - getResourceOwnersBytes(int index) { - return resourceOwners_.getByteString(index); - } - - public static final int RESOURCE_DISPLAY_NAME_FIELD_NUMBER = 6; - private volatile java.lang.Object resourceDisplayName_; - /** - *
-     * The user defined display name for this resource.
-     * 
- * - * string resource_display_name = 6; - * @return The resourceDisplayName. - */ - @java.lang.Override - public java.lang.String getResourceDisplayName() { - java.lang.Object ref = resourceDisplayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceDisplayName_ = s; - return s; - } - } - /** - *
-     * The user defined display name for this resource.
-     * 
- * - * string resource_display_name = 6; - * @return The bytes for resourceDisplayName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getResourceDisplayNameBytes() { - java.lang.Object ref = resourceDisplayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceDisplayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESOURCE_PARENT_DISPLAY_NAME_FIELD_NUMBER = 7; - private volatile java.lang.Object resourceParentDisplayName_; - /** - *
-     * The user defined display name for the parent of this resource.
-     * 
- * - * string resource_parent_display_name = 7; - * @return The resourceParentDisplayName. - */ - @java.lang.Override - public java.lang.String getResourceParentDisplayName() { - java.lang.Object ref = resourceParentDisplayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceParentDisplayName_ = s; - return s; - } - } - /** - *
-     * The user defined display name for the parent of this resource.
-     * 
- * - * string resource_parent_display_name = 7; - * @return The bytes for resourceParentDisplayName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getResourceParentDisplayNameBytes() { - java.lang.Object ref = resourceParentDisplayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceParentDisplayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESOURCE_PROJECT_DISPLAY_NAME_FIELD_NUMBER = 8; - private volatile java.lang.Object resourceProjectDisplayName_; - /** - *
-     * The user defined display name for the project of this resource.
-     * 
- * - * string resource_project_display_name = 8; - * @return The resourceProjectDisplayName. - */ - @java.lang.Override - public java.lang.String getResourceProjectDisplayName() { - java.lang.Object ref = resourceProjectDisplayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceProjectDisplayName_ = s; - return s; - } - } - /** - *
-     * The user defined display name for the project of this resource.
-     * 
- * - * string resource_project_display_name = 8; - * @return The bytes for resourceProjectDisplayName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getResourceProjectDisplayNameBytes() { - java.lang.Object ref = resourceProjectDisplayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceProjectDisplayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FOLDERS_FIELD_NUMBER = 10; - private java.util.List folders_; - /** - *
-     * Contains a Folder message for each folder in the assets ancestry.
-     * The first folder is the deepest nested folder, and the last folder is the
-     * folder directly under the Organization.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Folder folders = 10; - */ - @java.lang.Override - public java.util.List getFoldersList() { - return folders_; - } - /** - *
-     * Contains a Folder message for each folder in the assets ancestry.
-     * The first folder is the deepest nested folder, and the last folder is the
-     * folder directly under the Organization.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Folder folders = 10; - */ - @java.lang.Override - public java.util.List - getFoldersOrBuilderList() { - return folders_; - } - /** - *
-     * Contains a Folder message for each folder in the assets ancestry.
-     * The first folder is the deepest nested folder, and the last folder is the
-     * folder directly under the Organization.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Folder folders = 10; - */ - @java.lang.Override - public int getFoldersCount() { - return folders_.size(); - } - /** - *
-     * Contains a Folder message for each folder in the assets ancestry.
-     * The first folder is the deepest nested folder, and the last folder is the
-     * folder directly under the Organization.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Folder folders = 10; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Folder getFolders(int index) { - return folders_.get(index); - } - /** - *
-     * Contains a Folder message for each folder in the assets ancestry.
-     * The first folder is the deepest nested folder, and the last folder is the
-     * folder directly under the Organization.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Folder folders = 10; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.FolderOrBuilder getFoldersOrBuilder( - int index) { - return folders_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceParent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, resourceParent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceProject_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, resourceProject_); - } - for (int i = 0; i < resourceOwners_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, resourceOwners_.getRaw(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceDisplayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, resourceDisplayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceParentDisplayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, resourceParentDisplayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceProjectDisplayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, resourceProjectDisplayName_); - } - for (int i = 0; i < folders_.size(); i++) { - output.writeMessage(10, folders_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resourceName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceParent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, resourceParent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceProject_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, resourceProject_); - } - { - int dataSize = 0; - for (int i = 0; i < resourceOwners_.size(); i++) { - dataSize += computeStringSizeNoTag(resourceOwners_.getRaw(i)); - } - size += dataSize; - size += 1 * getResourceOwnersList().size(); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceDisplayName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, resourceDisplayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceParentDisplayName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, resourceParentDisplayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceProjectDisplayName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, resourceProjectDisplayName_); - } - for (int i = 0; i < folders_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, folders_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties other = (com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties) obj; - - if (!getResourceName() - .equals(other.getResourceName())) return false; - if (!getResourceType() - .equals(other.getResourceType())) return false; - if (!getResourceParent() - .equals(other.getResourceParent())) return false; - if (!getResourceProject() - .equals(other.getResourceProject())) return false; - if (!getResourceOwnersList() - .equals(other.getResourceOwnersList())) return false; - if (!getResourceDisplayName() - .equals(other.getResourceDisplayName())) return false; - if (!getResourceParentDisplayName() - .equals(other.getResourceParentDisplayName())) return false; - if (!getResourceProjectDisplayName() - .equals(other.getResourceProjectDisplayName())) return false; - if (!getFoldersList() - .equals(other.getFoldersList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + RESOURCE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getResourceName().hashCode(); - hash = (37 * hash) + RESOURCE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getResourceType().hashCode(); - hash = (37 * hash) + RESOURCE_PARENT_FIELD_NUMBER; - hash = (53 * hash) + getResourceParent().hashCode(); - hash = (37 * hash) + RESOURCE_PROJECT_FIELD_NUMBER; - hash = (53 * hash) + getResourceProject().hashCode(); - if (getResourceOwnersCount() > 0) { - hash = (37 * hash) + RESOURCE_OWNERS_FIELD_NUMBER; - hash = (53 * hash) + getResourceOwnersList().hashCode(); - } - hash = (37 * hash) + RESOURCE_DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getResourceDisplayName().hashCode(); - hash = (37 * hash) + RESOURCE_PARENT_DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getResourceParentDisplayName().hashCode(); - hash = (37 * hash) + RESOURCE_PROJECT_DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getResourceProjectDisplayName().hashCode(); - if (getFoldersCount() > 0) { - hash = (37 * hash) + FOLDERS_FIELD_NUMBER; - hash = (53 * hash) + getFoldersList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Security Command Center managed properties. These properties are managed by
-     * Security Command Center and cannot be modified by the user.
-     * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Asset.SecurityCenterProperties} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Asset.SecurityCenterProperties) - com.google.cloud.securitycenter.v1.Asset.SecurityCenterPropertiesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.AssetOuterClass.internal_static_google_cloud_securitycenter_v1_Asset_SecurityCenterProperties_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.AssetOuterClass.internal_static_google_cloud_securitycenter_v1_Asset_SecurityCenterProperties_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.class, com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFoldersFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - resourceName_ = ""; - - resourceType_ = ""; - - resourceParent_ = ""; - - resourceProject_ = ""; - - resourceOwners_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - resourceDisplayName_ = ""; - - resourceParentDisplayName_ = ""; - - resourceProjectDisplayName_ = ""; - - if (foldersBuilder_ == null) { - folders_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - foldersBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.AssetOuterClass.internal_static_google_cloud_securitycenter_v1_Asset_SecurityCenterProperties_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties build() { - com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties buildPartial() { - com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties result = new com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties(this); - int from_bitField0_ = bitField0_; - result.resourceName_ = resourceName_; - result.resourceType_ = resourceType_; - result.resourceParent_ = resourceParent_; - result.resourceProject_ = resourceProject_; - if (((bitField0_ & 0x00000001) != 0)) { - resourceOwners_ = resourceOwners_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.resourceOwners_ = resourceOwners_; - result.resourceDisplayName_ = resourceDisplayName_; - result.resourceParentDisplayName_ = resourceParentDisplayName_; - result.resourceProjectDisplayName_ = resourceProjectDisplayName_; - if (foldersBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - folders_ = java.util.Collections.unmodifiableList(folders_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.folders_ = folders_; - } else { - result.folders_ = foldersBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties) { - return mergeFrom((com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties other) { - if (other == com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.getDefaultInstance()) return this; - if (!other.getResourceName().isEmpty()) { - resourceName_ = other.resourceName_; - onChanged(); - } - if (!other.getResourceType().isEmpty()) { - resourceType_ = other.resourceType_; - onChanged(); - } - if (!other.getResourceParent().isEmpty()) { - resourceParent_ = other.resourceParent_; - onChanged(); - } - if (!other.getResourceProject().isEmpty()) { - resourceProject_ = other.resourceProject_; - onChanged(); - } - if (!other.resourceOwners_.isEmpty()) { - if (resourceOwners_.isEmpty()) { - resourceOwners_ = other.resourceOwners_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResourceOwnersIsMutable(); - resourceOwners_.addAll(other.resourceOwners_); - } - onChanged(); - } - if (!other.getResourceDisplayName().isEmpty()) { - resourceDisplayName_ = other.resourceDisplayName_; - onChanged(); - } - if (!other.getResourceParentDisplayName().isEmpty()) { - resourceParentDisplayName_ = other.resourceParentDisplayName_; - onChanged(); - } - if (!other.getResourceProjectDisplayName().isEmpty()) { - resourceProjectDisplayName_ = other.resourceProjectDisplayName_; - onChanged(); - } - if (foldersBuilder_ == null) { - if (!other.folders_.isEmpty()) { - if (folders_.isEmpty()) { - folders_ = other.folders_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureFoldersIsMutable(); - folders_.addAll(other.folders_); - } - onChanged(); - } - } else { - if (!other.folders_.isEmpty()) { - if (foldersBuilder_.isEmpty()) { - foldersBuilder_.dispose(); - foldersBuilder_ = null; - folders_ = other.folders_; - bitField0_ = (bitField0_ & ~0x00000002); - foldersBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFoldersFieldBuilder() : null; - } else { - foldersBuilder_.addAllMessages(other.folders_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object resourceName_ = ""; - /** - *
-       * The full resource name of the Google Cloud resource this asset
-       * represents. This field is immutable after create time. See:
-       * https://cloud.google.com/apis/design/resource_names#full_resource_name
-       * 
- * - * string resource_name = 1; - * @return The resourceName. - */ - public java.lang.String getResourceName() { - java.lang.Object ref = resourceName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The full resource name of the Google Cloud resource this asset
-       * represents. This field is immutable after create time. See:
-       * https://cloud.google.com/apis/design/resource_names#full_resource_name
-       * 
- * - * string resource_name = 1; - * @return The bytes for resourceName. - */ - public com.google.protobuf.ByteString - getResourceNameBytes() { - java.lang.Object ref = resourceName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The full resource name of the Google Cloud resource this asset
-       * represents. This field is immutable after create time. See:
-       * https://cloud.google.com/apis/design/resource_names#full_resource_name
-       * 
- * - * string resource_name = 1; - * @param value The resourceName to set. - * @return This builder for chaining. - */ - public Builder setResourceName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceName_ = value; - onChanged(); - return this; - } - /** - *
-       * The full resource name of the Google Cloud resource this asset
-       * represents. This field is immutable after create time. See:
-       * https://cloud.google.com/apis/design/resource_names#full_resource_name
-       * 
- * - * string resource_name = 1; - * @return This builder for chaining. - */ - public Builder clearResourceName() { - - resourceName_ = getDefaultInstance().getResourceName(); - onChanged(); - return this; - } - /** - *
-       * The full resource name of the Google Cloud resource this asset
-       * represents. This field is immutable after create time. See:
-       * https://cloud.google.com/apis/design/resource_names#full_resource_name
-       * 
- * - * string resource_name = 1; - * @param value The bytes for resourceName to set. - * @return This builder for chaining. - */ - public Builder setResourceNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resourceName_ = value; - onChanged(); - return this; - } - - private java.lang.Object resourceType_ = ""; - /** - *
-       * The type of the Google Cloud resource. Examples include: APPLICATION,
-       * PROJECT, and ORGANIZATION. This is a case insensitive field defined by
-       * Security Command Center and/or the producer of the resource and is
-       * immutable after create time.
-       * 
- * - * string resource_type = 2; - * @return The resourceType. - */ - public java.lang.String getResourceType() { - java.lang.Object ref = resourceType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The type of the Google Cloud resource. Examples include: APPLICATION,
-       * PROJECT, and ORGANIZATION. This is a case insensitive field defined by
-       * Security Command Center and/or the producer of the resource and is
-       * immutable after create time.
-       * 
- * - * string resource_type = 2; - * @return The bytes for resourceType. - */ - public com.google.protobuf.ByteString - getResourceTypeBytes() { - java.lang.Object ref = resourceType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The type of the Google Cloud resource. Examples include: APPLICATION,
-       * PROJECT, and ORGANIZATION. This is a case insensitive field defined by
-       * Security Command Center and/or the producer of the resource and is
-       * immutable after create time.
-       * 
- * - * string resource_type = 2; - * @param value The resourceType to set. - * @return This builder for chaining. - */ - public Builder setResourceType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceType_ = value; - onChanged(); - return this; - } - /** - *
-       * The type of the Google Cloud resource. Examples include: APPLICATION,
-       * PROJECT, and ORGANIZATION. This is a case insensitive field defined by
-       * Security Command Center and/or the producer of the resource and is
-       * immutable after create time.
-       * 
- * - * string resource_type = 2; - * @return This builder for chaining. - */ - public Builder clearResourceType() { - - resourceType_ = getDefaultInstance().getResourceType(); - onChanged(); - return this; - } - /** - *
-       * The type of the Google Cloud resource. Examples include: APPLICATION,
-       * PROJECT, and ORGANIZATION. This is a case insensitive field defined by
-       * Security Command Center and/or the producer of the resource and is
-       * immutable after create time.
-       * 
- * - * string resource_type = 2; - * @param value The bytes for resourceType to set. - * @return This builder for chaining. - */ - public Builder setResourceTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resourceType_ = value; - onChanged(); - return this; - } - - private java.lang.Object resourceParent_ = ""; - /** - *
-       * The full resource name of the immediate parent of the resource. See:
-       * https://cloud.google.com/apis/design/resource_names#full_resource_name
-       * 
- * - * string resource_parent = 3; - * @return The resourceParent. - */ - public java.lang.String getResourceParent() { - java.lang.Object ref = resourceParent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceParent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The full resource name of the immediate parent of the resource. See:
-       * https://cloud.google.com/apis/design/resource_names#full_resource_name
-       * 
- * - * string resource_parent = 3; - * @return The bytes for resourceParent. - */ - public com.google.protobuf.ByteString - getResourceParentBytes() { - java.lang.Object ref = resourceParent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceParent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The full resource name of the immediate parent of the resource. See:
-       * https://cloud.google.com/apis/design/resource_names#full_resource_name
-       * 
- * - * string resource_parent = 3; - * @param value The resourceParent to set. - * @return This builder for chaining. - */ - public Builder setResourceParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceParent_ = value; - onChanged(); - return this; - } - /** - *
-       * The full resource name of the immediate parent of the resource. See:
-       * https://cloud.google.com/apis/design/resource_names#full_resource_name
-       * 
- * - * string resource_parent = 3; - * @return This builder for chaining. - */ - public Builder clearResourceParent() { - - resourceParent_ = getDefaultInstance().getResourceParent(); - onChanged(); - return this; - } - /** - *
-       * The full resource name of the immediate parent of the resource. See:
-       * https://cloud.google.com/apis/design/resource_names#full_resource_name
-       * 
- * - * string resource_parent = 3; - * @param value The bytes for resourceParent to set. - * @return This builder for chaining. - */ - public Builder setResourceParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resourceParent_ = value; - onChanged(); - return this; - } - - private java.lang.Object resourceProject_ = ""; - /** - *
-       * The full resource name of the project the resource belongs to. See:
-       * https://cloud.google.com/apis/design/resource_names#full_resource_name
-       * 
- * - * string resource_project = 4; - * @return The resourceProject. - */ - public java.lang.String getResourceProject() { - java.lang.Object ref = resourceProject_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceProject_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The full resource name of the project the resource belongs to. See:
-       * https://cloud.google.com/apis/design/resource_names#full_resource_name
-       * 
- * - * string resource_project = 4; - * @return The bytes for resourceProject. - */ - public com.google.protobuf.ByteString - getResourceProjectBytes() { - java.lang.Object ref = resourceProject_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceProject_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The full resource name of the project the resource belongs to. See:
-       * https://cloud.google.com/apis/design/resource_names#full_resource_name
-       * 
- * - * string resource_project = 4; - * @param value The resourceProject to set. - * @return This builder for chaining. - */ - public Builder setResourceProject( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceProject_ = value; - onChanged(); - return this; - } - /** - *
-       * The full resource name of the project the resource belongs to. See:
-       * https://cloud.google.com/apis/design/resource_names#full_resource_name
-       * 
- * - * string resource_project = 4; - * @return This builder for chaining. - */ - public Builder clearResourceProject() { - - resourceProject_ = getDefaultInstance().getResourceProject(); - onChanged(); - return this; - } - /** - *
-       * The full resource name of the project the resource belongs to. See:
-       * https://cloud.google.com/apis/design/resource_names#full_resource_name
-       * 
- * - * string resource_project = 4; - * @param value The bytes for resourceProject to set. - * @return This builder for chaining. - */ - public Builder setResourceProjectBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resourceProject_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList resourceOwners_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureResourceOwnersIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - resourceOwners_ = new com.google.protobuf.LazyStringArrayList(resourceOwners_); - bitField0_ |= 0x00000001; - } - } - /** - *
-       * Owners of the Google Cloud resource.
-       * 
- * - * repeated string resource_owners = 5; - * @return A list containing the resourceOwners. - */ - public com.google.protobuf.ProtocolStringList - getResourceOwnersList() { - return resourceOwners_.getUnmodifiableView(); - } - /** - *
-       * Owners of the Google Cloud resource.
-       * 
- * - * repeated string resource_owners = 5; - * @return The count of resourceOwners. - */ - public int getResourceOwnersCount() { - return resourceOwners_.size(); - } - /** - *
-       * Owners of the Google Cloud resource.
-       * 
- * - * repeated string resource_owners = 5; - * @param index The index of the element to return. - * @return The resourceOwners at the given index. - */ - public java.lang.String getResourceOwners(int index) { - return resourceOwners_.get(index); - } - /** - *
-       * Owners of the Google Cloud resource.
-       * 
- * - * repeated string resource_owners = 5; - * @param index The index of the value to return. - * @return The bytes of the resourceOwners at the given index. - */ - public com.google.protobuf.ByteString - getResourceOwnersBytes(int index) { - return resourceOwners_.getByteString(index); - } - /** - *
-       * Owners of the Google Cloud resource.
-       * 
- * - * repeated string resource_owners = 5; - * @param index The index to set the value at. - * @param value The resourceOwners to set. - * @return This builder for chaining. - */ - public Builder setResourceOwners( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureResourceOwnersIsMutable(); - resourceOwners_.set(index, value); - onChanged(); - return this; - } - /** - *
-       * Owners of the Google Cloud resource.
-       * 
- * - * repeated string resource_owners = 5; - * @param value The resourceOwners to add. - * @return This builder for chaining. - */ - public Builder addResourceOwners( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureResourceOwnersIsMutable(); - resourceOwners_.add(value); - onChanged(); - return this; - } - /** - *
-       * Owners of the Google Cloud resource.
-       * 
- * - * repeated string resource_owners = 5; - * @param values The resourceOwners to add. - * @return This builder for chaining. - */ - public Builder addAllResourceOwners( - java.lang.Iterable values) { - ensureResourceOwnersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, resourceOwners_); - onChanged(); - return this; - } - /** - *
-       * Owners of the Google Cloud resource.
-       * 
- * - * repeated string resource_owners = 5; - * @return This builder for chaining. - */ - public Builder clearResourceOwners() { - resourceOwners_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-       * Owners of the Google Cloud resource.
-       * 
- * - * repeated string resource_owners = 5; - * @param value The bytes of the resourceOwners to add. - * @return This builder for chaining. - */ - public Builder addResourceOwnersBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureResourceOwnersIsMutable(); - resourceOwners_.add(value); - onChanged(); - return this; - } - - private java.lang.Object resourceDisplayName_ = ""; - /** - *
-       * The user defined display name for this resource.
-       * 
- * - * string resource_display_name = 6; - * @return The resourceDisplayName. - */ - public java.lang.String getResourceDisplayName() { - java.lang.Object ref = resourceDisplayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceDisplayName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The user defined display name for this resource.
-       * 
- * - * string resource_display_name = 6; - * @return The bytes for resourceDisplayName. - */ - public com.google.protobuf.ByteString - getResourceDisplayNameBytes() { - java.lang.Object ref = resourceDisplayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceDisplayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The user defined display name for this resource.
-       * 
- * - * string resource_display_name = 6; - * @param value The resourceDisplayName to set. - * @return This builder for chaining. - */ - public Builder setResourceDisplayName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceDisplayName_ = value; - onChanged(); - return this; - } - /** - *
-       * The user defined display name for this resource.
-       * 
- * - * string resource_display_name = 6; - * @return This builder for chaining. - */ - public Builder clearResourceDisplayName() { - - resourceDisplayName_ = getDefaultInstance().getResourceDisplayName(); - onChanged(); - return this; - } - /** - *
-       * The user defined display name for this resource.
-       * 
- * - * string resource_display_name = 6; - * @param value The bytes for resourceDisplayName to set. - * @return This builder for chaining. - */ - public Builder setResourceDisplayNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resourceDisplayName_ = value; - onChanged(); - return this; - } - - private java.lang.Object resourceParentDisplayName_ = ""; - /** - *
-       * The user defined display name for the parent of this resource.
-       * 
- * - * string resource_parent_display_name = 7; - * @return The resourceParentDisplayName. - */ - public java.lang.String getResourceParentDisplayName() { - java.lang.Object ref = resourceParentDisplayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceParentDisplayName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The user defined display name for the parent of this resource.
-       * 
- * - * string resource_parent_display_name = 7; - * @return The bytes for resourceParentDisplayName. - */ - public com.google.protobuf.ByteString - getResourceParentDisplayNameBytes() { - java.lang.Object ref = resourceParentDisplayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceParentDisplayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The user defined display name for the parent of this resource.
-       * 
- * - * string resource_parent_display_name = 7; - * @param value The resourceParentDisplayName to set. - * @return This builder for chaining. - */ - public Builder setResourceParentDisplayName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceParentDisplayName_ = value; - onChanged(); - return this; - } - /** - *
-       * The user defined display name for the parent of this resource.
-       * 
- * - * string resource_parent_display_name = 7; - * @return This builder for chaining. - */ - public Builder clearResourceParentDisplayName() { - - resourceParentDisplayName_ = getDefaultInstance().getResourceParentDisplayName(); - onChanged(); - return this; - } - /** - *
-       * The user defined display name for the parent of this resource.
-       * 
- * - * string resource_parent_display_name = 7; - * @param value The bytes for resourceParentDisplayName to set. - * @return This builder for chaining. - */ - public Builder setResourceParentDisplayNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resourceParentDisplayName_ = value; - onChanged(); - return this; - } - - private java.lang.Object resourceProjectDisplayName_ = ""; - /** - *
-       * The user defined display name for the project of this resource.
-       * 
- * - * string resource_project_display_name = 8; - * @return The resourceProjectDisplayName. - */ - public java.lang.String getResourceProjectDisplayName() { - java.lang.Object ref = resourceProjectDisplayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceProjectDisplayName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The user defined display name for the project of this resource.
-       * 
- * - * string resource_project_display_name = 8; - * @return The bytes for resourceProjectDisplayName. - */ - public com.google.protobuf.ByteString - getResourceProjectDisplayNameBytes() { - java.lang.Object ref = resourceProjectDisplayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceProjectDisplayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The user defined display name for the project of this resource.
-       * 
- * - * string resource_project_display_name = 8; - * @param value The resourceProjectDisplayName to set. - * @return This builder for chaining. - */ - public Builder setResourceProjectDisplayName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceProjectDisplayName_ = value; - onChanged(); - return this; - } - /** - *
-       * The user defined display name for the project of this resource.
-       * 
- * - * string resource_project_display_name = 8; - * @return This builder for chaining. - */ - public Builder clearResourceProjectDisplayName() { - - resourceProjectDisplayName_ = getDefaultInstance().getResourceProjectDisplayName(); - onChanged(); - return this; - } - /** - *
-       * The user defined display name for the project of this resource.
-       * 
- * - * string resource_project_display_name = 8; - * @param value The bytes for resourceProjectDisplayName to set. - * @return This builder for chaining. - */ - public Builder setResourceProjectDisplayNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resourceProjectDisplayName_ = value; - onChanged(); - return this; - } - - private java.util.List folders_ = - java.util.Collections.emptyList(); - private void ensureFoldersIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - folders_ = new java.util.ArrayList(folders_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Folder, com.google.cloud.securitycenter.v1.Folder.Builder, com.google.cloud.securitycenter.v1.FolderOrBuilder> foldersBuilder_; - - /** - *
-       * Contains a Folder message for each folder in the assets ancestry.
-       * The first folder is the deepest nested folder, and the last folder is the
-       * folder directly under the Organization.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Folder folders = 10; - */ - public java.util.List getFoldersList() { - if (foldersBuilder_ == null) { - return java.util.Collections.unmodifiableList(folders_); - } else { - return foldersBuilder_.getMessageList(); - } - } - /** - *
-       * Contains a Folder message for each folder in the assets ancestry.
-       * The first folder is the deepest nested folder, and the last folder is the
-       * folder directly under the Organization.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Folder folders = 10; - */ - public int getFoldersCount() { - if (foldersBuilder_ == null) { - return folders_.size(); - } else { - return foldersBuilder_.getCount(); - } - } - /** - *
-       * Contains a Folder message for each folder in the assets ancestry.
-       * The first folder is the deepest nested folder, and the last folder is the
-       * folder directly under the Organization.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Folder folders = 10; - */ - public com.google.cloud.securitycenter.v1.Folder getFolders(int index) { - if (foldersBuilder_ == null) { - return folders_.get(index); - } else { - return foldersBuilder_.getMessage(index); - } - } - /** - *
-       * Contains a Folder message for each folder in the assets ancestry.
-       * The first folder is the deepest nested folder, and the last folder is the
-       * folder directly under the Organization.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Folder folders = 10; - */ - public Builder setFolders( - int index, com.google.cloud.securitycenter.v1.Folder value) { - if (foldersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFoldersIsMutable(); - folders_.set(index, value); - onChanged(); - } else { - foldersBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Contains a Folder message for each folder in the assets ancestry.
-       * The first folder is the deepest nested folder, and the last folder is the
-       * folder directly under the Organization.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Folder folders = 10; - */ - public Builder setFolders( - int index, com.google.cloud.securitycenter.v1.Folder.Builder builderForValue) { - if (foldersBuilder_ == null) { - ensureFoldersIsMutable(); - folders_.set(index, builderForValue.build()); - onChanged(); - } else { - foldersBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Contains a Folder message for each folder in the assets ancestry.
-       * The first folder is the deepest nested folder, and the last folder is the
-       * folder directly under the Organization.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Folder folders = 10; - */ - public Builder addFolders(com.google.cloud.securitycenter.v1.Folder value) { - if (foldersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFoldersIsMutable(); - folders_.add(value); - onChanged(); - } else { - foldersBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Contains a Folder message for each folder in the assets ancestry.
-       * The first folder is the deepest nested folder, and the last folder is the
-       * folder directly under the Organization.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Folder folders = 10; - */ - public Builder addFolders( - int index, com.google.cloud.securitycenter.v1.Folder value) { - if (foldersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFoldersIsMutable(); - folders_.add(index, value); - onChanged(); - } else { - foldersBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Contains a Folder message for each folder in the assets ancestry.
-       * The first folder is the deepest nested folder, and the last folder is the
-       * folder directly under the Organization.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Folder folders = 10; - */ - public Builder addFolders( - com.google.cloud.securitycenter.v1.Folder.Builder builderForValue) { - if (foldersBuilder_ == null) { - ensureFoldersIsMutable(); - folders_.add(builderForValue.build()); - onChanged(); - } else { - foldersBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Contains a Folder message for each folder in the assets ancestry.
-       * The first folder is the deepest nested folder, and the last folder is the
-       * folder directly under the Organization.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Folder folders = 10; - */ - public Builder addFolders( - int index, com.google.cloud.securitycenter.v1.Folder.Builder builderForValue) { - if (foldersBuilder_ == null) { - ensureFoldersIsMutable(); - folders_.add(index, builderForValue.build()); - onChanged(); - } else { - foldersBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Contains a Folder message for each folder in the assets ancestry.
-       * The first folder is the deepest nested folder, and the last folder is the
-       * folder directly under the Organization.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Folder folders = 10; - */ - public Builder addAllFolders( - java.lang.Iterable values) { - if (foldersBuilder_ == null) { - ensureFoldersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, folders_); - onChanged(); - } else { - foldersBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Contains a Folder message for each folder in the assets ancestry.
-       * The first folder is the deepest nested folder, and the last folder is the
-       * folder directly under the Organization.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Folder folders = 10; - */ - public Builder clearFolders() { - if (foldersBuilder_ == null) { - folders_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - foldersBuilder_.clear(); - } - return this; - } - /** - *
-       * Contains a Folder message for each folder in the assets ancestry.
-       * The first folder is the deepest nested folder, and the last folder is the
-       * folder directly under the Organization.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Folder folders = 10; - */ - public Builder removeFolders(int index) { - if (foldersBuilder_ == null) { - ensureFoldersIsMutable(); - folders_.remove(index); - onChanged(); - } else { - foldersBuilder_.remove(index); - } - return this; - } - /** - *
-       * Contains a Folder message for each folder in the assets ancestry.
-       * The first folder is the deepest nested folder, and the last folder is the
-       * folder directly under the Organization.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Folder folders = 10; - */ - public com.google.cloud.securitycenter.v1.Folder.Builder getFoldersBuilder( - int index) { - return getFoldersFieldBuilder().getBuilder(index); - } - /** - *
-       * Contains a Folder message for each folder in the assets ancestry.
-       * The first folder is the deepest nested folder, and the last folder is the
-       * folder directly under the Organization.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Folder folders = 10; - */ - public com.google.cloud.securitycenter.v1.FolderOrBuilder getFoldersOrBuilder( - int index) { - if (foldersBuilder_ == null) { - return folders_.get(index); } else { - return foldersBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Contains a Folder message for each folder in the assets ancestry.
-       * The first folder is the deepest nested folder, and the last folder is the
-       * folder directly under the Organization.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Folder folders = 10; - */ - public java.util.List - getFoldersOrBuilderList() { - if (foldersBuilder_ != null) { - return foldersBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(folders_); - } - } - /** - *
-       * Contains a Folder message for each folder in the assets ancestry.
-       * The first folder is the deepest nested folder, and the last folder is the
-       * folder directly under the Organization.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Folder folders = 10; - */ - public com.google.cloud.securitycenter.v1.Folder.Builder addFoldersBuilder() { - return getFoldersFieldBuilder().addBuilder( - com.google.cloud.securitycenter.v1.Folder.getDefaultInstance()); - } - /** - *
-       * Contains a Folder message for each folder in the assets ancestry.
-       * The first folder is the deepest nested folder, and the last folder is the
-       * folder directly under the Organization.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Folder folders = 10; - */ - public com.google.cloud.securitycenter.v1.Folder.Builder addFoldersBuilder( - int index) { - return getFoldersFieldBuilder().addBuilder( - index, com.google.cloud.securitycenter.v1.Folder.getDefaultInstance()); - } - /** - *
-       * Contains a Folder message for each folder in the assets ancestry.
-       * The first folder is the deepest nested folder, and the last folder is the
-       * folder directly under the Organization.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Folder folders = 10; - */ - public java.util.List - getFoldersBuilderList() { - return getFoldersFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Folder, com.google.cloud.securitycenter.v1.Folder.Builder, com.google.cloud.securitycenter.v1.FolderOrBuilder> - getFoldersFieldBuilder() { - if (foldersBuilder_ == null) { - foldersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Folder, com.google.cloud.securitycenter.v1.Folder.Builder, com.google.cloud.securitycenter.v1.FolderOrBuilder>( - folders_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - folders_ = null; - } - return foldersBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Asset.SecurityCenterProperties) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Asset.SecurityCenterProperties) - private static final com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties(); - } - - public static com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SecurityCenterProperties parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SecurityCenterProperties(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface IamPolicyOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Asset.IamPolicy) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The JSON representation of the Policy associated with the asset.
-     * See https://cloud.google.com/iam/reference/rest/v1/Policy for format
-     * details.
-     * 
- * - * string policy_blob = 1; - * @return The policyBlob. - */ - java.lang.String getPolicyBlob(); - /** - *
-     * The JSON representation of the Policy associated with the asset.
-     * See https://cloud.google.com/iam/reference/rest/v1/Policy for format
-     * details.
-     * 
- * - * string policy_blob = 1; - * @return The bytes for policyBlob. - */ - com.google.protobuf.ByteString - getPolicyBlobBytes(); - } - /** - *
-   * Cloud IAM Policy information associated with the Google Cloud resource
-   * described by the Security Command Center asset. This information is managed
-   * and defined by the Google Cloud resource and cannot be modified by the
-   * user.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Asset.IamPolicy} - */ - public static final class IamPolicy extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Asset.IamPolicy) - IamPolicyOrBuilder { - private static final long serialVersionUID = 0L; - // Use IamPolicy.newBuilder() to construct. - private IamPolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private IamPolicy() { - policyBlob_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new IamPolicy(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private IamPolicy( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - policyBlob_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.AssetOuterClass.internal_static_google_cloud_securitycenter_v1_Asset_IamPolicy_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.AssetOuterClass.internal_static_google_cloud_securitycenter_v1_Asset_IamPolicy_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Asset.IamPolicy.class, com.google.cloud.securitycenter.v1.Asset.IamPolicy.Builder.class); - } - - public static final int POLICY_BLOB_FIELD_NUMBER = 1; - private volatile java.lang.Object policyBlob_; - /** - *
-     * The JSON representation of the Policy associated with the asset.
-     * See https://cloud.google.com/iam/reference/rest/v1/Policy for format
-     * details.
-     * 
- * - * string policy_blob = 1; - * @return The policyBlob. - */ - @java.lang.Override - public java.lang.String getPolicyBlob() { - java.lang.Object ref = policyBlob_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - policyBlob_ = s; - return s; - } - } - /** - *
-     * The JSON representation of the Policy associated with the asset.
-     * See https://cloud.google.com/iam/reference/rest/v1/Policy for format
-     * details.
-     * 
- * - * string policy_blob = 1; - * @return The bytes for policyBlob. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPolicyBlobBytes() { - java.lang.Object ref = policyBlob_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - policyBlob_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(policyBlob_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, policyBlob_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(policyBlob_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, policyBlob_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.Asset.IamPolicy)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.Asset.IamPolicy other = (com.google.cloud.securitycenter.v1.Asset.IamPolicy) obj; - - if (!getPolicyBlob() - .equals(other.getPolicyBlob())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + POLICY_BLOB_FIELD_NUMBER; - hash = (53 * hash) + getPolicyBlob().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.Asset.IamPolicy parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Asset.IamPolicy parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Asset.IamPolicy parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Asset.IamPolicy parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Asset.IamPolicy parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Asset.IamPolicy parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Asset.IamPolicy parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Asset.IamPolicy parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Asset.IamPolicy parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Asset.IamPolicy parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Asset.IamPolicy parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Asset.IamPolicy parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.Asset.IamPolicy prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Cloud IAM Policy information associated with the Google Cloud resource
-     * described by the Security Command Center asset. This information is managed
-     * and defined by the Google Cloud resource and cannot be modified by the
-     * user.
-     * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Asset.IamPolicy} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Asset.IamPolicy) - com.google.cloud.securitycenter.v1.Asset.IamPolicyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.AssetOuterClass.internal_static_google_cloud_securitycenter_v1_Asset_IamPolicy_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.AssetOuterClass.internal_static_google_cloud_securitycenter_v1_Asset_IamPolicy_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Asset.IamPolicy.class, com.google.cloud.securitycenter.v1.Asset.IamPolicy.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.Asset.IamPolicy.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - policyBlob_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.AssetOuterClass.internal_static_google_cloud_securitycenter_v1_Asset_IamPolicy_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Asset.IamPolicy getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.Asset.IamPolicy.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Asset.IamPolicy build() { - com.google.cloud.securitycenter.v1.Asset.IamPolicy result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Asset.IamPolicy buildPartial() { - com.google.cloud.securitycenter.v1.Asset.IamPolicy result = new com.google.cloud.securitycenter.v1.Asset.IamPolicy(this); - result.policyBlob_ = policyBlob_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.Asset.IamPolicy) { - return mergeFrom((com.google.cloud.securitycenter.v1.Asset.IamPolicy)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.Asset.IamPolicy other) { - if (other == com.google.cloud.securitycenter.v1.Asset.IamPolicy.getDefaultInstance()) return this; - if (!other.getPolicyBlob().isEmpty()) { - policyBlob_ = other.policyBlob_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.Asset.IamPolicy parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.Asset.IamPolicy) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object policyBlob_ = ""; - /** - *
-       * The JSON representation of the Policy associated with the asset.
-       * See https://cloud.google.com/iam/reference/rest/v1/Policy for format
-       * details.
-       * 
- * - * string policy_blob = 1; - * @return The policyBlob. - */ - public java.lang.String getPolicyBlob() { - java.lang.Object ref = policyBlob_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - policyBlob_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The JSON representation of the Policy associated with the asset.
-       * See https://cloud.google.com/iam/reference/rest/v1/Policy for format
-       * details.
-       * 
- * - * string policy_blob = 1; - * @return The bytes for policyBlob. - */ - public com.google.protobuf.ByteString - getPolicyBlobBytes() { - java.lang.Object ref = policyBlob_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - policyBlob_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The JSON representation of the Policy associated with the asset.
-       * See https://cloud.google.com/iam/reference/rest/v1/Policy for format
-       * details.
-       * 
- * - * string policy_blob = 1; - * @param value The policyBlob to set. - * @return This builder for chaining. - */ - public Builder setPolicyBlob( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - policyBlob_ = value; - onChanged(); - return this; - } - /** - *
-       * The JSON representation of the Policy associated with the asset.
-       * See https://cloud.google.com/iam/reference/rest/v1/Policy for format
-       * details.
-       * 
- * - * string policy_blob = 1; - * @return This builder for chaining. - */ - public Builder clearPolicyBlob() { - - policyBlob_ = getDefaultInstance().getPolicyBlob(); - onChanged(); - return this; - } - /** - *
-       * The JSON representation of the Policy associated with the asset.
-       * See https://cloud.google.com/iam/reference/rest/v1/Policy for format
-       * details.
-       * 
- * - * string policy_blob = 1; - * @param value The bytes for policyBlob to set. - * @return This builder for chaining. - */ - public Builder setPolicyBlobBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - policyBlob_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Asset.IamPolicy) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Asset.IamPolicy) - private static final com.google.cloud.securitycenter.v1.Asset.IamPolicy DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Asset.IamPolicy(); - } - - public static com.google.cloud.securitycenter.v1.Asset.IamPolicy getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IamPolicy parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new IamPolicy(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Asset.IamPolicy getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * The relative resource name of this asset. See:
-   * https://cloud.google.com/apis/design/resource_names#relative_resource_name
-   * Example:
-   * "organizations/{organization_id}/assets/{asset_id}".
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The relative resource name of this asset. See:
-   * https://cloud.google.com/apis/design/resource_names#relative_resource_name
-   * Example:
-   * "organizations/{organization_id}/assets/{asset_id}".
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SECURITY_CENTER_PROPERTIES_FIELD_NUMBER = 2; - private com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties securityCenterProperties_; - /** - *
-   * Security Command Center managed properties. These properties are managed by
-   * Security Command Center and cannot be modified by the user.
-   * 
- * - * .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2; - * @return Whether the securityCenterProperties field is set. - */ - @java.lang.Override - public boolean hasSecurityCenterProperties() { - return securityCenterProperties_ != null; - } - /** - *
-   * Security Command Center managed properties. These properties are managed by
-   * Security Command Center and cannot be modified by the user.
-   * 
- * - * .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2; - * @return The securityCenterProperties. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties getSecurityCenterProperties() { - return securityCenterProperties_ == null ? com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.getDefaultInstance() : securityCenterProperties_; - } - /** - *
-   * Security Command Center managed properties. These properties are managed by
-   * Security Command Center and cannot be modified by the user.
-   * 
- * - * .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Asset.SecurityCenterPropertiesOrBuilder getSecurityCenterPropertiesOrBuilder() { - return getSecurityCenterProperties(); - } - - public static final int RESOURCE_PROPERTIES_FIELD_NUMBER = 7; - private static final class ResourcePropertiesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.protobuf.Value> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.securitycenter.v1.AssetOuterClass.internal_static_google_cloud_securitycenter_v1_Asset_ResourcePropertiesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.protobuf.Value.getDefaultInstance()); - } - private com.google.protobuf.MapField< - java.lang.String, com.google.protobuf.Value> resourceProperties_; - private com.google.protobuf.MapField - internalGetResourceProperties() { - if (resourceProperties_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ResourcePropertiesDefaultEntryHolder.defaultEntry); - } - return resourceProperties_; - } - - public int getResourcePropertiesCount() { - return internalGetResourceProperties().getMap().size(); - } - /** - *
-   * Resource managed properties. These properties are managed and defined by
-   * the Google Cloud resource and cannot be modified by the user.
-   * 
- * - * map<string, .google.protobuf.Value> resource_properties = 7; - */ - - @java.lang.Override - public boolean containsResourceProperties( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetResourceProperties().getMap().containsKey(key); - } - /** - * Use {@link #getResourcePropertiesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getResourceProperties() { - return getResourcePropertiesMap(); - } - /** - *
-   * Resource managed properties. These properties are managed and defined by
-   * the Google Cloud resource and cannot be modified by the user.
-   * 
- * - * map<string, .google.protobuf.Value> resource_properties = 7; - */ - @java.lang.Override - - public java.util.Map getResourcePropertiesMap() { - return internalGetResourceProperties().getMap(); - } - /** - *
-   * Resource managed properties. These properties are managed and defined by
-   * the Google Cloud resource and cannot be modified by the user.
-   * 
- * - * map<string, .google.protobuf.Value> resource_properties = 7; - */ - @java.lang.Override - - public com.google.protobuf.Value getResourcePropertiesOrDefault( - java.lang.String key, - com.google.protobuf.Value defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetResourceProperties().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Resource managed properties. These properties are managed and defined by
-   * the Google Cloud resource and cannot be modified by the user.
-   * 
- * - * map<string, .google.protobuf.Value> resource_properties = 7; - */ - @java.lang.Override - - public com.google.protobuf.Value getResourcePropertiesOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetResourceProperties().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int SECURITY_MARKS_FIELD_NUMBER = 8; - private com.google.cloud.securitycenter.v1.SecurityMarks securityMarks_; - /** - *
-   * User specified security marks. These marks are entirely managed by the user
-   * and come from the SecurityMarks resource that belongs to the asset.
-   * 
- * - * .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8; - * @return Whether the securityMarks field is set. - */ - @java.lang.Override - public boolean hasSecurityMarks() { - return securityMarks_ != null; - } - /** - *
-   * User specified security marks. These marks are entirely managed by the user
-   * and come from the SecurityMarks resource that belongs to the asset.
-   * 
- * - * .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8; - * @return The securityMarks. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.SecurityMarks getSecurityMarks() { - return securityMarks_ == null ? com.google.cloud.securitycenter.v1.SecurityMarks.getDefaultInstance() : securityMarks_; - } - /** - *
-   * User specified security marks. These marks are entirely managed by the user
-   * and come from the SecurityMarks resource that belongs to the asset.
-   * 
- * - * .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.SecurityMarksOrBuilder getSecurityMarksOrBuilder() { - return getSecurityMarks(); - } - - public static final int CREATE_TIME_FIELD_NUMBER = 9; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * The time at which the asset was created in Security Command Center.
-   * 
- * - * .google.protobuf.Timestamp create_time = 9; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * The time at which the asset was created in Security Command Center.
-   * 
- * - * .google.protobuf.Timestamp create_time = 9; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * The time at which the asset was created in Security Command Center.
-   * 
- * - * .google.protobuf.Timestamp create_time = 9; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 10; - private com.google.protobuf.Timestamp updateTime_; - /** - *
-   * The time at which the asset was last updated or added in Cloud SCC.
-   * 
- * - * .google.protobuf.Timestamp update_time = 10; - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - *
-   * The time at which the asset was last updated or added in Cloud SCC.
-   * 
- * - * .google.protobuf.Timestamp update_time = 10; - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - *
-   * The time at which the asset was last updated or added in Cloud SCC.
-   * 
- * - * .google.protobuf.Timestamp update_time = 10; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return getUpdateTime(); - } - - public static final int IAM_POLICY_FIELD_NUMBER = 11; - private com.google.cloud.securitycenter.v1.Asset.IamPolicy iamPolicy_; - /** - *
-   * Cloud IAM Policy information associated with the Google Cloud resource
-   * described by the Security Command Center asset. This information is managed
-   * and defined by the Google Cloud resource and cannot be modified by the
-   * user.
-   * 
- * - * .google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11; - * @return Whether the iamPolicy field is set. - */ - @java.lang.Override - public boolean hasIamPolicy() { - return iamPolicy_ != null; - } - /** - *
-   * Cloud IAM Policy information associated with the Google Cloud resource
-   * described by the Security Command Center asset. This information is managed
-   * and defined by the Google Cloud resource and cannot be modified by the
-   * user.
-   * 
- * - * .google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11; - * @return The iamPolicy. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Asset.IamPolicy getIamPolicy() { - return iamPolicy_ == null ? com.google.cloud.securitycenter.v1.Asset.IamPolicy.getDefaultInstance() : iamPolicy_; - } - /** - *
-   * Cloud IAM Policy information associated with the Google Cloud resource
-   * described by the Security Command Center asset. This information is managed
-   * and defined by the Google Cloud resource and cannot be modified by the
-   * user.
-   * 
- * - * .google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Asset.IamPolicyOrBuilder getIamPolicyOrBuilder() { - return getIamPolicy(); - } - - public static final int CANONICAL_NAME_FIELD_NUMBER = 13; - private volatile java.lang.Object canonicalName_; - /** - *
-   * The canonical name of the resource. It's either
-   * "organizations/{organization_id}/assets/{asset_id}",
-   * "folders/{folder_id}/assets/{asset_id}" or
-   * "projects/{project_number}/assets/{asset_id}", depending on the closest CRM
-   * ancestor of the resource.
-   * 
- * - * string canonical_name = 13; - * @return The canonicalName. - */ - @java.lang.Override - public java.lang.String getCanonicalName() { - java.lang.Object ref = canonicalName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - canonicalName_ = s; - return s; - } - } - /** - *
-   * The canonical name of the resource. It's either
-   * "organizations/{organization_id}/assets/{asset_id}",
-   * "folders/{folder_id}/assets/{asset_id}" or
-   * "projects/{project_number}/assets/{asset_id}", depending on the closest CRM
-   * ancestor of the resource.
-   * 
- * - * string canonical_name = 13; - * @return The bytes for canonicalName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCanonicalNameBytes() { - java.lang.Object ref = canonicalName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - canonicalName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (securityCenterProperties_ != null) { - output.writeMessage(2, getSecurityCenterProperties()); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetResourceProperties(), - ResourcePropertiesDefaultEntryHolder.defaultEntry, - 7); - if (securityMarks_ != null) { - output.writeMessage(8, getSecurityMarks()); - } - if (createTime_ != null) { - output.writeMessage(9, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(10, getUpdateTime()); - } - if (iamPolicy_ != null) { - output.writeMessage(11, getIamPolicy()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(canonicalName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 13, canonicalName_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (securityCenterProperties_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getSecurityCenterProperties()); - } - for (java.util.Map.Entry entry - : internalGetResourceProperties().getMap().entrySet()) { - com.google.protobuf.MapEntry - resourceProperties__ = ResourcePropertiesDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, resourceProperties__); - } - if (securityMarks_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, getSecurityMarks()); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, getUpdateTime()); - } - if (iamPolicy_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(11, getIamPolicy()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(canonicalName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, canonicalName_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.Asset)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.Asset other = (com.google.cloud.securitycenter.v1.Asset) obj; - - if (!getName() - .equals(other.getName())) return false; - if (hasSecurityCenterProperties() != other.hasSecurityCenterProperties()) return false; - if (hasSecurityCenterProperties()) { - if (!getSecurityCenterProperties() - .equals(other.getSecurityCenterProperties())) return false; - } - if (!internalGetResourceProperties().equals( - other.internalGetResourceProperties())) return false; - if (hasSecurityMarks() != other.hasSecurityMarks()) return false; - if (hasSecurityMarks()) { - if (!getSecurityMarks() - .equals(other.getSecurityMarks())) return false; - } - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime() - .equals(other.getUpdateTime())) return false; - } - if (hasIamPolicy() != other.hasIamPolicy()) return false; - if (hasIamPolicy()) { - if (!getIamPolicy() - .equals(other.getIamPolicy())) return false; - } - if (!getCanonicalName() - .equals(other.getCanonicalName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasSecurityCenterProperties()) { - hash = (37 * hash) + SECURITY_CENTER_PROPERTIES_FIELD_NUMBER; - hash = (53 * hash) + getSecurityCenterProperties().hashCode(); - } - if (!internalGetResourceProperties().getMap().isEmpty()) { - hash = (37 * hash) + RESOURCE_PROPERTIES_FIELD_NUMBER; - hash = (53 * hash) + internalGetResourceProperties().hashCode(); - } - if (hasSecurityMarks()) { - hash = (37 * hash) + SECURITY_MARKS_FIELD_NUMBER; - hash = (53 * hash) + getSecurityMarks().hashCode(); - } - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - if (hasIamPolicy()) { - hash = (37 * hash) + IAM_POLICY_FIELD_NUMBER; - hash = (53 * hash) + getIamPolicy().hashCode(); - } - hash = (37 * hash) + CANONICAL_NAME_FIELD_NUMBER; - hash = (53 * hash) + getCanonicalName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.Asset parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Asset parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Asset parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Asset parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Asset parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Asset parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Asset parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Asset parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Asset parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Asset parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Asset parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Asset parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.Asset prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Security Command Center representation of a Google Cloud
-   * resource.
-   * The Asset is a Security Command Center resource that captures information
-   * about a single Google Cloud resource. All modifications to an Asset are only
-   * within the context of Security Command Center and don't affect the referenced
-   * Google Cloud resource.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Asset} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Asset) - com.google.cloud.securitycenter.v1.AssetOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.AssetOuterClass.internal_static_google_cloud_securitycenter_v1_Asset_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 7: - return internalGetResourceProperties(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 7: - return internalGetMutableResourceProperties(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.AssetOuterClass.internal_static_google_cloud_securitycenter_v1_Asset_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Asset.class, com.google.cloud.securitycenter.v1.Asset.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.Asset.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - if (securityCenterPropertiesBuilder_ == null) { - securityCenterProperties_ = null; - } else { - securityCenterProperties_ = null; - securityCenterPropertiesBuilder_ = null; - } - internalGetMutableResourceProperties().clear(); - if (securityMarksBuilder_ == null) { - securityMarks_ = null; - } else { - securityMarks_ = null; - securityMarksBuilder_ = null; - } - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (updateTimeBuilder_ == null) { - updateTime_ = null; - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - if (iamPolicyBuilder_ == null) { - iamPolicy_ = null; - } else { - iamPolicy_ = null; - iamPolicyBuilder_ = null; - } - canonicalName_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.AssetOuterClass.internal_static_google_cloud_securitycenter_v1_Asset_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Asset getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.Asset.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Asset build() { - com.google.cloud.securitycenter.v1.Asset result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Asset buildPartial() { - com.google.cloud.securitycenter.v1.Asset result = new com.google.cloud.securitycenter.v1.Asset(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - if (securityCenterPropertiesBuilder_ == null) { - result.securityCenterProperties_ = securityCenterProperties_; - } else { - result.securityCenterProperties_ = securityCenterPropertiesBuilder_.build(); - } - result.resourceProperties_ = internalGetResourceProperties(); - result.resourceProperties_.makeImmutable(); - if (securityMarksBuilder_ == null) { - result.securityMarks_ = securityMarks_; - } else { - result.securityMarks_ = securityMarksBuilder_.build(); - } - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (updateTimeBuilder_ == null) { - result.updateTime_ = updateTime_; - } else { - result.updateTime_ = updateTimeBuilder_.build(); - } - if (iamPolicyBuilder_ == null) { - result.iamPolicy_ = iamPolicy_; - } else { - result.iamPolicy_ = iamPolicyBuilder_.build(); - } - result.canonicalName_ = canonicalName_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.Asset) { - return mergeFrom((com.google.cloud.securitycenter.v1.Asset)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.Asset other) { - if (other == com.google.cloud.securitycenter.v1.Asset.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.hasSecurityCenterProperties()) { - mergeSecurityCenterProperties(other.getSecurityCenterProperties()); - } - internalGetMutableResourceProperties().mergeFrom( - other.internalGetResourceProperties()); - if (other.hasSecurityMarks()) { - mergeSecurityMarks(other.getSecurityMarks()); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (other.hasIamPolicy()) { - mergeIamPolicy(other.getIamPolicy()); - } - if (!other.getCanonicalName().isEmpty()) { - canonicalName_ = other.canonicalName_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.Asset parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.Asset) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The relative resource name of this asset. See:
-     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
-     * Example:
-     * "organizations/{organization_id}/assets/{asset_id}".
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The relative resource name of this asset. See:
-     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
-     * Example:
-     * "organizations/{organization_id}/assets/{asset_id}".
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The relative resource name of this asset. See:
-     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
-     * Example:
-     * "organizations/{organization_id}/assets/{asset_id}".
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * The relative resource name of this asset. See:
-     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
-     * Example:
-     * "organizations/{organization_id}/assets/{asset_id}".
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * The relative resource name of this asset. See:
-     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
-     * Example:
-     * "organizations/{organization_id}/assets/{asset_id}".
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties securityCenterProperties_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties, com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.Builder, com.google.cloud.securitycenter.v1.Asset.SecurityCenterPropertiesOrBuilder> securityCenterPropertiesBuilder_; - /** - *
-     * Security Command Center managed properties. These properties are managed by
-     * Security Command Center and cannot be modified by the user.
-     * 
- * - * .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2; - * @return Whether the securityCenterProperties field is set. - */ - public boolean hasSecurityCenterProperties() { - return securityCenterPropertiesBuilder_ != null || securityCenterProperties_ != null; - } - /** - *
-     * Security Command Center managed properties. These properties are managed by
-     * Security Command Center and cannot be modified by the user.
-     * 
- * - * .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2; - * @return The securityCenterProperties. - */ - public com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties getSecurityCenterProperties() { - if (securityCenterPropertiesBuilder_ == null) { - return securityCenterProperties_ == null ? com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.getDefaultInstance() : securityCenterProperties_; - } else { - return securityCenterPropertiesBuilder_.getMessage(); - } - } - /** - *
-     * Security Command Center managed properties. These properties are managed by
-     * Security Command Center and cannot be modified by the user.
-     * 
- * - * .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2; - */ - public Builder setSecurityCenterProperties(com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties value) { - if (securityCenterPropertiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - securityCenterProperties_ = value; - onChanged(); - } else { - securityCenterPropertiesBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Security Command Center managed properties. These properties are managed by
-     * Security Command Center and cannot be modified by the user.
-     * 
- * - * .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2; - */ - public Builder setSecurityCenterProperties( - com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.Builder builderForValue) { - if (securityCenterPropertiesBuilder_ == null) { - securityCenterProperties_ = builderForValue.build(); - onChanged(); - } else { - securityCenterPropertiesBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Security Command Center managed properties. These properties are managed by
-     * Security Command Center and cannot be modified by the user.
-     * 
- * - * .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2; - */ - public Builder mergeSecurityCenterProperties(com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties value) { - if (securityCenterPropertiesBuilder_ == null) { - if (securityCenterProperties_ != null) { - securityCenterProperties_ = - com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.newBuilder(securityCenterProperties_).mergeFrom(value).buildPartial(); - } else { - securityCenterProperties_ = value; - } - onChanged(); - } else { - securityCenterPropertiesBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Security Command Center managed properties. These properties are managed by
-     * Security Command Center and cannot be modified by the user.
-     * 
- * - * .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2; - */ - public Builder clearSecurityCenterProperties() { - if (securityCenterPropertiesBuilder_ == null) { - securityCenterProperties_ = null; - onChanged(); - } else { - securityCenterProperties_ = null; - securityCenterPropertiesBuilder_ = null; - } - - return this; - } - /** - *
-     * Security Command Center managed properties. These properties are managed by
-     * Security Command Center and cannot be modified by the user.
-     * 
- * - * .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2; - */ - public com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.Builder getSecurityCenterPropertiesBuilder() { - - onChanged(); - return getSecurityCenterPropertiesFieldBuilder().getBuilder(); - } - /** - *
-     * Security Command Center managed properties. These properties are managed by
-     * Security Command Center and cannot be modified by the user.
-     * 
- * - * .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2; - */ - public com.google.cloud.securitycenter.v1.Asset.SecurityCenterPropertiesOrBuilder getSecurityCenterPropertiesOrBuilder() { - if (securityCenterPropertiesBuilder_ != null) { - return securityCenterPropertiesBuilder_.getMessageOrBuilder(); - } else { - return securityCenterProperties_ == null ? - com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.getDefaultInstance() : securityCenterProperties_; - } - } - /** - *
-     * Security Command Center managed properties. These properties are managed by
-     * Security Command Center and cannot be modified by the user.
-     * 
- * - * .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties, com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.Builder, com.google.cloud.securitycenter.v1.Asset.SecurityCenterPropertiesOrBuilder> - getSecurityCenterPropertiesFieldBuilder() { - if (securityCenterPropertiesBuilder_ == null) { - securityCenterPropertiesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties, com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties.Builder, com.google.cloud.securitycenter.v1.Asset.SecurityCenterPropertiesOrBuilder>( - getSecurityCenterProperties(), - getParentForChildren(), - isClean()); - securityCenterProperties_ = null; - } - return securityCenterPropertiesBuilder_; - } - - private com.google.protobuf.MapField< - java.lang.String, com.google.protobuf.Value> resourceProperties_; - private com.google.protobuf.MapField - internalGetResourceProperties() { - if (resourceProperties_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ResourcePropertiesDefaultEntryHolder.defaultEntry); - } - return resourceProperties_; - } - private com.google.protobuf.MapField - internalGetMutableResourceProperties() { - onChanged();; - if (resourceProperties_ == null) { - resourceProperties_ = com.google.protobuf.MapField.newMapField( - ResourcePropertiesDefaultEntryHolder.defaultEntry); - } - if (!resourceProperties_.isMutable()) { - resourceProperties_ = resourceProperties_.copy(); - } - return resourceProperties_; - } - - public int getResourcePropertiesCount() { - return internalGetResourceProperties().getMap().size(); - } - /** - *
-     * Resource managed properties. These properties are managed and defined by
-     * the Google Cloud resource and cannot be modified by the user.
-     * 
- * - * map<string, .google.protobuf.Value> resource_properties = 7; - */ - - @java.lang.Override - public boolean containsResourceProperties( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetResourceProperties().getMap().containsKey(key); - } - /** - * Use {@link #getResourcePropertiesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getResourceProperties() { - return getResourcePropertiesMap(); - } - /** - *
-     * Resource managed properties. These properties are managed and defined by
-     * the Google Cloud resource and cannot be modified by the user.
-     * 
- * - * map<string, .google.protobuf.Value> resource_properties = 7; - */ - @java.lang.Override - - public java.util.Map getResourcePropertiesMap() { - return internalGetResourceProperties().getMap(); - } - /** - *
-     * Resource managed properties. These properties are managed and defined by
-     * the Google Cloud resource and cannot be modified by the user.
-     * 
- * - * map<string, .google.protobuf.Value> resource_properties = 7; - */ - @java.lang.Override - - public com.google.protobuf.Value getResourcePropertiesOrDefault( - java.lang.String key, - com.google.protobuf.Value defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetResourceProperties().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * Resource managed properties. These properties are managed and defined by
-     * the Google Cloud resource and cannot be modified by the user.
-     * 
- * - * map<string, .google.protobuf.Value> resource_properties = 7; - */ - @java.lang.Override - - public com.google.protobuf.Value getResourcePropertiesOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetResourceProperties().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearResourceProperties() { - internalGetMutableResourceProperties().getMutableMap() - .clear(); - return this; - } - /** - *
-     * Resource managed properties. These properties are managed and defined by
-     * the Google Cloud resource and cannot be modified by the user.
-     * 
- * - * map<string, .google.protobuf.Value> resource_properties = 7; - */ - - public Builder removeResourceProperties( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableResourceProperties().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableResourceProperties() { - return internalGetMutableResourceProperties().getMutableMap(); - } - /** - *
-     * Resource managed properties. These properties are managed and defined by
-     * the Google Cloud resource and cannot be modified by the user.
-     * 
- * - * map<string, .google.protobuf.Value> resource_properties = 7; - */ - public Builder putResourceProperties( - java.lang.String key, - com.google.protobuf.Value value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { - throw new NullPointerException("map value"); -} - - internalGetMutableResourceProperties().getMutableMap() - .put(key, value); - return this; - } - /** - *
-     * Resource managed properties. These properties are managed and defined by
-     * the Google Cloud resource and cannot be modified by the user.
-     * 
- * - * map<string, .google.protobuf.Value> resource_properties = 7; - */ - - public Builder putAllResourceProperties( - java.util.Map values) { - internalGetMutableResourceProperties().getMutableMap() - .putAll(values); - return this; - } - - private com.google.cloud.securitycenter.v1.SecurityMarks securityMarks_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.SecurityMarks, com.google.cloud.securitycenter.v1.SecurityMarks.Builder, com.google.cloud.securitycenter.v1.SecurityMarksOrBuilder> securityMarksBuilder_; - /** - *
-     * User specified security marks. These marks are entirely managed by the user
-     * and come from the SecurityMarks resource that belongs to the asset.
-     * 
- * - * .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8; - * @return Whether the securityMarks field is set. - */ - public boolean hasSecurityMarks() { - return securityMarksBuilder_ != null || securityMarks_ != null; - } - /** - *
-     * User specified security marks. These marks are entirely managed by the user
-     * and come from the SecurityMarks resource that belongs to the asset.
-     * 
- * - * .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8; - * @return The securityMarks. - */ - public com.google.cloud.securitycenter.v1.SecurityMarks getSecurityMarks() { - if (securityMarksBuilder_ == null) { - return securityMarks_ == null ? com.google.cloud.securitycenter.v1.SecurityMarks.getDefaultInstance() : securityMarks_; - } else { - return securityMarksBuilder_.getMessage(); - } - } - /** - *
-     * User specified security marks. These marks are entirely managed by the user
-     * and come from the SecurityMarks resource that belongs to the asset.
-     * 
- * - * .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8; - */ - public Builder setSecurityMarks(com.google.cloud.securitycenter.v1.SecurityMarks value) { - if (securityMarksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - securityMarks_ = value; - onChanged(); - } else { - securityMarksBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * User specified security marks. These marks are entirely managed by the user
-     * and come from the SecurityMarks resource that belongs to the asset.
-     * 
- * - * .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8; - */ - public Builder setSecurityMarks( - com.google.cloud.securitycenter.v1.SecurityMarks.Builder builderForValue) { - if (securityMarksBuilder_ == null) { - securityMarks_ = builderForValue.build(); - onChanged(); - } else { - securityMarksBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * User specified security marks. These marks are entirely managed by the user
-     * and come from the SecurityMarks resource that belongs to the asset.
-     * 
- * - * .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8; - */ - public Builder mergeSecurityMarks(com.google.cloud.securitycenter.v1.SecurityMarks value) { - if (securityMarksBuilder_ == null) { - if (securityMarks_ != null) { - securityMarks_ = - com.google.cloud.securitycenter.v1.SecurityMarks.newBuilder(securityMarks_).mergeFrom(value).buildPartial(); - } else { - securityMarks_ = value; - } - onChanged(); - } else { - securityMarksBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * User specified security marks. These marks are entirely managed by the user
-     * and come from the SecurityMarks resource that belongs to the asset.
-     * 
- * - * .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8; - */ - public Builder clearSecurityMarks() { - if (securityMarksBuilder_ == null) { - securityMarks_ = null; - onChanged(); - } else { - securityMarks_ = null; - securityMarksBuilder_ = null; - } - - return this; - } - /** - *
-     * User specified security marks. These marks are entirely managed by the user
-     * and come from the SecurityMarks resource that belongs to the asset.
-     * 
- * - * .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8; - */ - public com.google.cloud.securitycenter.v1.SecurityMarks.Builder getSecurityMarksBuilder() { - - onChanged(); - return getSecurityMarksFieldBuilder().getBuilder(); - } - /** - *
-     * User specified security marks. These marks are entirely managed by the user
-     * and come from the SecurityMarks resource that belongs to the asset.
-     * 
- * - * .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8; - */ - public com.google.cloud.securitycenter.v1.SecurityMarksOrBuilder getSecurityMarksOrBuilder() { - if (securityMarksBuilder_ != null) { - return securityMarksBuilder_.getMessageOrBuilder(); - } else { - return securityMarks_ == null ? - com.google.cloud.securitycenter.v1.SecurityMarks.getDefaultInstance() : securityMarks_; - } - } - /** - *
-     * User specified security marks. These marks are entirely managed by the user
-     * and come from the SecurityMarks resource that belongs to the asset.
-     * 
- * - * .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.SecurityMarks, com.google.cloud.securitycenter.v1.SecurityMarks.Builder, com.google.cloud.securitycenter.v1.SecurityMarksOrBuilder> - getSecurityMarksFieldBuilder() { - if (securityMarksBuilder_ == null) { - securityMarksBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.SecurityMarks, com.google.cloud.securitycenter.v1.SecurityMarks.Builder, com.google.cloud.securitycenter.v1.SecurityMarksOrBuilder>( - getSecurityMarks(), - getParentForChildren(), - isClean()); - securityMarks_ = null; - } - return securityMarksBuilder_; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; - /** - *
-     * The time at which the asset was created in Security Command Center.
-     * 
- * - * .google.protobuf.Timestamp create_time = 9; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * The time at which the asset was created in Security Command Center.
-     * 
- * - * .google.protobuf.Timestamp create_time = 9; - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - *
-     * The time at which the asset was created in Security Command Center.
-     * 
- * - * .google.protobuf.Timestamp create_time = 9; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The time at which the asset was created in Security Command Center.
-     * 
- * - * .google.protobuf.Timestamp create_time = 9; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The time at which the asset was created in Security Command Center.
-     * 
- * - * .google.protobuf.Timestamp create_time = 9; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The time at which the asset was created in Security Command Center.
-     * 
- * - * .google.protobuf.Timestamp create_time = 9; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * The time at which the asset was created in Security Command Center.
-     * 
- * - * .google.protobuf.Timestamp create_time = 9; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The time at which the asset was created in Security Command Center.
-     * 
- * - * .google.protobuf.Timestamp create_time = 9; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * The time at which the asset was created in Security Command Center.
-     * 
- * - * .google.protobuf.Timestamp create_time = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), - getParentForChildren(), - isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; - /** - *
-     * The time at which the asset was last updated or added in Cloud SCC.
-     * 
- * - * .google.protobuf.Timestamp update_time = 10; - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return updateTimeBuilder_ != null || updateTime_ != null; - } - /** - *
-     * The time at which the asset was last updated or added in Cloud SCC.
-     * 
- * - * .google.protobuf.Timestamp update_time = 10; - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - *
-     * The time at which the asset was last updated or added in Cloud SCC.
-     * 
- * - * .google.protobuf.Timestamp update_time = 10; - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - onChanged(); - } else { - updateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The time at which the asset was last updated or added in Cloud SCC.
-     * 
- * - * .google.protobuf.Timestamp update_time = 10; - */ - public Builder setUpdateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - onChanged(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The time at which the asset was last updated or added in Cloud SCC.
-     * 
- * - * .google.protobuf.Timestamp update_time = 10; - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (updateTime_ != null) { - updateTime_ = - com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); - } else { - updateTime_ = value; - } - onChanged(); - } else { - updateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The time at which the asset was last updated or added in Cloud SCC.
-     * 
- * - * .google.protobuf.Timestamp update_time = 10; - */ - public Builder clearUpdateTime() { - if (updateTimeBuilder_ == null) { - updateTime_ = null; - onChanged(); - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * The time at which the asset was last updated or added in Cloud SCC.
-     * 
- * - * .google.protobuf.Timestamp update_time = 10; - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The time at which the asset was last updated or added in Cloud SCC.
-     * 
- * - * .google.protobuf.Timestamp update_time = 10; - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - } - /** - *
-     * The time at which the asset was last updated or added in Cloud SCC.
-     * 
- * - * .google.protobuf.Timestamp update_time = 10; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), - getParentForChildren(), - isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private com.google.cloud.securitycenter.v1.Asset.IamPolicy iamPolicy_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Asset.IamPolicy, com.google.cloud.securitycenter.v1.Asset.IamPolicy.Builder, com.google.cloud.securitycenter.v1.Asset.IamPolicyOrBuilder> iamPolicyBuilder_; - /** - *
-     * Cloud IAM Policy information associated with the Google Cloud resource
-     * described by the Security Command Center asset. This information is managed
-     * and defined by the Google Cloud resource and cannot be modified by the
-     * user.
-     * 
- * - * .google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11; - * @return Whether the iamPolicy field is set. - */ - public boolean hasIamPolicy() { - return iamPolicyBuilder_ != null || iamPolicy_ != null; - } - /** - *
-     * Cloud IAM Policy information associated with the Google Cloud resource
-     * described by the Security Command Center asset. This information is managed
-     * and defined by the Google Cloud resource and cannot be modified by the
-     * user.
-     * 
- * - * .google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11; - * @return The iamPolicy. - */ - public com.google.cloud.securitycenter.v1.Asset.IamPolicy getIamPolicy() { - if (iamPolicyBuilder_ == null) { - return iamPolicy_ == null ? com.google.cloud.securitycenter.v1.Asset.IamPolicy.getDefaultInstance() : iamPolicy_; - } else { - return iamPolicyBuilder_.getMessage(); - } - } - /** - *
-     * Cloud IAM Policy information associated with the Google Cloud resource
-     * described by the Security Command Center asset. This information is managed
-     * and defined by the Google Cloud resource and cannot be modified by the
-     * user.
-     * 
- * - * .google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11; - */ - public Builder setIamPolicy(com.google.cloud.securitycenter.v1.Asset.IamPolicy value) { - if (iamPolicyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - iamPolicy_ = value; - onChanged(); - } else { - iamPolicyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Cloud IAM Policy information associated with the Google Cloud resource
-     * described by the Security Command Center asset. This information is managed
-     * and defined by the Google Cloud resource and cannot be modified by the
-     * user.
-     * 
- * - * .google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11; - */ - public Builder setIamPolicy( - com.google.cloud.securitycenter.v1.Asset.IamPolicy.Builder builderForValue) { - if (iamPolicyBuilder_ == null) { - iamPolicy_ = builderForValue.build(); - onChanged(); - } else { - iamPolicyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Cloud IAM Policy information associated with the Google Cloud resource
-     * described by the Security Command Center asset. This information is managed
-     * and defined by the Google Cloud resource and cannot be modified by the
-     * user.
-     * 
- * - * .google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11; - */ - public Builder mergeIamPolicy(com.google.cloud.securitycenter.v1.Asset.IamPolicy value) { - if (iamPolicyBuilder_ == null) { - if (iamPolicy_ != null) { - iamPolicy_ = - com.google.cloud.securitycenter.v1.Asset.IamPolicy.newBuilder(iamPolicy_).mergeFrom(value).buildPartial(); - } else { - iamPolicy_ = value; - } - onChanged(); - } else { - iamPolicyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Cloud IAM Policy information associated with the Google Cloud resource
-     * described by the Security Command Center asset. This information is managed
-     * and defined by the Google Cloud resource and cannot be modified by the
-     * user.
-     * 
- * - * .google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11; - */ - public Builder clearIamPolicy() { - if (iamPolicyBuilder_ == null) { - iamPolicy_ = null; - onChanged(); - } else { - iamPolicy_ = null; - iamPolicyBuilder_ = null; - } - - return this; - } - /** - *
-     * Cloud IAM Policy information associated with the Google Cloud resource
-     * described by the Security Command Center asset. This information is managed
-     * and defined by the Google Cloud resource and cannot be modified by the
-     * user.
-     * 
- * - * .google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11; - */ - public com.google.cloud.securitycenter.v1.Asset.IamPolicy.Builder getIamPolicyBuilder() { - - onChanged(); - return getIamPolicyFieldBuilder().getBuilder(); - } - /** - *
-     * Cloud IAM Policy information associated with the Google Cloud resource
-     * described by the Security Command Center asset. This information is managed
-     * and defined by the Google Cloud resource and cannot be modified by the
-     * user.
-     * 
- * - * .google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11; - */ - public com.google.cloud.securitycenter.v1.Asset.IamPolicyOrBuilder getIamPolicyOrBuilder() { - if (iamPolicyBuilder_ != null) { - return iamPolicyBuilder_.getMessageOrBuilder(); - } else { - return iamPolicy_ == null ? - com.google.cloud.securitycenter.v1.Asset.IamPolicy.getDefaultInstance() : iamPolicy_; - } - } - /** - *
-     * Cloud IAM Policy information associated with the Google Cloud resource
-     * described by the Security Command Center asset. This information is managed
-     * and defined by the Google Cloud resource and cannot be modified by the
-     * user.
-     * 
- * - * .google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Asset.IamPolicy, com.google.cloud.securitycenter.v1.Asset.IamPolicy.Builder, com.google.cloud.securitycenter.v1.Asset.IamPolicyOrBuilder> - getIamPolicyFieldBuilder() { - if (iamPolicyBuilder_ == null) { - iamPolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Asset.IamPolicy, com.google.cloud.securitycenter.v1.Asset.IamPolicy.Builder, com.google.cloud.securitycenter.v1.Asset.IamPolicyOrBuilder>( - getIamPolicy(), - getParentForChildren(), - isClean()); - iamPolicy_ = null; - } - return iamPolicyBuilder_; - } - - private java.lang.Object canonicalName_ = ""; - /** - *
-     * The canonical name of the resource. It's either
-     * "organizations/{organization_id}/assets/{asset_id}",
-     * "folders/{folder_id}/assets/{asset_id}" or
-     * "projects/{project_number}/assets/{asset_id}", depending on the closest CRM
-     * ancestor of the resource.
-     * 
- * - * string canonical_name = 13; - * @return The canonicalName. - */ - public java.lang.String getCanonicalName() { - java.lang.Object ref = canonicalName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - canonicalName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The canonical name of the resource. It's either
-     * "organizations/{organization_id}/assets/{asset_id}",
-     * "folders/{folder_id}/assets/{asset_id}" or
-     * "projects/{project_number}/assets/{asset_id}", depending on the closest CRM
-     * ancestor of the resource.
-     * 
- * - * string canonical_name = 13; - * @return The bytes for canonicalName. - */ - public com.google.protobuf.ByteString - getCanonicalNameBytes() { - java.lang.Object ref = canonicalName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - canonicalName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The canonical name of the resource. It's either
-     * "organizations/{organization_id}/assets/{asset_id}",
-     * "folders/{folder_id}/assets/{asset_id}" or
-     * "projects/{project_number}/assets/{asset_id}", depending on the closest CRM
-     * ancestor of the resource.
-     * 
- * - * string canonical_name = 13; - * @param value The canonicalName to set. - * @return This builder for chaining. - */ - public Builder setCanonicalName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - canonicalName_ = value; - onChanged(); - return this; - } - /** - *
-     * The canonical name of the resource. It's either
-     * "organizations/{organization_id}/assets/{asset_id}",
-     * "folders/{folder_id}/assets/{asset_id}" or
-     * "projects/{project_number}/assets/{asset_id}", depending on the closest CRM
-     * ancestor of the resource.
-     * 
- * - * string canonical_name = 13; - * @return This builder for chaining. - */ - public Builder clearCanonicalName() { - - canonicalName_ = getDefaultInstance().getCanonicalName(); - onChanged(); - return this; - } - /** - *
-     * The canonical name of the resource. It's either
-     * "organizations/{organization_id}/assets/{asset_id}",
-     * "folders/{folder_id}/assets/{asset_id}" or
-     * "projects/{project_number}/assets/{asset_id}", depending on the closest CRM
-     * ancestor of the resource.
-     * 
- * - * string canonical_name = 13; - * @param value The bytes for canonicalName to set. - * @return This builder for chaining. - */ - public Builder setCanonicalNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - canonicalName_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Asset) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Asset) - private static final com.google.cloud.securitycenter.v1.Asset DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Asset(); - } - - public static com.google.cloud.securitycenter.v1.Asset getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Asset parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Asset(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Asset getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AssetName.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AssetName.java deleted file mode 100644 index 61382712af96..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AssetName.java +++ /dev/null @@ -1,364 +0,0 @@ -/* - * Copyright 2022 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; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class AssetName implements ResourceName { - private static final PathTemplate ORGANIZATION_ASSET = - PathTemplate.createWithoutUrlEncoding("organizations/{organization}/assets/{asset}"); - private static final PathTemplate FOLDER_ASSET = - PathTemplate.createWithoutUrlEncoding("folders/{folder}/assets/{asset}"); - private static final PathTemplate PROJECT_ASSET = - PathTemplate.createWithoutUrlEncoding("projects/{project}/assets/{asset}"); - private volatile Map fieldValuesMap; - private PathTemplate pathTemplate; - private String fixedValue; - private final String organization; - private final String asset; - private final String folder; - private final String project; - - @Deprecated - protected AssetName() { - organization = null; - asset = null; - folder = null; - project = null; - } - - private AssetName(Builder builder) { - organization = Preconditions.checkNotNull(builder.getOrganization()); - asset = Preconditions.checkNotNull(builder.getAsset()); - folder = null; - project = null; - pathTemplate = ORGANIZATION_ASSET; - } - - private AssetName(FolderAssetBuilder builder) { - folder = Preconditions.checkNotNull(builder.getFolder()); - asset = Preconditions.checkNotNull(builder.getAsset()); - organization = null; - project = null; - pathTemplate = FOLDER_ASSET; - } - - private AssetName(ProjectAssetBuilder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - asset = Preconditions.checkNotNull(builder.getAsset()); - organization = null; - folder = null; - pathTemplate = PROJECT_ASSET; - } - - public String getOrganization() { - return organization; - } - - public String getAsset() { - return asset; - } - - public String getFolder() { - return folder; - } - - public String getProject() { - return project; - } - - 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 FolderAssetBuilder newFolderAssetBuilder() { - return new FolderAssetBuilder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static ProjectAssetBuilder newProjectAssetBuilder() { - return new ProjectAssetBuilder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static AssetName of(String organization, String asset) { - return newBuilder().setOrganization(organization).setAsset(asset).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static AssetName ofOrganizationAssetName(String organization, String asset) { - return newBuilder().setOrganization(organization).setAsset(asset).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static AssetName ofFolderAssetName(String folder, String asset) { - return newFolderAssetBuilder().setFolder(folder).setAsset(asset).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static AssetName ofProjectAssetName(String project, String asset) { - return newProjectAssetBuilder().setProject(project).setAsset(asset).build(); - } - - 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 formatFolderAssetName(String folder, String asset) { - return newFolderAssetBuilder().setFolder(folder).setAsset(asset).build().toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatProjectAssetName(String project, String asset) { - return newProjectAssetBuilder().setProject(project).setAsset(asset).build().toString(); - } - - public static AssetName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - if (ORGANIZATION_ASSET.matches(formattedString)) { - Map matchMap = ORGANIZATION_ASSET.match(formattedString); - return ofOrganizationAssetName(matchMap.get("organization"), matchMap.get("asset")); - } else if (FOLDER_ASSET.matches(formattedString)) { - Map matchMap = FOLDER_ASSET.match(formattedString); - return ofFolderAssetName(matchMap.get("folder"), matchMap.get("asset")); - } else if (PROJECT_ASSET.matches(formattedString)) { - Map matchMap = PROJECT_ASSET.match(formattedString); - return ofProjectAssetName(matchMap.get("project"), matchMap.get("asset")); - } - throw new ValidationException("AssetName.parse: formattedString not in valid format"); - } - - 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 (AssetName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return ORGANIZATION_ASSET.matches(formattedString) - || FOLDER_ASSET.matches(formattedString) - || PROJECT_ASSET.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 (folder != null) { - fieldMapBuilder.put("folder", folder); - } - if (project != null) { - fieldMapBuilder.put("project", project); - } - 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()); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - AssetName that = ((AssetName) o); - return Objects.equals(this.organization, that.organization) - && Objects.equals(this.asset, that.asset) - && Objects.equals(this.folder, that.folder) - && Objects.equals(this.project, that.project); - } - 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(folder); - h *= 1000003; - h ^= Objects.hashCode(project); - return h; - } - - /** Builder for organizations/{organization}/assets/{asset}. */ - 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(AssetName assetName) { - Preconditions.checkArgument( - Objects.equals(assetName.pathTemplate, ORGANIZATION_ASSET), - "toBuilder is only supported when AssetName has the pattern of organizations/{organization}/assets/{asset}"); - this.organization = assetName.organization; - this.asset = assetName.asset; - } - - public AssetName build() { - return new AssetName(this); - } - } - - /** Builder for folders/{folder}/assets/{asset}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class FolderAssetBuilder { - private String folder; - private String asset; - - protected FolderAssetBuilder() {} - - public String getFolder() { - return folder; - } - - public String getAsset() { - return asset; - } - - public FolderAssetBuilder setFolder(String folder) { - this.folder = folder; - return this; - } - - public FolderAssetBuilder setAsset(String asset) { - this.asset = asset; - return this; - } - - public AssetName build() { - return new AssetName(this); - } - } - - /** Builder for projects/{project}/assets/{asset}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class ProjectAssetBuilder { - private String project; - private String asset; - - protected ProjectAssetBuilder() {} - - public String getProject() { - return project; - } - - public String getAsset() { - return asset; - } - - public ProjectAssetBuilder setProject(String project) { - this.project = project; - return this; - } - - public ProjectAssetBuilder setAsset(String asset) { - this.asset = asset; - return this; - } - - public AssetName build() { - return new AssetName(this); - } - } -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AssetOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AssetOrBuilder.java deleted file mode 100644 index 44eb8b021349..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AssetOrBuilder.java +++ /dev/null @@ -1,274 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/asset.proto - -package com.google.cloud.securitycenter.v1; - -public interface AssetOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Asset) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The relative resource name of this asset. See:
-   * https://cloud.google.com/apis/design/resource_names#relative_resource_name
-   * Example:
-   * "organizations/{organization_id}/assets/{asset_id}".
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The relative resource name of this asset. See:
-   * https://cloud.google.com/apis/design/resource_names#relative_resource_name
-   * Example:
-   * "organizations/{organization_id}/assets/{asset_id}".
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Security Command Center managed properties. These properties are managed by
-   * Security Command Center and cannot be modified by the user.
-   * 
- * - * .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2; - * @return Whether the securityCenterProperties field is set. - */ - boolean hasSecurityCenterProperties(); - /** - *
-   * Security Command Center managed properties. These properties are managed by
-   * Security Command Center and cannot be modified by the user.
-   * 
- * - * .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2; - * @return The securityCenterProperties. - */ - com.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties getSecurityCenterProperties(); - /** - *
-   * Security Command Center managed properties. These properties are managed by
-   * Security Command Center and cannot be modified by the user.
-   * 
- * - * .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2; - */ - com.google.cloud.securitycenter.v1.Asset.SecurityCenterPropertiesOrBuilder getSecurityCenterPropertiesOrBuilder(); - - /** - *
-   * Resource managed properties. These properties are managed and defined by
-   * the Google Cloud resource and cannot be modified by the user.
-   * 
- * - * map<string, .google.protobuf.Value> resource_properties = 7; - */ - int getResourcePropertiesCount(); - /** - *
-   * Resource managed properties. These properties are managed and defined by
-   * the Google Cloud resource and cannot be modified by the user.
-   * 
- * - * map<string, .google.protobuf.Value> resource_properties = 7; - */ - boolean containsResourceProperties( - java.lang.String key); - /** - * Use {@link #getResourcePropertiesMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getResourceProperties(); - /** - *
-   * Resource managed properties. These properties are managed and defined by
-   * the Google Cloud resource and cannot be modified by the user.
-   * 
- * - * map<string, .google.protobuf.Value> resource_properties = 7; - */ - java.util.Map - getResourcePropertiesMap(); - /** - *
-   * Resource managed properties. These properties are managed and defined by
-   * the Google Cloud resource and cannot be modified by the user.
-   * 
- * - * map<string, .google.protobuf.Value> resource_properties = 7; - */ - - /* nullable */ -com.google.protobuf.Value getResourcePropertiesOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Value defaultValue); - /** - *
-   * Resource managed properties. These properties are managed and defined by
-   * the Google Cloud resource and cannot be modified by the user.
-   * 
- * - * map<string, .google.protobuf.Value> resource_properties = 7; - */ - - com.google.protobuf.Value getResourcePropertiesOrThrow( - java.lang.String key); - - /** - *
-   * User specified security marks. These marks are entirely managed by the user
-   * and come from the SecurityMarks resource that belongs to the asset.
-   * 
- * - * .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8; - * @return Whether the securityMarks field is set. - */ - boolean hasSecurityMarks(); - /** - *
-   * User specified security marks. These marks are entirely managed by the user
-   * and come from the SecurityMarks resource that belongs to the asset.
-   * 
- * - * .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8; - * @return The securityMarks. - */ - com.google.cloud.securitycenter.v1.SecurityMarks getSecurityMarks(); - /** - *
-   * User specified security marks. These marks are entirely managed by the user
-   * and come from the SecurityMarks resource that belongs to the asset.
-   * 
- * - * .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8; - */ - com.google.cloud.securitycenter.v1.SecurityMarksOrBuilder getSecurityMarksOrBuilder(); - - /** - *
-   * The time at which the asset was created in Security Command Center.
-   * 
- * - * .google.protobuf.Timestamp create_time = 9; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * The time at which the asset was created in Security Command Center.
-   * 
- * - * .google.protobuf.Timestamp create_time = 9; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * The time at which the asset was created in Security Command Center.
-   * 
- * - * .google.protobuf.Timestamp create_time = 9; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * The time at which the asset was last updated or added in Cloud SCC.
-   * 
- * - * .google.protobuf.Timestamp update_time = 10; - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - *
-   * The time at which the asset was last updated or added in Cloud SCC.
-   * 
- * - * .google.protobuf.Timestamp update_time = 10; - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - *
-   * The time at which the asset was last updated or added in Cloud SCC.
-   * 
- * - * .google.protobuf.Timestamp update_time = 10; - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - *
-   * Cloud IAM Policy information associated with the Google Cloud resource
-   * described by the Security Command Center asset. This information is managed
-   * and defined by the Google Cloud resource and cannot be modified by the
-   * user.
-   * 
- * - * .google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11; - * @return Whether the iamPolicy field is set. - */ - boolean hasIamPolicy(); - /** - *
-   * Cloud IAM Policy information associated with the Google Cloud resource
-   * described by the Security Command Center asset. This information is managed
-   * and defined by the Google Cloud resource and cannot be modified by the
-   * user.
-   * 
- * - * .google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11; - * @return The iamPolicy. - */ - com.google.cloud.securitycenter.v1.Asset.IamPolicy getIamPolicy(); - /** - *
-   * Cloud IAM Policy information associated with the Google Cloud resource
-   * described by the Security Command Center asset. This information is managed
-   * and defined by the Google Cloud resource and cannot be modified by the
-   * user.
-   * 
- * - * .google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11; - */ - com.google.cloud.securitycenter.v1.Asset.IamPolicyOrBuilder getIamPolicyOrBuilder(); - - /** - *
-   * The canonical name of the resource. It's either
-   * "organizations/{organization_id}/assets/{asset_id}",
-   * "folders/{folder_id}/assets/{asset_id}" or
-   * "projects/{project_number}/assets/{asset_id}", depending on the closest CRM
-   * ancestor of the resource.
-   * 
- * - * string canonical_name = 13; - * @return The canonicalName. - */ - java.lang.String getCanonicalName(); - /** - *
-   * The canonical name of the resource. It's either
-   * "organizations/{organization_id}/assets/{asset_id}",
-   * "folders/{folder_id}/assets/{asset_id}" or
-   * "projects/{project_number}/assets/{asset_id}", depending on the closest CRM
-   * ancestor of the resource.
-   * 
- * - * string canonical_name = 13; - * @return The bytes for canonicalName. - */ - com.google.protobuf.ByteString - getCanonicalNameBytes(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AssetOuterClass.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AssetOuterClass.java deleted file mode 100644 index 8a04ca03c74a..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AssetOuterClass.java +++ /dev/null @@ -1,133 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/asset.proto - -package com.google.cloud.securitycenter.v1; - -public final class AssetOuterClass { - private AssetOuterClass() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_Asset_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_Asset_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_Asset_SecurityCenterProperties_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_Asset_SecurityCenterProperties_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_Asset_IamPolicy_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_Asset_IamPolicy_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_Asset_ResourcePropertiesEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_Asset_ResourcePropertiesEntry_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n*google/cloud/securitycenter/v1/asset.p" + - "roto\022\036google.cloud.securitycenter.v1\032\031go" + - "ogle/api/resource.proto\032+google/cloud/se" + - "curitycenter/v1/folder.proto\0323google/clo" + - "ud/securitycenter/v1/security_marks.prot" + - "o\032\034google/protobuf/struct.proto\032\037google/" + - "protobuf/timestamp.proto\"\251\010\n\005Asset\022\014\n\004na" + - "me\030\001 \001(\t\022b\n\032security_center_properties\030\002" + - " \001(\0132>.google.cloud.securitycenter.v1.As" + - "set.SecurityCenterProperties\022Z\n\023resource" + - "_properties\030\007 \003(\0132=.google.cloud.securit" + - "ycenter.v1.Asset.ResourcePropertiesEntry" + - "\022E\n\016security_marks\030\010 \001(\0132-.google.cloud." + - "securitycenter.v1.SecurityMarks\022/\n\013creat" + - "e_time\030\t \001(\0132\032.google.protobuf.Timestamp" + - "\022/\n\013update_time\030\n \001(\0132\032.google.protobuf." + - "Timestamp\022C\n\niam_policy\030\013 \001(\0132/.google.c" + - "loud.securitycenter.v1.Asset.IamPolicy\022\026" + - "\n\016canonical_name\030\r \001(\t\032\271\002\n\030SecurityCente" + - "rProperties\022\025\n\rresource_name\030\001 \001(\t\022\025\n\rre" + - "source_type\030\002 \001(\t\022\027\n\017resource_parent\030\003 \001" + - "(\t\022\030\n\020resource_project\030\004 \001(\t\022\027\n\017resource" + - "_owners\030\005 \003(\t\022\035\n\025resource_display_name\030\006" + - " \001(\t\022$\n\034resource_parent_display_name\030\007 \001" + - "(\t\022%\n\035resource_project_display_name\030\010 \001(" + - "\t\0227\n\007folders\030\n \003(\0132&.google.cloud.securi" + - "tycenter.v1.Folder\032 \n\tIamPolicy\022\023\n\013polic" + - "y_blob\030\001 \001(\t\032Q\n\027ResourcePropertiesEntry\022" + - "\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.google.pro" + - "tobuf.Value:\0028\001:\232\001\352A\226\001\n#securitycenter.g" + - "oogleapis.com/Asset\022+organizations/{orga" + - "nization}/assets/{asset}\022\037folders/{folde" + - "r}/assets/{asset}\022!projects/{project}/as" + - "sets/{asset}B\332\001\n\"com.google.cloud.securi" + - "tycenter.v1P\001ZLgoogle.golang.org/genprot" + - "o/googleapis/cloud/securitycenter/v1;sec" + - "uritycenter\252\002\036Google.Cloud.SecurityCente" + - "r.V1\312\002\036Google\\Cloud\\SecurityCenter\\V1\352\002!" + - "Google::Cloud::SecurityCenter::V1b\006proto" + - "3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.ResourceProto.getDescriptor(), - com.google.cloud.securitycenter.v1.FolderProto.getDescriptor(), - com.google.cloud.securitycenter.v1.SecurityMarksOuterClass.getDescriptor(), - com.google.protobuf.StructProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_securitycenter_v1_Asset_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_securitycenter_v1_Asset_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_Asset_descriptor, - new java.lang.String[] { "Name", "SecurityCenterProperties", "ResourceProperties", "SecurityMarks", "CreateTime", "UpdateTime", "IamPolicy", "CanonicalName", }); - internal_static_google_cloud_securitycenter_v1_Asset_SecurityCenterProperties_descriptor = - internal_static_google_cloud_securitycenter_v1_Asset_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_securitycenter_v1_Asset_SecurityCenterProperties_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_Asset_SecurityCenterProperties_descriptor, - new java.lang.String[] { "ResourceName", "ResourceType", "ResourceParent", "ResourceProject", "ResourceOwners", "ResourceDisplayName", "ResourceParentDisplayName", "ResourceProjectDisplayName", "Folders", }); - internal_static_google_cloud_securitycenter_v1_Asset_IamPolicy_descriptor = - internal_static_google_cloud_securitycenter_v1_Asset_descriptor.getNestedTypes().get(1); - internal_static_google_cloud_securitycenter_v1_Asset_IamPolicy_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_Asset_IamPolicy_descriptor, - new java.lang.String[] { "PolicyBlob", }); - internal_static_google_cloud_securitycenter_v1_Asset_ResourcePropertiesEntry_descriptor = - internal_static_google_cloud_securitycenter_v1_Asset_descriptor.getNestedTypes().get(2); - internal_static_google_cloud_securitycenter_v1_Asset_ResourcePropertiesEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_Asset_ResourcePropertiesEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ResourceProto.resource); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.ResourceProto.getDescriptor(); - com.google.cloud.securitycenter.v1.FolderProto.getDescriptor(); - com.google.cloud.securitycenter.v1.SecurityMarksOuterClass.getDescriptor(); - com.google.protobuf.StructProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BigQueryExport.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BigQueryExport.java deleted file mode 100644 index 5c12c3805a47..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BigQueryExport.java +++ /dev/null @@ -1,2134 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/bigquery_export.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Configures how to deliver Findings to BigQuery Instance.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.BigQueryExport} - */ -public final class BigQueryExport extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.BigQueryExport) - BigQueryExportOrBuilder { -private static final long serialVersionUID = 0L; - // Use BigQueryExport.newBuilder() to construct. - private BigQueryExport(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BigQueryExport() { - name_ = ""; - description_ = ""; - filter_ = ""; - dataset_ = ""; - mostRecentEditor_ = ""; - principal_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BigQueryExport(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BigQueryExport( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - dataset_ = s; - break; - } - case 42: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 50: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 58: { - java.lang.String s = input.readStringRequireUtf8(); - - mostRecentEditor_ = s; - break; - } - case 66: { - java.lang.String s = input.readStringRequireUtf8(); - - principal_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.BigQueryExportProto.internal_static_google_cloud_securitycenter_v1_BigQueryExport_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.BigQueryExportProto.internal_static_google_cloud_securitycenter_v1_BigQueryExport_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.BigQueryExport.class, com.google.cloud.securitycenter.v1.BigQueryExport.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * The relative resource name of this export. See:
-   * https://cloud.google.com/apis/design/resource_names#relative_resource_name.
-   * Example format:
-   * "organizations/{organization_id}/bigQueryExports/{export_id}" Example
-   * format: "folders/{folder_id}/bigQueryExports/{export_id}" Example format:
-   * "projects/{project_id}/bigQueryExports/{export_id}"
-   * This field is provided in responses, and is ignored when provided in create
-   * requests.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The relative resource name of this export. See:
-   * https://cloud.google.com/apis/design/resource_names#relative_resource_name.
-   * Example format:
-   * "organizations/{organization_id}/bigQueryExports/{export_id}" Example
-   * format: "folders/{folder_id}/bigQueryExports/{export_id}" Example format:
-   * "projects/{project_id}/bigQueryExports/{export_id}"
-   * This field is provided in responses, and is ignored when provided in create
-   * requests.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 2; - private volatile java.lang.Object description_; - /** - *
-   * The description of the export (max of 1024 characters).
-   * 
- * - * string description = 2; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * The description of the export (max of 1024 characters).
-   * 
- * - * string description = 2; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 3; - private volatile java.lang.Object filter_; - /** - *
-   * Expression that defines the filter to apply across create/update events
-   * of findings. The expression is a list of zero or more restrictions combined
-   * via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
-   * has higher precedence than `AND`.
-   * Restrictions have the form `<field> <operator> <value>` and may have a
-   * `-` character in front of them to indicate negation. The fields map to
-   * those defined in the corresponding resource.
-   * The supported operators are:
-   * * `=` for all value types.
-   * * `>`, `<`, `>=`, `<=` for integer values.
-   * * `:`, meaning substring matching, for strings.
-   * The supported value types are:
-   * * string literals in quotes.
-   * * integer literals without quotes.
-   * * boolean literals `true` and `false` without quotes.
-   * 
- * - * string filter = 3; - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - *
-   * Expression that defines the filter to apply across create/update events
-   * of findings. The expression is a list of zero or more restrictions combined
-   * via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
-   * has higher precedence than `AND`.
-   * Restrictions have the form `<field> <operator> <value>` and may have a
-   * `-` character in front of them to indicate negation. The fields map to
-   * those defined in the corresponding resource.
-   * The supported operators are:
-   * * `=` for all value types.
-   * * `>`, `<`, `>=`, `<=` for integer values.
-   * * `:`, meaning substring matching, for strings.
-   * The supported value types are:
-   * * string literals in quotes.
-   * * integer literals without quotes.
-   * * boolean literals `true` and `false` without quotes.
-   * 
- * - * string filter = 3; - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DATASET_FIELD_NUMBER = 4; - private volatile java.lang.Object dataset_; - /** - *
-   * The dataset to write findings' updates to. Its format is
-   * "projects/[project_id]/datasets/[bigquery_dataset_id]".
-   * BigQuery Dataset unique ID  must contain only letters (a-z, A-Z), numbers
-   * (0-9), or underscores (_).
-   * 
- * - * string dataset = 4; - * @return The dataset. - */ - @java.lang.Override - public java.lang.String getDataset() { - java.lang.Object ref = dataset_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dataset_ = s; - return s; - } - } - /** - *
-   * The dataset to write findings' updates to. Its format is
-   * "projects/[project_id]/datasets/[bigquery_dataset_id]".
-   * BigQuery Dataset unique ID  must contain only letters (a-z, A-Z), numbers
-   * (0-9), or underscores (_).
-   * 
- * - * string dataset = 4; - * @return The bytes for dataset. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDatasetBytes() { - java.lang.Object ref = dataset_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - dataset_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 5; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * Output only. The time at which the big query export was created.
-   * This field is set by the server and will be ignored if provided on export
-   * on creation.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * Output only. The time at which the big query export was created.
-   * This field is set by the server and will be ignored if provided on export
-   * on creation.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * Output only. The time at which the big query export was created.
-   * This field is set by the server and will be ignored if provided on export
-   * on creation.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 6; - private com.google.protobuf.Timestamp updateTime_; - /** - *
-   * Output only. The most recent time at which the big export was updated.
-   * This field is set by the server and will be ignored if provided on export
-   * creation or update.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - *
-   * Output only. The most recent time at which the big export was updated.
-   * This field is set by the server and will be ignored if provided on export
-   * creation or update.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - *
-   * Output only. The most recent time at which the big export was updated.
-   * This field is set by the server and will be ignored if provided on export
-   * creation or update.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return getUpdateTime(); - } - - public static final int MOST_RECENT_EDITOR_FIELD_NUMBER = 7; - private volatile java.lang.Object mostRecentEditor_; - /** - *
-   * Output only. Email address of the user who last edited the big query export.
-   * This field is set by the server and will be ignored if provided on export
-   * creation or update.
-   * 
- * - * string most_recent_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The mostRecentEditor. - */ - @java.lang.Override - public java.lang.String getMostRecentEditor() { - java.lang.Object ref = mostRecentEditor_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mostRecentEditor_ = s; - return s; - } - } - /** - *
-   * Output only. Email address of the user who last edited the big query export.
-   * This field is set by the server and will be ignored if provided on export
-   * creation or update.
-   * 
- * - * string most_recent_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for mostRecentEditor. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMostRecentEditorBytes() { - java.lang.Object ref = mostRecentEditor_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mostRecentEditor_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PRINCIPAL_FIELD_NUMBER = 8; - private volatile java.lang.Object principal_; - /** - *
-   * Output only. The service account that needs permission to create table, upload data to
-   * the big query dataset.
-   * 
- * - * string principal = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The principal. - */ - @java.lang.Override - public java.lang.String getPrincipal() { - java.lang.Object ref = principal_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - principal_ = s; - return s; - } - } - /** - *
-   * Output only. The service account that needs permission to create table, upload data to
-   * the big query dataset.
-   * 
- * - * string principal = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for principal. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPrincipalBytes() { - java.lang.Object ref = principal_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - principal_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataset_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, dataset_); - } - if (createTime_ != null) { - output.writeMessage(5, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(6, getUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mostRecentEditor_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, mostRecentEditor_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principal_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, principal_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataset_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, dataset_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mostRecentEditor_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, mostRecentEditor_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principal_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, principal_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.BigQueryExport)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.BigQueryExport other = (com.google.cloud.securitycenter.v1.BigQueryExport) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!getFilter() - .equals(other.getFilter())) return false; - if (!getDataset() - .equals(other.getDataset())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime() - .equals(other.getUpdateTime())) return false; - } - if (!getMostRecentEditor() - .equals(other.getMostRecentEditor())) return false; - if (!getPrincipal() - .equals(other.getPrincipal())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + DATASET_FIELD_NUMBER; - hash = (53 * hash) + getDataset().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - hash = (37 * hash) + MOST_RECENT_EDITOR_FIELD_NUMBER; - hash = (53 * hash) + getMostRecentEditor().hashCode(); - hash = (37 * hash) + PRINCIPAL_FIELD_NUMBER; - hash = (53 * hash) + getPrincipal().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.BigQueryExport parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.BigQueryExport parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.BigQueryExport parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.BigQueryExport parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.BigQueryExport parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.BigQueryExport parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.BigQueryExport parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.BigQueryExport parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.BigQueryExport parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.BigQueryExport parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.BigQueryExport parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.BigQueryExport parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.BigQueryExport prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Configures how to deliver Findings to BigQuery Instance.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.BigQueryExport} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.BigQueryExport) - com.google.cloud.securitycenter.v1.BigQueryExportOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.BigQueryExportProto.internal_static_google_cloud_securitycenter_v1_BigQueryExport_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.BigQueryExportProto.internal_static_google_cloud_securitycenter_v1_BigQueryExport_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.BigQueryExport.class, com.google.cloud.securitycenter.v1.BigQueryExport.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.BigQueryExport.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - description_ = ""; - - filter_ = ""; - - dataset_ = ""; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (updateTimeBuilder_ == null) { - updateTime_ = null; - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - mostRecentEditor_ = ""; - - principal_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.BigQueryExportProto.internal_static_google_cloud_securitycenter_v1_BigQueryExport_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.BigQueryExport getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.BigQueryExport.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.BigQueryExport build() { - com.google.cloud.securitycenter.v1.BigQueryExport result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.BigQueryExport buildPartial() { - com.google.cloud.securitycenter.v1.BigQueryExport result = new com.google.cloud.securitycenter.v1.BigQueryExport(this); - result.name_ = name_; - result.description_ = description_; - result.filter_ = filter_; - result.dataset_ = dataset_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (updateTimeBuilder_ == null) { - result.updateTime_ = updateTime_; - } else { - result.updateTime_ = updateTimeBuilder_.build(); - } - result.mostRecentEditor_ = mostRecentEditor_; - result.principal_ = principal_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.BigQueryExport) { - return mergeFrom((com.google.cloud.securitycenter.v1.BigQueryExport)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.BigQueryExport other) { - if (other == com.google.cloud.securitycenter.v1.BigQueryExport.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - onChanged(); - } - if (!other.getDataset().isEmpty()) { - dataset_ = other.dataset_; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (!other.getMostRecentEditor().isEmpty()) { - mostRecentEditor_ = other.mostRecentEditor_; - onChanged(); - } - if (!other.getPrincipal().isEmpty()) { - principal_ = other.principal_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.BigQueryExport parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.BigQueryExport) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * The relative resource name of this export. See:
-     * https://cloud.google.com/apis/design/resource_names#relative_resource_name.
-     * Example format:
-     * "organizations/{organization_id}/bigQueryExports/{export_id}" Example
-     * format: "folders/{folder_id}/bigQueryExports/{export_id}" Example format:
-     * "projects/{project_id}/bigQueryExports/{export_id}"
-     * This field is provided in responses, and is ignored when provided in create
-     * requests.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The relative resource name of this export. See:
-     * https://cloud.google.com/apis/design/resource_names#relative_resource_name.
-     * Example format:
-     * "organizations/{organization_id}/bigQueryExports/{export_id}" Example
-     * format: "folders/{folder_id}/bigQueryExports/{export_id}" Example format:
-     * "projects/{project_id}/bigQueryExports/{export_id}"
-     * This field is provided in responses, and is ignored when provided in create
-     * requests.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The relative resource name of this export. See:
-     * https://cloud.google.com/apis/design/resource_names#relative_resource_name.
-     * Example format:
-     * "organizations/{organization_id}/bigQueryExports/{export_id}" Example
-     * format: "folders/{folder_id}/bigQueryExports/{export_id}" Example format:
-     * "projects/{project_id}/bigQueryExports/{export_id}"
-     * This field is provided in responses, and is ignored when provided in create
-     * requests.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * The relative resource name of this export. See:
-     * https://cloud.google.com/apis/design/resource_names#relative_resource_name.
-     * Example format:
-     * "organizations/{organization_id}/bigQueryExports/{export_id}" Example
-     * format: "folders/{folder_id}/bigQueryExports/{export_id}" Example format:
-     * "projects/{project_id}/bigQueryExports/{export_id}"
-     * This field is provided in responses, and is ignored when provided in create
-     * requests.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * The relative resource name of this export. See:
-     * https://cloud.google.com/apis/design/resource_names#relative_resource_name.
-     * Example format:
-     * "organizations/{organization_id}/bigQueryExports/{export_id}" Example
-     * format: "folders/{folder_id}/bigQueryExports/{export_id}" Example format:
-     * "projects/{project_id}/bigQueryExports/{export_id}"
-     * This field is provided in responses, and is ignored when provided in create
-     * requests.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * The description of the export (max of 1024 characters).
-     * 
- * - * string description = 2; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The description of the export (max of 1024 characters).
-     * 
- * - * string description = 2; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The description of the export (max of 1024 characters).
-     * 
- * - * string description = 2; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - *
-     * The description of the export (max of 1024 characters).
-     * 
- * - * string description = 2; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-     * The description of the export (max of 1024 characters).
-     * 
- * - * string description = 2; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - *
-     * Expression that defines the filter to apply across create/update events
-     * of findings. The expression is a list of zero or more restrictions combined
-     * via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
-     * has higher precedence than `AND`.
-     * Restrictions have the form `<field> <operator> <value>` and may have a
-     * `-` character in front of them to indicate negation. The fields map to
-     * those defined in the corresponding resource.
-     * The supported operators are:
-     * * `=` for all value types.
-     * * `>`, `<`, `>=`, `<=` for integer values.
-     * * `:`, meaning substring matching, for strings.
-     * The supported value types are:
-     * * string literals in quotes.
-     * * integer literals without quotes.
-     * * boolean literals `true` and `false` without quotes.
-     * 
- * - * string filter = 3; - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Expression that defines the filter to apply across create/update events
-     * of findings. The expression is a list of zero or more restrictions combined
-     * via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
-     * has higher precedence than `AND`.
-     * Restrictions have the form `<field> <operator> <value>` and may have a
-     * `-` character in front of them to indicate negation. The fields map to
-     * those defined in the corresponding resource.
-     * The supported operators are:
-     * * `=` for all value types.
-     * * `>`, `<`, `>=`, `<=` for integer values.
-     * * `:`, meaning substring matching, for strings.
-     * The supported value types are:
-     * * string literals in quotes.
-     * * integer literals without quotes.
-     * * boolean literals `true` and `false` without quotes.
-     * 
- * - * string filter = 3; - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Expression that defines the filter to apply across create/update events
-     * of findings. The expression is a list of zero or more restrictions combined
-     * via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
-     * has higher precedence than `AND`.
-     * Restrictions have the form `<field> <operator> <value>` and may have a
-     * `-` character in front of them to indicate negation. The fields map to
-     * those defined in the corresponding resource.
-     * The supported operators are:
-     * * `=` for all value types.
-     * * `>`, `<`, `>=`, `<=` for integer values.
-     * * `:`, meaning substring matching, for strings.
-     * The supported value types are:
-     * * string literals in quotes.
-     * * integer literals without quotes.
-     * * boolean literals `true` and `false` without quotes.
-     * 
- * - * string filter = 3; - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - filter_ = value; - onChanged(); - return this; - } - /** - *
-     * Expression that defines the filter to apply across create/update events
-     * of findings. The expression is a list of zero or more restrictions combined
-     * via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
-     * has higher precedence than `AND`.
-     * Restrictions have the form `<field> <operator> <value>` and may have a
-     * `-` character in front of them to indicate negation. The fields map to
-     * those defined in the corresponding resource.
-     * The supported operators are:
-     * * `=` for all value types.
-     * * `>`, `<`, `>=`, `<=` for integer values.
-     * * `:`, meaning substring matching, for strings.
-     * The supported value types are:
-     * * string literals in quotes.
-     * * integer literals without quotes.
-     * * boolean literals `true` and `false` without quotes.
-     * 
- * - * string filter = 3; - * @return This builder for chaining. - */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - *
-     * Expression that defines the filter to apply across create/update events
-     * of findings. The expression is a list of zero or more restrictions combined
-     * via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
-     * has higher precedence than `AND`.
-     * Restrictions have the form `<field> <operator> <value>` and may have a
-     * `-` character in front of them to indicate negation. The fields map to
-     * those defined in the corresponding resource.
-     * The supported operators are:
-     * * `=` for all value types.
-     * * `>`, `<`, `>=`, `<=` for integer values.
-     * * `:`, meaning substring matching, for strings.
-     * The supported value types are:
-     * * string literals in quotes.
-     * * integer literals without quotes.
-     * * boolean literals `true` and `false` without quotes.
-     * 
- * - * string filter = 3; - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - filter_ = value; - onChanged(); - return this; - } - - private java.lang.Object dataset_ = ""; - /** - *
-     * The dataset to write findings' updates to. Its format is
-     * "projects/[project_id]/datasets/[bigquery_dataset_id]".
-     * BigQuery Dataset unique ID  must contain only letters (a-z, A-Z), numbers
-     * (0-9), or underscores (_).
-     * 
- * - * string dataset = 4; - * @return The dataset. - */ - public java.lang.String getDataset() { - java.lang.Object ref = dataset_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dataset_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The dataset to write findings' updates to. Its format is
-     * "projects/[project_id]/datasets/[bigquery_dataset_id]".
-     * BigQuery Dataset unique ID  must contain only letters (a-z, A-Z), numbers
-     * (0-9), or underscores (_).
-     * 
- * - * string dataset = 4; - * @return The bytes for dataset. - */ - public com.google.protobuf.ByteString - getDatasetBytes() { - java.lang.Object ref = dataset_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - dataset_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The dataset to write findings' updates to. Its format is
-     * "projects/[project_id]/datasets/[bigquery_dataset_id]".
-     * BigQuery Dataset unique ID  must contain only letters (a-z, A-Z), numbers
-     * (0-9), or underscores (_).
-     * 
- * - * string dataset = 4; - * @param value The dataset to set. - * @return This builder for chaining. - */ - public Builder setDataset( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - dataset_ = value; - onChanged(); - return this; - } - /** - *
-     * The dataset to write findings' updates to. Its format is
-     * "projects/[project_id]/datasets/[bigquery_dataset_id]".
-     * BigQuery Dataset unique ID  must contain only letters (a-z, A-Z), numbers
-     * (0-9), or underscores (_).
-     * 
- * - * string dataset = 4; - * @return This builder for chaining. - */ - public Builder clearDataset() { - - dataset_ = getDefaultInstance().getDataset(); - onChanged(); - return this; - } - /** - *
-     * The dataset to write findings' updates to. Its format is
-     * "projects/[project_id]/datasets/[bigquery_dataset_id]".
-     * BigQuery Dataset unique ID  must contain only letters (a-z, A-Z), numbers
-     * (0-9), or underscores (_).
-     * 
- * - * string dataset = 4; - * @param value The bytes for dataset to set. - * @return This builder for chaining. - */ - public Builder setDatasetBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - dataset_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; - /** - *
-     * Output only. The time at which the big query export was created.
-     * This field is set by the server and will be ignored if provided on export
-     * on creation.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * Output only. The time at which the big query export was created.
-     * This field is set by the server and will be ignored if provided on export
-     * on creation.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - *
-     * Output only. The time at which the big query export was created.
-     * This field is set by the server and will be ignored if provided on export
-     * on creation.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. The time at which the big query export was created.
-     * This field is set by the server and will be ignored if provided on export
-     * on creation.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. The time at which the big query export was created.
-     * This field is set by the server and will be ignored if provided on export
-     * on creation.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. The time at which the big query export was created.
-     * This field is set by the server and will be ignored if provided on export
-     * on creation.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. The time at which the big query export was created.
-     * This field is set by the server and will be ignored if provided on export
-     * on creation.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The time at which the big query export was created.
-     * This field is set by the server and will be ignored if provided on export
-     * on creation.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * Output only. The time at which the big query export was created.
-     * This field is set by the server and will be ignored if provided on export
-     * on creation.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), - getParentForChildren(), - isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; - /** - *
-     * Output only. The most recent time at which the big export was updated.
-     * This field is set by the server and will be ignored if provided on export
-     * creation or update.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return updateTimeBuilder_ != null || updateTime_ != null; - } - /** - *
-     * Output only. The most recent time at which the big export was updated.
-     * This field is set by the server and will be ignored if provided on export
-     * creation or update.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - *
-     * Output only. The most recent time at which the big export was updated.
-     * This field is set by the server and will be ignored if provided on export
-     * creation or update.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - onChanged(); - } else { - updateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. The most recent time at which the big export was updated.
-     * This field is set by the server and will be ignored if provided on export
-     * creation or update.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setUpdateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - onChanged(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. The most recent time at which the big export was updated.
-     * This field is set by the server and will be ignored if provided on export
-     * creation or update.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (updateTime_ != null) { - updateTime_ = - com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); - } else { - updateTime_ = value; - } - onChanged(); - } else { - updateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. The most recent time at which the big export was updated.
-     * This field is set by the server and will be ignored if provided on export
-     * creation or update.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearUpdateTime() { - if (updateTimeBuilder_ == null) { - updateTime_ = null; - onChanged(); - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. The most recent time at which the big export was updated.
-     * This field is set by the server and will be ignored if provided on export
-     * creation or update.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The most recent time at which the big export was updated.
-     * This field is set by the server and will be ignored if provided on export
-     * creation or update.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - } - /** - *
-     * Output only. The most recent time at which the big export was updated.
-     * This field is set by the server and will be ignored if provided on export
-     * creation or update.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), - getParentForChildren(), - isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private java.lang.Object mostRecentEditor_ = ""; - /** - *
-     * Output only. Email address of the user who last edited the big query export.
-     * This field is set by the server and will be ignored if provided on export
-     * creation or update.
-     * 
- * - * string most_recent_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The mostRecentEditor. - */ - public java.lang.String getMostRecentEditor() { - java.lang.Object ref = mostRecentEditor_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mostRecentEditor_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. Email address of the user who last edited the big query export.
-     * This field is set by the server and will be ignored if provided on export
-     * creation or update.
-     * 
- * - * string most_recent_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for mostRecentEditor. - */ - public com.google.protobuf.ByteString - getMostRecentEditorBytes() { - java.lang.Object ref = mostRecentEditor_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mostRecentEditor_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. Email address of the user who last edited the big query export.
-     * This field is set by the server and will be ignored if provided on export
-     * creation or update.
-     * 
- * - * string most_recent_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The mostRecentEditor to set. - * @return This builder for chaining. - */ - public Builder setMostRecentEditor( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - mostRecentEditor_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. Email address of the user who last edited the big query export.
-     * This field is set by the server and will be ignored if provided on export
-     * creation or update.
-     * 
- * - * string most_recent_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearMostRecentEditor() { - - mostRecentEditor_ = getDefaultInstance().getMostRecentEditor(); - onChanged(); - return this; - } - /** - *
-     * Output only. Email address of the user who last edited the big query export.
-     * This field is set by the server and will be ignored if provided on export
-     * creation or update.
-     * 
- * - * string most_recent_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The bytes for mostRecentEditor to set. - * @return This builder for chaining. - */ - public Builder setMostRecentEditorBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - mostRecentEditor_ = value; - onChanged(); - return this; - } - - private java.lang.Object principal_ = ""; - /** - *
-     * Output only. The service account that needs permission to create table, upload data to
-     * the big query dataset.
-     * 
- * - * string principal = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The principal. - */ - public java.lang.String getPrincipal() { - java.lang.Object ref = principal_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - principal_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. The service account that needs permission to create table, upload data to
-     * the big query dataset.
-     * 
- * - * string principal = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for principal. - */ - public com.google.protobuf.ByteString - getPrincipalBytes() { - java.lang.Object ref = principal_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - principal_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. The service account that needs permission to create table, upload data to
-     * the big query dataset.
-     * 
- * - * string principal = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The principal to set. - * @return This builder for chaining. - */ - public Builder setPrincipal( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - principal_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. The service account that needs permission to create table, upload data to
-     * the big query dataset.
-     * 
- * - * string principal = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearPrincipal() { - - principal_ = getDefaultInstance().getPrincipal(); - onChanged(); - return this; - } - /** - *
-     * Output only. The service account that needs permission to create table, upload data to
-     * the big query dataset.
-     * 
- * - * string principal = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The bytes for principal to set. - * @return This builder for chaining. - */ - public Builder setPrincipalBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - principal_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.BigQueryExport) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.BigQueryExport) - private static final com.google.cloud.securitycenter.v1.BigQueryExport DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.BigQueryExport(); - } - - public static com.google.cloud.securitycenter.v1.BigQueryExport getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BigQueryExport parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BigQueryExport(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.BigQueryExport getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BigQueryExportName.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BigQueryExportName.java deleted file mode 100644 index 940d4edbd10a..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BigQueryExportName.java +++ /dev/null @@ -1,365 +0,0 @@ -/* - * Copyright 2022 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; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class BigQueryExportName implements ResourceName { - private static final PathTemplate ORGANIZATION_EXPORT = - PathTemplate.createWithoutUrlEncoding( - "organizations/{organization}/bigQueryExports/{export}"); - private static final PathTemplate FOLDER_EXPORT = - PathTemplate.createWithoutUrlEncoding("folders/{folder}/bigQueryExports/{export}"); - private static final PathTemplate PROJECT_EXPORT = - PathTemplate.createWithoutUrlEncoding("projects/{project}/bigQueryExports/{export}"); - private volatile Map fieldValuesMap; - private PathTemplate pathTemplate; - private String fixedValue; - private final String organization; - private final String export; - private final String folder; - private final String project; - - @Deprecated - protected BigQueryExportName() { - organization = null; - export = null; - folder = null; - project = null; - } - - private BigQueryExportName(Builder builder) { - organization = Preconditions.checkNotNull(builder.getOrganization()); - export = Preconditions.checkNotNull(builder.getExport()); - folder = null; - project = null; - pathTemplate = ORGANIZATION_EXPORT; - } - - private BigQueryExportName(FolderExportBuilder builder) { - folder = Preconditions.checkNotNull(builder.getFolder()); - export = Preconditions.checkNotNull(builder.getExport()); - organization = null; - project = null; - pathTemplate = FOLDER_EXPORT; - } - - private BigQueryExportName(ProjectExportBuilder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - export = Preconditions.checkNotNull(builder.getExport()); - organization = null; - folder = null; - pathTemplate = PROJECT_EXPORT; - } - - public String getOrganization() { - return organization; - } - - public String getExport() { - return export; - } - - public String getFolder() { - return folder; - } - - public String getProject() { - return project; - } - - 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 newOrganizationExportBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static FolderExportBuilder newFolderExportBuilder() { - return new FolderExportBuilder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static ProjectExportBuilder newProjectExportBuilder() { - return new ProjectExportBuilder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static BigQueryExportName of(String organization, String export) { - return newBuilder().setOrganization(organization).setExport(export).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static BigQueryExportName ofOrganizationExportName(String organization, String export) { - return newBuilder().setOrganization(organization).setExport(export).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static BigQueryExportName ofFolderExportName(String folder, String export) { - return newFolderExportBuilder().setFolder(folder).setExport(export).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static BigQueryExportName ofProjectExportName(String project, String export) { - return newProjectExportBuilder().setProject(project).setExport(export).build(); - } - - public static String format(String organization, String export) { - return newBuilder().setOrganization(organization).setExport(export).build().toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatOrganizationExportName(String organization, String export) { - return newBuilder().setOrganization(organization).setExport(export).build().toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatFolderExportName(String folder, String export) { - return newFolderExportBuilder().setFolder(folder).setExport(export).build().toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatProjectExportName(String project, String export) { - return newProjectExportBuilder().setProject(project).setExport(export).build().toString(); - } - - public static BigQueryExportName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - if (ORGANIZATION_EXPORT.matches(formattedString)) { - Map matchMap = ORGANIZATION_EXPORT.match(formattedString); - return ofOrganizationExportName(matchMap.get("organization"), matchMap.get("export")); - } else if (FOLDER_EXPORT.matches(formattedString)) { - Map matchMap = FOLDER_EXPORT.match(formattedString); - return ofFolderExportName(matchMap.get("folder"), matchMap.get("export")); - } else if (PROJECT_EXPORT.matches(formattedString)) { - Map matchMap = PROJECT_EXPORT.match(formattedString); - return ofProjectExportName(matchMap.get("project"), matchMap.get("export")); - } - throw new ValidationException("BigQueryExportName.parse: formattedString not in valid format"); - } - - 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 (BigQueryExportName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return ORGANIZATION_EXPORT.matches(formattedString) - || FOLDER_EXPORT.matches(formattedString) - || PROJECT_EXPORT.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 (export != null) { - fieldMapBuilder.put("export", export); - } - if (folder != null) { - fieldMapBuilder.put("folder", folder); - } - if (project != null) { - fieldMapBuilder.put("project", project); - } - 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()); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - BigQueryExportName that = ((BigQueryExportName) o); - return Objects.equals(this.organization, that.organization) - && Objects.equals(this.export, that.export) - && Objects.equals(this.folder, that.folder) - && Objects.equals(this.project, that.project); - } - 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(export); - h *= 1000003; - h ^= Objects.hashCode(folder); - h *= 1000003; - h ^= Objects.hashCode(project); - return h; - } - - /** Builder for organizations/{organization}/bigQueryExports/{export}. */ - public static class Builder { - private String organization; - private String export; - - protected Builder() {} - - public String getOrganization() { - return organization; - } - - public String getExport() { - return export; - } - - public Builder setOrganization(String organization) { - this.organization = organization; - return this; - } - - public Builder setExport(String export) { - this.export = export; - return this; - } - - private Builder(BigQueryExportName bigQueryExportName) { - Preconditions.checkArgument( - Objects.equals(bigQueryExportName.pathTemplate, ORGANIZATION_EXPORT), - "toBuilder is only supported when BigQueryExportName has the pattern of organizations/{organization}/bigQueryExports/{export}"); - this.organization = bigQueryExportName.organization; - this.export = bigQueryExportName.export; - } - - public BigQueryExportName build() { - return new BigQueryExportName(this); - } - } - - /** Builder for folders/{folder}/bigQueryExports/{export}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class FolderExportBuilder { - private String folder; - private String export; - - protected FolderExportBuilder() {} - - public String getFolder() { - return folder; - } - - public String getExport() { - return export; - } - - public FolderExportBuilder setFolder(String folder) { - this.folder = folder; - return this; - } - - public FolderExportBuilder setExport(String export) { - this.export = export; - return this; - } - - public BigQueryExportName build() { - return new BigQueryExportName(this); - } - } - - /** Builder for projects/{project}/bigQueryExports/{export}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class ProjectExportBuilder { - private String project; - private String export; - - protected ProjectExportBuilder() {} - - public String getProject() { - return project; - } - - public String getExport() { - return export; - } - - public ProjectExportBuilder setProject(String project) { - this.project = project; - return this; - } - - public ProjectExportBuilder setExport(String export) { - this.export = export; - return this; - } - - public BigQueryExportName build() { - return new BigQueryExportName(this); - } - } -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BigQueryExportOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BigQueryExportOrBuilder.java deleted file mode 100644 index e24d90ab0197..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BigQueryExportOrBuilder.java +++ /dev/null @@ -1,249 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/bigquery_export.proto - -package com.google.cloud.securitycenter.v1; - -public interface BigQueryExportOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.BigQueryExport) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The relative resource name of this export. See:
-   * https://cloud.google.com/apis/design/resource_names#relative_resource_name.
-   * Example format:
-   * "organizations/{organization_id}/bigQueryExports/{export_id}" Example
-   * format: "folders/{folder_id}/bigQueryExports/{export_id}" Example format:
-   * "projects/{project_id}/bigQueryExports/{export_id}"
-   * This field is provided in responses, and is ignored when provided in create
-   * requests.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The relative resource name of this export. See:
-   * https://cloud.google.com/apis/design/resource_names#relative_resource_name.
-   * Example format:
-   * "organizations/{organization_id}/bigQueryExports/{export_id}" Example
-   * format: "folders/{folder_id}/bigQueryExports/{export_id}" Example format:
-   * "projects/{project_id}/bigQueryExports/{export_id}"
-   * This field is provided in responses, and is ignored when provided in create
-   * requests.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The description of the export (max of 1024 characters).
-   * 
- * - * string description = 2; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * The description of the export (max of 1024 characters).
-   * 
- * - * string description = 2; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * Expression that defines the filter to apply across create/update events
-   * of findings. The expression is a list of zero or more restrictions combined
-   * via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
-   * has higher precedence than `AND`.
-   * Restrictions have the form `<field> <operator> <value>` and may have a
-   * `-` character in front of them to indicate negation. The fields map to
-   * those defined in the corresponding resource.
-   * The supported operators are:
-   * * `=` for all value types.
-   * * `>`, `<`, `>=`, `<=` for integer values.
-   * * `:`, meaning substring matching, for strings.
-   * The supported value types are:
-   * * string literals in quotes.
-   * * integer literals without quotes.
-   * * boolean literals `true` and `false` without quotes.
-   * 
- * - * string filter = 3; - * @return The filter. - */ - java.lang.String getFilter(); - /** - *
-   * Expression that defines the filter to apply across create/update events
-   * of findings. The expression is a list of zero or more restrictions combined
-   * via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
-   * has higher precedence than `AND`.
-   * Restrictions have the form `<field> <operator> <value>` and may have a
-   * `-` character in front of them to indicate negation. The fields map to
-   * those defined in the corresponding resource.
-   * The supported operators are:
-   * * `=` for all value types.
-   * * `>`, `<`, `>=`, `<=` for integer values.
-   * * `:`, meaning substring matching, for strings.
-   * The supported value types are:
-   * * string literals in quotes.
-   * * integer literals without quotes.
-   * * boolean literals `true` and `false` without quotes.
-   * 
- * - * string filter = 3; - * @return The bytes for filter. - */ - com.google.protobuf.ByteString - getFilterBytes(); - - /** - *
-   * The dataset to write findings' updates to. Its format is
-   * "projects/[project_id]/datasets/[bigquery_dataset_id]".
-   * BigQuery Dataset unique ID  must contain only letters (a-z, A-Z), numbers
-   * (0-9), or underscores (_).
-   * 
- * - * string dataset = 4; - * @return The dataset. - */ - java.lang.String getDataset(); - /** - *
-   * The dataset to write findings' updates to. Its format is
-   * "projects/[project_id]/datasets/[bigquery_dataset_id]".
-   * BigQuery Dataset unique ID  must contain only letters (a-z, A-Z), numbers
-   * (0-9), or underscores (_).
-   * 
- * - * string dataset = 4; - * @return The bytes for dataset. - */ - com.google.protobuf.ByteString - getDatasetBytes(); - - /** - *
-   * Output only. The time at which the big query export was created.
-   * This field is set by the server and will be ignored if provided on export
-   * on creation.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * Output only. The time at which the big query export was created.
-   * This field is set by the server and will be ignored if provided on export
-   * on creation.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * Output only. The time at which the big query export was created.
-   * This field is set by the server and will be ignored if provided on export
-   * on creation.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * Output only. The most recent time at which the big export was updated.
-   * This field is set by the server and will be ignored if provided on export
-   * creation or update.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - *
-   * Output only. The most recent time at which the big export was updated.
-   * This field is set by the server and will be ignored if provided on export
-   * creation or update.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - *
-   * Output only. The most recent time at which the big export was updated.
-   * This field is set by the server and will be ignored if provided on export
-   * creation or update.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - *
-   * Output only. Email address of the user who last edited the big query export.
-   * This field is set by the server and will be ignored if provided on export
-   * creation or update.
-   * 
- * - * string most_recent_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The mostRecentEditor. - */ - java.lang.String getMostRecentEditor(); - /** - *
-   * Output only. Email address of the user who last edited the big query export.
-   * This field is set by the server and will be ignored if provided on export
-   * creation or update.
-   * 
- * - * string most_recent_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for mostRecentEditor. - */ - com.google.protobuf.ByteString - getMostRecentEditorBytes(); - - /** - *
-   * Output only. The service account that needs permission to create table, upload data to
-   * the big query dataset.
-   * 
- * - * string principal = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The principal. - */ - java.lang.String getPrincipal(); - /** - *
-   * Output only. The service account that needs permission to create table, upload data to
-   * the big query dataset.
-   * 
- * - * string principal = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for principal. - */ - com.google.protobuf.ByteString - getPrincipalBytes(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BigQueryExportProto.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BigQueryExportProto.java deleted file mode 100644 index 59f6d78ac8a1..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BigQueryExportProto.java +++ /dev/null @@ -1,79 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/bigquery_export.proto - -package com.google.cloud.securitycenter.v1; - -public final class BigQueryExportProto { - private BigQueryExportProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_BigQueryExport_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_BigQueryExport_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n4google/cloud/securitycenter/v1/bigquer" + - "y_export.proto\022\036google.cloud.securitycen" + - "ter.v1\032\037google/api/field_behavior.proto\032" + - "\031google/api/resource.proto\032\037google/proto" + - "buf/timestamp.proto\"\275\003\n\016BigQueryExport\022\014" + - "\n\004name\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\022\016\n\006fil" + - "ter\030\003 \001(\t\022\017\n\007dataset\030\004 \001(\t\0224\n\013create_tim" + - "e\030\005 \001(\0132\032.google.protobuf.TimestampB\003\340A\003" + - "\0224\n\013update_time\030\006 \001(\0132\032.google.protobuf." + - "TimestampB\003\340A\003\022\037\n\022most_recent_editor\030\007 \001" + - "(\tB\003\340A\003\022\026\n\tprincipal\030\010 \001(\tB\003\340A\003:\301\001\352A\275\001\n," + - "securitycenter.googleapis.com/BigQueryEx" + - "port\0225organizations/{organization}/bigQu" + - "eryExports/{export}\022)folders/{folder}/bi" + - "gQueryExports/{export}\022+projects/{projec" + - "t}/bigQueryExports/{export}B\357\001\n\"com.goog" + - "le.cloud.securitycenter.v1B\023BigQueryExpo" + - "rtProtoP\001ZLgoogle.golang.org/genproto/go" + - "ogleapis/cloud/securitycenter/v1;securit" + - "ycenter\252\002\036Google.Cloud.SecurityCenter.V1" + - "\312\002\036Google\\Cloud\\SecurityCenter\\V1\352\002!Goog" + - "le::Cloud::SecurityCenter::V1b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.api.ResourceProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_securitycenter_v1_BigQueryExport_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_securitycenter_v1_BigQueryExport_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_BigQueryExport_descriptor, - new java.lang.String[] { "Name", "Description", "Filter", "Dataset", "CreateTime", "UpdateTime", "MostRecentEditor", "Principal", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.ResourceProto.resource); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsRequest.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsRequest.java deleted file mode 100644 index 64585cedbdbc..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsRequest.java +++ /dev/null @@ -1,1068 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Request message for bulk findings update.
- * Note:
- * 1. If multiple bulk update requests match the same resource, the order in
- * which they get executed is not defined.
- * 2. Once a bulk operation is started, there is no way to stop it.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.BulkMuteFindingsRequest} - */ -public final class BulkMuteFindingsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.BulkMuteFindingsRequest) - BulkMuteFindingsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use BulkMuteFindingsRequest.newBuilder() to construct. - private BulkMuteFindingsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BulkMuteFindingsRequest() { - parent_ = ""; - filter_ = ""; - muteAnnotation_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BulkMuteFindingsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BulkMuteFindingsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - muteAnnotation_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_BulkMuteFindingsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_BulkMuteFindingsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest.class, com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The parent, at which bulk action needs to be applied. Its format is
-   * "organizations/[organization_id]", "folders/[folder_id]",
-   * "projects/[project_id]".
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. The parent, at which bulk action needs to be applied. Its format is
-   * "organizations/[organization_id]", "folders/[folder_id]",
-   * "projects/[project_id]".
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 2; - private volatile java.lang.Object filter_; - /** - *
-   * Expression that identifies findings that should be updated.
-   * The expression is a list of zero or more restrictions combined
-   * via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
-   * has higher precedence than `AND`.
-   * Restrictions have the form `<field> <operator> <value>` and may have a
-   * `-` character in front of them to indicate negation. The fields map to
-   * those defined in the corresponding resource.
-   * The supported operators are:
-   * * `=` for all value types.
-   * * `>`, `<`, `>=`, `<=` for integer values.
-   * * `:`, meaning substring matching, for strings.
-   * The supported value types are:
-   * * string literals in quotes.
-   * * integer literals without quotes.
-   * * boolean literals `true` and `false` without quotes.
-   * 
- * - * string filter = 2; - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - *
-   * Expression that identifies findings that should be updated.
-   * The expression is a list of zero or more restrictions combined
-   * via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
-   * has higher precedence than `AND`.
-   * Restrictions have the form `<field> <operator> <value>` and may have a
-   * `-` character in front of them to indicate negation. The fields map to
-   * those defined in the corresponding resource.
-   * The supported operators are:
-   * * `=` for all value types.
-   * * `>`, `<`, `>=`, `<=` for integer values.
-   * * `:`, meaning substring matching, for strings.
-   * The supported value types are:
-   * * string literals in quotes.
-   * * integer literals without quotes.
-   * * boolean literals `true` and `false` without quotes.
-   * 
- * - * string filter = 2; - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MUTE_ANNOTATION_FIELD_NUMBER = 3; - private volatile java.lang.Object muteAnnotation_; - /** - *
-   * This can be a mute configuration name or any identifier for mute/unmute
-   * of findings based on the filter.
-   * 
- * - * string mute_annotation = 3 [deprecated = true]; - * @deprecated google.cloud.securitycenter.v1.BulkMuteFindingsRequest.mute_annotation is deprecated. - * See google/cloud/securitycenter/v1/securitycenter_service.proto;l=602 - * @return The muteAnnotation. - */ - @java.lang.Override - @java.lang.Deprecated public java.lang.String getMuteAnnotation() { - java.lang.Object ref = muteAnnotation_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - muteAnnotation_ = s; - return s; - } - } - /** - *
-   * This can be a mute configuration name or any identifier for mute/unmute
-   * of findings based on the filter.
-   * 
- * - * string mute_annotation = 3 [deprecated = true]; - * @deprecated google.cloud.securitycenter.v1.BulkMuteFindingsRequest.mute_annotation is deprecated. - * See google/cloud/securitycenter/v1/securitycenter_service.proto;l=602 - * @return The bytes for muteAnnotation. - */ - @java.lang.Override - @java.lang.Deprecated public com.google.protobuf.ByteString - getMuteAnnotationBytes() { - java.lang.Object ref = muteAnnotation_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - muteAnnotation_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(muteAnnotation_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, muteAnnotation_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(muteAnnotation_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, muteAnnotation_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest other = (com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!getFilter() - .equals(other.getFilter())) return false; - if (!getMuteAnnotation() - .equals(other.getMuteAnnotation())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + MUTE_ANNOTATION_FIELD_NUMBER; - hash = (53 * hash) + getMuteAnnotation().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for bulk findings update.
-   * Note:
-   * 1. If multiple bulk update requests match the same resource, the order in
-   * which they get executed is not defined.
-   * 2. Once a bulk operation is started, there is no way to stop it.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.BulkMuteFindingsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.BulkMuteFindingsRequest) - com.google.cloud.securitycenter.v1.BulkMuteFindingsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_BulkMuteFindingsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_BulkMuteFindingsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest.class, com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - filter_ = ""; - - muteAnnotation_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_BulkMuteFindingsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest build() { - com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest buildPartial() { - com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest result = new com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest(this); - result.parent_ = parent_; - result.filter_ = filter_; - result.muteAnnotation_ = muteAnnotation_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest) { - return mergeFrom((com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest other) { - if (other == com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - onChanged(); - } - if (!other.getMuteAnnotation().isEmpty()) { - muteAnnotation_ = other.muteAnnotation_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The parent, at which bulk action needs to be applied. Its format is
-     * "organizations/[organization_id]", "folders/[folder_id]",
-     * "projects/[project_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The parent, at which bulk action needs to be applied. Its format is
-     * "organizations/[organization_id]", "folders/[folder_id]",
-     * "projects/[project_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The parent, at which bulk action needs to be applied. Its format is
-     * "organizations/[organization_id]", "folders/[folder_id]",
-     * "projects/[project_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The parent, at which bulk action needs to be applied. Its format is
-     * "organizations/[organization_id]", "folders/[folder_id]",
-     * "projects/[project_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The parent, at which bulk action needs to be applied. Its format is
-     * "organizations/[organization_id]", "folders/[folder_id]",
-     * "projects/[project_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - *
-     * Expression that identifies findings that should be updated.
-     * The expression is a list of zero or more restrictions combined
-     * via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
-     * has higher precedence than `AND`.
-     * Restrictions have the form `<field> <operator> <value>` and may have a
-     * `-` character in front of them to indicate negation. The fields map to
-     * those defined in the corresponding resource.
-     * The supported operators are:
-     * * `=` for all value types.
-     * * `>`, `<`, `>=`, `<=` for integer values.
-     * * `:`, meaning substring matching, for strings.
-     * The supported value types are:
-     * * string literals in quotes.
-     * * integer literals without quotes.
-     * * boolean literals `true` and `false` without quotes.
-     * 
- * - * string filter = 2; - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Expression that identifies findings that should be updated.
-     * The expression is a list of zero or more restrictions combined
-     * via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
-     * has higher precedence than `AND`.
-     * Restrictions have the form `<field> <operator> <value>` and may have a
-     * `-` character in front of them to indicate negation. The fields map to
-     * those defined in the corresponding resource.
-     * The supported operators are:
-     * * `=` for all value types.
-     * * `>`, `<`, `>=`, `<=` for integer values.
-     * * `:`, meaning substring matching, for strings.
-     * The supported value types are:
-     * * string literals in quotes.
-     * * integer literals without quotes.
-     * * boolean literals `true` and `false` without quotes.
-     * 
- * - * string filter = 2; - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Expression that identifies findings that should be updated.
-     * The expression is a list of zero or more restrictions combined
-     * via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
-     * has higher precedence than `AND`.
-     * Restrictions have the form `<field> <operator> <value>` and may have a
-     * `-` character in front of them to indicate negation. The fields map to
-     * those defined in the corresponding resource.
-     * The supported operators are:
-     * * `=` for all value types.
-     * * `>`, `<`, `>=`, `<=` for integer values.
-     * * `:`, meaning substring matching, for strings.
-     * The supported value types are:
-     * * string literals in quotes.
-     * * integer literals without quotes.
-     * * boolean literals `true` and `false` without quotes.
-     * 
- * - * string filter = 2; - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - filter_ = value; - onChanged(); - return this; - } - /** - *
-     * Expression that identifies findings that should be updated.
-     * The expression is a list of zero or more restrictions combined
-     * via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
-     * has higher precedence than `AND`.
-     * Restrictions have the form `<field> <operator> <value>` and may have a
-     * `-` character in front of them to indicate negation. The fields map to
-     * those defined in the corresponding resource.
-     * The supported operators are:
-     * * `=` for all value types.
-     * * `>`, `<`, `>=`, `<=` for integer values.
-     * * `:`, meaning substring matching, for strings.
-     * The supported value types are:
-     * * string literals in quotes.
-     * * integer literals without quotes.
-     * * boolean literals `true` and `false` without quotes.
-     * 
- * - * string filter = 2; - * @return This builder for chaining. - */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - *
-     * Expression that identifies findings that should be updated.
-     * The expression is a list of zero or more restrictions combined
-     * via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
-     * has higher precedence than `AND`.
-     * Restrictions have the form `<field> <operator> <value>` and may have a
-     * `-` character in front of them to indicate negation. The fields map to
-     * those defined in the corresponding resource.
-     * The supported operators are:
-     * * `=` for all value types.
-     * * `>`, `<`, `>=`, `<=` for integer values.
-     * * `:`, meaning substring matching, for strings.
-     * The supported value types are:
-     * * string literals in quotes.
-     * * integer literals without quotes.
-     * * boolean literals `true` and `false` without quotes.
-     * 
- * - * string filter = 2; - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - filter_ = value; - onChanged(); - return this; - } - - private java.lang.Object muteAnnotation_ = ""; - /** - *
-     * This can be a mute configuration name or any identifier for mute/unmute
-     * of findings based on the filter.
-     * 
- * - * string mute_annotation = 3 [deprecated = true]; - * @deprecated google.cloud.securitycenter.v1.BulkMuteFindingsRequest.mute_annotation is deprecated. - * See google/cloud/securitycenter/v1/securitycenter_service.proto;l=602 - * @return The muteAnnotation. - */ - @java.lang.Deprecated public java.lang.String getMuteAnnotation() { - java.lang.Object ref = muteAnnotation_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - muteAnnotation_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * This can be a mute configuration name or any identifier for mute/unmute
-     * of findings based on the filter.
-     * 
- * - * string mute_annotation = 3 [deprecated = true]; - * @deprecated google.cloud.securitycenter.v1.BulkMuteFindingsRequest.mute_annotation is deprecated. - * See google/cloud/securitycenter/v1/securitycenter_service.proto;l=602 - * @return The bytes for muteAnnotation. - */ - @java.lang.Deprecated public com.google.protobuf.ByteString - getMuteAnnotationBytes() { - java.lang.Object ref = muteAnnotation_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - muteAnnotation_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * This can be a mute configuration name or any identifier for mute/unmute
-     * of findings based on the filter.
-     * 
- * - * string mute_annotation = 3 [deprecated = true]; - * @deprecated google.cloud.securitycenter.v1.BulkMuteFindingsRequest.mute_annotation is deprecated. - * See google/cloud/securitycenter/v1/securitycenter_service.proto;l=602 - * @param value The muteAnnotation to set. - * @return This builder for chaining. - */ - @java.lang.Deprecated public Builder setMuteAnnotation( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - muteAnnotation_ = value; - onChanged(); - return this; - } - /** - *
-     * This can be a mute configuration name or any identifier for mute/unmute
-     * of findings based on the filter.
-     * 
- * - * string mute_annotation = 3 [deprecated = true]; - * @deprecated google.cloud.securitycenter.v1.BulkMuteFindingsRequest.mute_annotation is deprecated. - * See google/cloud/securitycenter/v1/securitycenter_service.proto;l=602 - * @return This builder for chaining. - */ - @java.lang.Deprecated public Builder clearMuteAnnotation() { - - muteAnnotation_ = getDefaultInstance().getMuteAnnotation(); - onChanged(); - return this; - } - /** - *
-     * This can be a mute configuration name or any identifier for mute/unmute
-     * of findings based on the filter.
-     * 
- * - * string mute_annotation = 3 [deprecated = true]; - * @deprecated google.cloud.securitycenter.v1.BulkMuteFindingsRequest.mute_annotation is deprecated. - * See google/cloud/securitycenter/v1/securitycenter_service.proto;l=602 - * @param value The bytes for muteAnnotation to set. - * @return This builder for chaining. - */ - @java.lang.Deprecated public Builder setMuteAnnotationBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - muteAnnotation_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.BulkMuteFindingsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.BulkMuteFindingsRequest) - private static final com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest(); - } - - public static com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BulkMuteFindingsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BulkMuteFindingsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsRequestOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsRequestOrBuilder.java deleted file mode 100644 index b42e89fd70cb..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsRequestOrBuilder.java +++ /dev/null @@ -1,107 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -public interface BulkMuteFindingsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.BulkMuteFindingsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The parent, at which bulk action needs to be applied. Its format is
-   * "organizations/[organization_id]", "folders/[folder_id]",
-   * "projects/[project_id]".
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The parent, at which bulk action needs to be applied. Its format is
-   * "organizations/[organization_id]", "folders/[folder_id]",
-   * "projects/[project_id]".
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Expression that identifies findings that should be updated.
-   * The expression is a list of zero or more restrictions combined
-   * via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
-   * has higher precedence than `AND`.
-   * Restrictions have the form `<field> <operator> <value>` and may have a
-   * `-` character in front of them to indicate negation. The fields map to
-   * those defined in the corresponding resource.
-   * The supported operators are:
-   * * `=` for all value types.
-   * * `>`, `<`, `>=`, `<=` for integer values.
-   * * `:`, meaning substring matching, for strings.
-   * The supported value types are:
-   * * string literals in quotes.
-   * * integer literals without quotes.
-   * * boolean literals `true` and `false` without quotes.
-   * 
- * - * string filter = 2; - * @return The filter. - */ - java.lang.String getFilter(); - /** - *
-   * Expression that identifies findings that should be updated.
-   * The expression is a list of zero or more restrictions combined
-   * via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
-   * has higher precedence than `AND`.
-   * Restrictions have the form `<field> <operator> <value>` and may have a
-   * `-` character in front of them to indicate negation. The fields map to
-   * those defined in the corresponding resource.
-   * The supported operators are:
-   * * `=` for all value types.
-   * * `>`, `<`, `>=`, `<=` for integer values.
-   * * `:`, meaning substring matching, for strings.
-   * The supported value types are:
-   * * string literals in quotes.
-   * * integer literals without quotes.
-   * * boolean literals `true` and `false` without quotes.
-   * 
- * - * string filter = 2; - * @return The bytes for filter. - */ - com.google.protobuf.ByteString - getFilterBytes(); - - /** - *
-   * This can be a mute configuration name or any identifier for mute/unmute
-   * of findings based on the filter.
-   * 
- * - * string mute_annotation = 3 [deprecated = true]; - * @deprecated google.cloud.securitycenter.v1.BulkMuteFindingsRequest.mute_annotation is deprecated. - * See google/cloud/securitycenter/v1/securitycenter_service.proto;l=602 - * @return The muteAnnotation. - */ - @java.lang.Deprecated java.lang.String getMuteAnnotation(); - /** - *
-   * This can be a mute configuration name or any identifier for mute/unmute
-   * of findings based on the filter.
-   * 
- * - * string mute_annotation = 3 [deprecated = true]; - * @deprecated google.cloud.securitycenter.v1.BulkMuteFindingsRequest.mute_annotation is deprecated. - * See google/cloud/securitycenter/v1/securitycenter_service.proto;l=602 - * @return The bytes for muteAnnotation. - */ - @java.lang.Deprecated com.google.protobuf.ByteString - getMuteAnnotationBytes(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsResponse.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsResponse.java deleted file mode 100644 index 3355fbffce8c..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsResponse.java +++ /dev/null @@ -1,429 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * The response to a BulkMute request. Contains the LRO information.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.BulkMuteFindingsResponse} - */ -public final class BulkMuteFindingsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.BulkMuteFindingsResponse) - BulkMuteFindingsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use BulkMuteFindingsResponse.newBuilder() to construct. - private BulkMuteFindingsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BulkMuteFindingsResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BulkMuteFindingsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BulkMuteFindingsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_BulkMuteFindingsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_BulkMuteFindingsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse.class, com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse.Builder.class); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse other = (com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse) obj; - - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The response to a BulkMute request. Contains the LRO information.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.BulkMuteFindingsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.BulkMuteFindingsResponse) - com.google.cloud.securitycenter.v1.BulkMuteFindingsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_BulkMuteFindingsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_BulkMuteFindingsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse.class, com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_BulkMuteFindingsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse build() { - com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse buildPartial() { - com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse result = new com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse) { - return mergeFrom((com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse other) { - if (other == com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.BulkMuteFindingsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.BulkMuteFindingsResponse) - private static final com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse(); - } - - public static com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BulkMuteFindingsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BulkMuteFindingsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsResponseOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsResponseOrBuilder.java deleted file mode 100644 index 28f11160970f..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsResponseOrBuilder.java +++ /dev/null @@ -1,9 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -public interface BulkMuteFindingsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.BulkMuteFindingsResponse) - com.google.protobuf.MessageOrBuilder { -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Compliance.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Compliance.java deleted file mode 100644 index e38f24f55cff..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Compliance.java +++ /dev/null @@ -1,1017 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/compliance.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Contains compliance information about a security standard indicating unmet
- * recommendations.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Compliance} - */ -public final class Compliance extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Compliance) - ComplianceOrBuilder { -private static final long serialVersionUID = 0L; - // Use Compliance.newBuilder() to construct. - private Compliance(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Compliance() { - standard_ = ""; - version_ = ""; - ids_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Compliance(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Compliance( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - standard_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - version_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - ids_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - ids_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - ids_ = ids_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.ComplianceProto.internal_static_google_cloud_securitycenter_v1_Compliance_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.ComplianceProto.internal_static_google_cloud_securitycenter_v1_Compliance_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Compliance.class, com.google.cloud.securitycenter.v1.Compliance.Builder.class); - } - - public static final int STANDARD_FIELD_NUMBER = 1; - private volatile java.lang.Object standard_; - /** - *
-   * Refers to industry wide standards or benchmarks e.g. "cis", "pci", "owasp",
-   * etc.
-   * 
- * - * string standard = 1; - * @return The standard. - */ - @java.lang.Override - public java.lang.String getStandard() { - java.lang.Object ref = standard_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - standard_ = s; - return s; - } - } - /** - *
-   * Refers to industry wide standards or benchmarks e.g. "cis", "pci", "owasp",
-   * etc.
-   * 
- * - * string standard = 1; - * @return The bytes for standard. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getStandardBytes() { - java.lang.Object ref = standard_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - standard_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VERSION_FIELD_NUMBER = 2; - private volatile java.lang.Object version_; - /** - *
-   * Version of the standard/benchmark e.g. 1.1
-   * 
- * - * string version = 2; - * @return The version. - */ - @java.lang.Override - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } - } - /** - *
-   * Version of the standard/benchmark e.g. 1.1
-   * 
- * - * string version = 2; - * @return The bytes for version. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int IDS_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList ids_; - /** - *
-   * Policies within the standard/benchmark e.g. A.12.4.1
-   * 
- * - * repeated string ids = 3; - * @return A list containing the ids. - */ - public com.google.protobuf.ProtocolStringList - getIdsList() { - return ids_; - } - /** - *
-   * Policies within the standard/benchmark e.g. A.12.4.1
-   * 
- * - * repeated string ids = 3; - * @return The count of ids. - */ - public int getIdsCount() { - return ids_.size(); - } - /** - *
-   * Policies within the standard/benchmark e.g. A.12.4.1
-   * 
- * - * repeated string ids = 3; - * @param index The index of the element to return. - * @return The ids at the given index. - */ - public java.lang.String getIds(int index) { - return ids_.get(index); - } - /** - *
-   * Policies within the standard/benchmark e.g. A.12.4.1
-   * 
- * - * repeated string ids = 3; - * @param index The index of the value to return. - * @return The bytes of the ids at the given index. - */ - public com.google.protobuf.ByteString - getIdsBytes(int index) { - return ids_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(standard_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, standard_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, version_); - } - for (int i = 0; i < ids_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, ids_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(standard_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, standard_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, version_); - } - { - int dataSize = 0; - for (int i = 0; i < ids_.size(); i++) { - dataSize += computeStringSizeNoTag(ids_.getRaw(i)); - } - size += dataSize; - size += 1 * getIdsList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.Compliance)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.Compliance other = (com.google.cloud.securitycenter.v1.Compliance) obj; - - if (!getStandard() - .equals(other.getStandard())) return false; - if (!getVersion() - .equals(other.getVersion())) return false; - if (!getIdsList() - .equals(other.getIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + STANDARD_FIELD_NUMBER; - hash = (53 * hash) + getStandard().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - if (getIdsCount() > 0) { - hash = (37 * hash) + IDS_FIELD_NUMBER; - hash = (53 * hash) + getIdsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.Compliance parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Compliance parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Compliance parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Compliance parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Compliance parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Compliance parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Compliance parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Compliance parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Compliance parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Compliance parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Compliance parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Compliance parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.Compliance prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Contains compliance information about a security standard indicating unmet
-   * recommendations.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Compliance} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Compliance) - com.google.cloud.securitycenter.v1.ComplianceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.ComplianceProto.internal_static_google_cloud_securitycenter_v1_Compliance_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.ComplianceProto.internal_static_google_cloud_securitycenter_v1_Compliance_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Compliance.class, com.google.cloud.securitycenter.v1.Compliance.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.Compliance.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - standard_ = ""; - - version_ = ""; - - ids_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.ComplianceProto.internal_static_google_cloud_securitycenter_v1_Compliance_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Compliance getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.Compliance.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Compliance build() { - com.google.cloud.securitycenter.v1.Compliance result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Compliance buildPartial() { - com.google.cloud.securitycenter.v1.Compliance result = new com.google.cloud.securitycenter.v1.Compliance(this); - int from_bitField0_ = bitField0_; - result.standard_ = standard_; - result.version_ = version_; - if (((bitField0_ & 0x00000001) != 0)) { - ids_ = ids_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.ids_ = ids_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.Compliance) { - return mergeFrom((com.google.cloud.securitycenter.v1.Compliance)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.Compliance other) { - if (other == com.google.cloud.securitycenter.v1.Compliance.getDefaultInstance()) return this; - if (!other.getStandard().isEmpty()) { - standard_ = other.standard_; - onChanged(); - } - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - onChanged(); - } - if (!other.ids_.isEmpty()) { - if (ids_.isEmpty()) { - ids_ = other.ids_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureIdsIsMutable(); - ids_.addAll(other.ids_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.Compliance parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.Compliance) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object standard_ = ""; - /** - *
-     * Refers to industry wide standards or benchmarks e.g. "cis", "pci", "owasp",
-     * etc.
-     * 
- * - * string standard = 1; - * @return The standard. - */ - public java.lang.String getStandard() { - java.lang.Object ref = standard_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - standard_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Refers to industry wide standards or benchmarks e.g. "cis", "pci", "owasp",
-     * etc.
-     * 
- * - * string standard = 1; - * @return The bytes for standard. - */ - public com.google.protobuf.ByteString - getStandardBytes() { - java.lang.Object ref = standard_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - standard_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Refers to industry wide standards or benchmarks e.g. "cis", "pci", "owasp",
-     * etc.
-     * 
- * - * string standard = 1; - * @param value The standard to set. - * @return This builder for chaining. - */ - public Builder setStandard( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - standard_ = value; - onChanged(); - return this; - } - /** - *
-     * Refers to industry wide standards or benchmarks e.g. "cis", "pci", "owasp",
-     * etc.
-     * 
- * - * string standard = 1; - * @return This builder for chaining. - */ - public Builder clearStandard() { - - standard_ = getDefaultInstance().getStandard(); - onChanged(); - return this; - } - /** - *
-     * Refers to industry wide standards or benchmarks e.g. "cis", "pci", "owasp",
-     * etc.
-     * 
- * - * string standard = 1; - * @param value The bytes for standard to set. - * @return This builder for chaining. - */ - public Builder setStandardBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - standard_ = value; - onChanged(); - return this; - } - - private java.lang.Object version_ = ""; - /** - *
-     * Version of the standard/benchmark e.g. 1.1
-     * 
- * - * string version = 2; - * @return The version. - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Version of the standard/benchmark e.g. 1.1
-     * 
- * - * string version = 2; - * @return The bytes for version. - */ - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Version of the standard/benchmark e.g. 1.1
-     * 
- * - * string version = 2; - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - version_ = value; - onChanged(); - return this; - } - /** - *
-     * Version of the standard/benchmark e.g. 1.1
-     * 
- * - * string version = 2; - * @return This builder for chaining. - */ - public Builder clearVersion() { - - version_ = getDefaultInstance().getVersion(); - onChanged(); - return this; - } - /** - *
-     * Version of the standard/benchmark e.g. 1.1
-     * 
- * - * string version = 2; - * @param value The bytes for version to set. - * @return This builder for chaining. - */ - public Builder setVersionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - version_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList ids_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - ids_ = new com.google.protobuf.LazyStringArrayList(ids_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * Policies within the standard/benchmark e.g. A.12.4.1
-     * 
- * - * repeated string ids = 3; - * @return A list containing the ids. - */ - public com.google.protobuf.ProtocolStringList - getIdsList() { - return ids_.getUnmodifiableView(); - } - /** - *
-     * Policies within the standard/benchmark e.g. A.12.4.1
-     * 
- * - * repeated string ids = 3; - * @return The count of ids. - */ - public int getIdsCount() { - return ids_.size(); - } - /** - *
-     * Policies within the standard/benchmark e.g. A.12.4.1
-     * 
- * - * repeated string ids = 3; - * @param index The index of the element to return. - * @return The ids at the given index. - */ - public java.lang.String getIds(int index) { - return ids_.get(index); - } - /** - *
-     * Policies within the standard/benchmark e.g. A.12.4.1
-     * 
- * - * repeated string ids = 3; - * @param index The index of the value to return. - * @return The bytes of the ids at the given index. - */ - public com.google.protobuf.ByteString - getIdsBytes(int index) { - return ids_.getByteString(index); - } - /** - *
-     * Policies within the standard/benchmark e.g. A.12.4.1
-     * 
- * - * repeated string ids = 3; - * @param index The index to set the value at. - * @param value The ids to set. - * @return This builder for chaining. - */ - public Builder setIds( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureIdsIsMutable(); - ids_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Policies within the standard/benchmark e.g. A.12.4.1
-     * 
- * - * repeated string ids = 3; - * @param value The ids to add. - * @return This builder for chaining. - */ - public Builder addIds( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureIdsIsMutable(); - ids_.add(value); - onChanged(); - return this; - } - /** - *
-     * Policies within the standard/benchmark e.g. A.12.4.1
-     * 
- * - * repeated string ids = 3; - * @param values The ids to add. - * @return This builder for chaining. - */ - public Builder addAllIds( - java.lang.Iterable values) { - ensureIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, ids_); - onChanged(); - return this; - } - /** - *
-     * Policies within the standard/benchmark e.g. A.12.4.1
-     * 
- * - * repeated string ids = 3; - * @return This builder for chaining. - */ - public Builder clearIds() { - ids_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Policies within the standard/benchmark e.g. A.12.4.1
-     * 
- * - * repeated string ids = 3; - * @param value The bytes of the ids to add. - * @return This builder for chaining. - */ - public Builder addIdsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureIdsIsMutable(); - ids_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Compliance) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Compliance) - private static final com.google.cloud.securitycenter.v1.Compliance DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Compliance(); - } - - public static com.google.cloud.securitycenter.v1.Compliance getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Compliance parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Compliance(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Compliance getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ComplianceOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ComplianceOrBuilder.java deleted file mode 100644 index f4fca6affadd..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ComplianceOrBuilder.java +++ /dev/null @@ -1,92 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/compliance.proto - -package com.google.cloud.securitycenter.v1; - -public interface ComplianceOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Compliance) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Refers to industry wide standards or benchmarks e.g. "cis", "pci", "owasp",
-   * etc.
-   * 
- * - * string standard = 1; - * @return The standard. - */ - java.lang.String getStandard(); - /** - *
-   * Refers to industry wide standards or benchmarks e.g. "cis", "pci", "owasp",
-   * etc.
-   * 
- * - * string standard = 1; - * @return The bytes for standard. - */ - com.google.protobuf.ByteString - getStandardBytes(); - - /** - *
-   * Version of the standard/benchmark e.g. 1.1
-   * 
- * - * string version = 2; - * @return The version. - */ - java.lang.String getVersion(); - /** - *
-   * Version of the standard/benchmark e.g. 1.1
-   * 
- * - * string version = 2; - * @return The bytes for version. - */ - com.google.protobuf.ByteString - getVersionBytes(); - - /** - *
-   * Policies within the standard/benchmark e.g. A.12.4.1
-   * 
- * - * repeated string ids = 3; - * @return A list containing the ids. - */ - java.util.List - getIdsList(); - /** - *
-   * Policies within the standard/benchmark e.g. A.12.4.1
-   * 
- * - * repeated string ids = 3; - * @return The count of ids. - */ - int getIdsCount(); - /** - *
-   * Policies within the standard/benchmark e.g. A.12.4.1
-   * 
- * - * repeated string ids = 3; - * @param index The index of the element to return. - * @return The ids at the given index. - */ - java.lang.String getIds(int index); - /** - *
-   * Policies within the standard/benchmark e.g. A.12.4.1
-   * 
- * - * repeated string ids = 3; - * @param index The index of the value to return. - * @return The bytes of the ids at the given index. - */ - com.google.protobuf.ByteString - getIdsBytes(int index); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ComplianceProto.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ComplianceProto.java deleted file mode 100644 index 009724a6c1b9..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ComplianceProto.java +++ /dev/null @@ -1,55 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/compliance.proto - -package com.google.cloud.securitycenter.v1; - -public final class ComplianceProto { - private ComplianceProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_Compliance_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_Compliance_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n/google/cloud/securitycenter/v1/complia" + - "nce.proto\022\036google.cloud.securitycenter.v" + - "1\"<\n\nCompliance\022\020\n\010standard\030\001 \001(\t\022\017\n\007ver" + - "sion\030\002 \001(\t\022\013\n\003ids\030\003 \003(\tB\353\001\n\"com.google.c" + - "loud.securitycenter.v1B\017ComplianceProtoP" + - "\001ZLgoogle.golang.org/genproto/googleapis" + - "/cloud/securitycenter/v1;securitycenter\252" + - "\002\036Google.Cloud.SecurityCenter.V1\312\002\036Googl" + - "e\\Cloud\\SecurityCenter\\V1\352\002!Google::Clou" + - "d::SecurityCenter::V1b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_google_cloud_securitycenter_v1_Compliance_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_securitycenter_v1_Compliance_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_Compliance_descriptor, - new java.lang.String[] { "Standard", "Version", "Ids", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Connection.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Connection.java deleted file mode 100644 index 6faa9b69b262..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Connection.java +++ /dev/null @@ -1,1252 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/connection.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Contains information about the IP connection associated with the finding.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Connection} - */ -public final class Connection extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Connection) - ConnectionOrBuilder { -private static final long serialVersionUID = 0L; - // Use Connection.newBuilder() to construct. - private Connection(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Connection() { - destinationIp_ = ""; - sourceIp_ = ""; - protocol_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Connection(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Connection( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - destinationIp_ = s; - break; - } - case 16: { - - destinationPort_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - sourceIp_ = s; - break; - } - case 32: { - - sourcePort_ = input.readInt32(); - break; - } - case 40: { - int rawValue = input.readEnum(); - - protocol_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.ConnectionProto.internal_static_google_cloud_securitycenter_v1_Connection_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.ConnectionProto.internal_static_google_cloud_securitycenter_v1_Connection_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Connection.class, com.google.cloud.securitycenter.v1.Connection.Builder.class); - } - - /** - *
-   * IANA Internet Protocol Number such as TCP(6) and UDP(17).
-   * 
- * - * Protobuf enum {@code google.cloud.securitycenter.v1.Connection.Protocol} - */ - public enum Protocol - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unspecified protocol (not HOPOPT).
-     * 
- * - * PROTOCOL_UNSPECIFIED = 0; - */ - PROTOCOL_UNSPECIFIED(0), - /** - *
-     * Internet Control Message Protocol.
-     * 
- * - * ICMP = 1; - */ - ICMP(1), - /** - *
-     * Transmission Control Protocol.
-     * 
- * - * TCP = 6; - */ - TCP(6), - /** - *
-     * User Datagram Protocol.
-     * 
- * - * UDP = 17; - */ - UDP(17), - /** - *
-     * Generic Routing Encapsulation.
-     * 
- * - * GRE = 47; - */ - GRE(47), - /** - *
-     * Encap Security Payload.
-     * 
- * - * ESP = 50; - */ - ESP(50), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unspecified protocol (not HOPOPT).
-     * 
- * - * PROTOCOL_UNSPECIFIED = 0; - */ - public static final int PROTOCOL_UNSPECIFIED_VALUE = 0; - /** - *
-     * Internet Control Message Protocol.
-     * 
- * - * ICMP = 1; - */ - public static final int ICMP_VALUE = 1; - /** - *
-     * Transmission Control Protocol.
-     * 
- * - * TCP = 6; - */ - public static final int TCP_VALUE = 6; - /** - *
-     * User Datagram Protocol.
-     * 
- * - * UDP = 17; - */ - public static final int UDP_VALUE = 17; - /** - *
-     * Generic Routing Encapsulation.
-     * 
- * - * GRE = 47; - */ - public static final int GRE_VALUE = 47; - /** - *
-     * Encap Security Payload.
-     * 
- * - * ESP = 50; - */ - public static final int ESP_VALUE = 50; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Protocol valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Protocol forNumber(int value) { - switch (value) { - case 0: return PROTOCOL_UNSPECIFIED; - case 1: return ICMP; - case 6: return TCP; - case 17: return UDP; - case 47: return GRE; - case 50: return ESP; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Protocol> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Protocol findValueByNumber(int number) { - return Protocol.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.Connection.getDescriptor().getEnumTypes().get(0); - } - - private static final Protocol[] VALUES = values(); - - public static Protocol valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Protocol(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v1.Connection.Protocol) - } - - public static final int DESTINATION_IP_FIELD_NUMBER = 1; - private volatile java.lang.Object destinationIp_; - /** - *
-   * Destination IP address. Not present for sockets that are listening and not
-   * connected.
-   * 
- * - * string destination_ip = 1; - * @return The destinationIp. - */ - @java.lang.Override - public java.lang.String getDestinationIp() { - java.lang.Object ref = destinationIp_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - destinationIp_ = s; - return s; - } - } - /** - *
-   * Destination IP address. Not present for sockets that are listening and not
-   * connected.
-   * 
- * - * string destination_ip = 1; - * @return The bytes for destinationIp. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDestinationIpBytes() { - java.lang.Object ref = destinationIp_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - destinationIp_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESTINATION_PORT_FIELD_NUMBER = 2; - private int destinationPort_; - /** - *
-   * Destination port. Not present for sockets that are listening and not
-   * connected.
-   * 
- * - * int32 destination_port = 2; - * @return The destinationPort. - */ - @java.lang.Override - public int getDestinationPort() { - return destinationPort_; - } - - public static final int SOURCE_IP_FIELD_NUMBER = 3; - private volatile java.lang.Object sourceIp_; - /** - *
-   * Source IP address.
-   * 
- * - * string source_ip = 3; - * @return The sourceIp. - */ - @java.lang.Override - public java.lang.String getSourceIp() { - java.lang.Object ref = sourceIp_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sourceIp_ = s; - return s; - } - } - /** - *
-   * Source IP address.
-   * 
- * - * string source_ip = 3; - * @return The bytes for sourceIp. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSourceIpBytes() { - java.lang.Object ref = sourceIp_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sourceIp_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SOURCE_PORT_FIELD_NUMBER = 4; - private int sourcePort_; - /** - *
-   * Source port.
-   * 
- * - * int32 source_port = 4; - * @return The sourcePort. - */ - @java.lang.Override - public int getSourcePort() { - return sourcePort_; - } - - public static final int PROTOCOL_FIELD_NUMBER = 5; - private int protocol_; - /** - *
-   * IANA Internet Protocol Number such as TCP(6) and UDP(17).
-   * 
- * - * .google.cloud.securitycenter.v1.Connection.Protocol protocol = 5; - * @return The enum numeric value on the wire for protocol. - */ - @java.lang.Override public int getProtocolValue() { - return protocol_; - } - /** - *
-   * IANA Internet Protocol Number such as TCP(6) and UDP(17).
-   * 
- * - * .google.cloud.securitycenter.v1.Connection.Protocol protocol = 5; - * @return The protocol. - */ - @java.lang.Override public com.google.cloud.securitycenter.v1.Connection.Protocol getProtocol() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.Connection.Protocol result = com.google.cloud.securitycenter.v1.Connection.Protocol.valueOf(protocol_); - return result == null ? com.google.cloud.securitycenter.v1.Connection.Protocol.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationIp_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, destinationIp_); - } - if (destinationPort_ != 0) { - output.writeInt32(2, destinationPort_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceIp_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sourceIp_); - } - if (sourcePort_ != 0) { - output.writeInt32(4, sourcePort_); - } - if (protocol_ != com.google.cloud.securitycenter.v1.Connection.Protocol.PROTOCOL_UNSPECIFIED.getNumber()) { - output.writeEnum(5, protocol_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationIp_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, destinationIp_); - } - if (destinationPort_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, destinationPort_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceIp_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sourceIp_); - } - if (sourcePort_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(4, sourcePort_); - } - if (protocol_ != com.google.cloud.securitycenter.v1.Connection.Protocol.PROTOCOL_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(5, protocol_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.Connection)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.Connection other = (com.google.cloud.securitycenter.v1.Connection) obj; - - if (!getDestinationIp() - .equals(other.getDestinationIp())) return false; - if (getDestinationPort() - != other.getDestinationPort()) return false; - if (!getSourceIp() - .equals(other.getSourceIp())) return false; - if (getSourcePort() - != other.getSourcePort()) return false; - if (protocol_ != other.protocol_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + DESTINATION_IP_FIELD_NUMBER; - hash = (53 * hash) + getDestinationIp().hashCode(); - hash = (37 * hash) + DESTINATION_PORT_FIELD_NUMBER; - hash = (53 * hash) + getDestinationPort(); - hash = (37 * hash) + SOURCE_IP_FIELD_NUMBER; - hash = (53 * hash) + getSourceIp().hashCode(); - hash = (37 * hash) + SOURCE_PORT_FIELD_NUMBER; - hash = (53 * hash) + getSourcePort(); - hash = (37 * hash) + PROTOCOL_FIELD_NUMBER; - hash = (53 * hash) + protocol_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.Connection parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Connection parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Connection parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Connection parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Connection parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Connection parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Connection parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Connection parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Connection parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Connection parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Connection parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Connection parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.Connection prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Contains information about the IP connection associated with the finding.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Connection} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Connection) - com.google.cloud.securitycenter.v1.ConnectionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.ConnectionProto.internal_static_google_cloud_securitycenter_v1_Connection_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.ConnectionProto.internal_static_google_cloud_securitycenter_v1_Connection_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Connection.class, com.google.cloud.securitycenter.v1.Connection.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.Connection.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - destinationIp_ = ""; - - destinationPort_ = 0; - - sourceIp_ = ""; - - sourcePort_ = 0; - - protocol_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.ConnectionProto.internal_static_google_cloud_securitycenter_v1_Connection_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Connection getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.Connection.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Connection build() { - com.google.cloud.securitycenter.v1.Connection result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Connection buildPartial() { - com.google.cloud.securitycenter.v1.Connection result = new com.google.cloud.securitycenter.v1.Connection(this); - result.destinationIp_ = destinationIp_; - result.destinationPort_ = destinationPort_; - result.sourceIp_ = sourceIp_; - result.sourcePort_ = sourcePort_; - result.protocol_ = protocol_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.Connection) { - return mergeFrom((com.google.cloud.securitycenter.v1.Connection)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.Connection other) { - if (other == com.google.cloud.securitycenter.v1.Connection.getDefaultInstance()) return this; - if (!other.getDestinationIp().isEmpty()) { - destinationIp_ = other.destinationIp_; - onChanged(); - } - if (other.getDestinationPort() != 0) { - setDestinationPort(other.getDestinationPort()); - } - if (!other.getSourceIp().isEmpty()) { - sourceIp_ = other.sourceIp_; - onChanged(); - } - if (other.getSourcePort() != 0) { - setSourcePort(other.getSourcePort()); - } - if (other.protocol_ != 0) { - setProtocolValue(other.getProtocolValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.Connection parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.Connection) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object destinationIp_ = ""; - /** - *
-     * Destination IP address. Not present for sockets that are listening and not
-     * connected.
-     * 
- * - * string destination_ip = 1; - * @return The destinationIp. - */ - public java.lang.String getDestinationIp() { - java.lang.Object ref = destinationIp_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - destinationIp_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Destination IP address. Not present for sockets that are listening and not
-     * connected.
-     * 
- * - * string destination_ip = 1; - * @return The bytes for destinationIp. - */ - public com.google.protobuf.ByteString - getDestinationIpBytes() { - java.lang.Object ref = destinationIp_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - destinationIp_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Destination IP address. Not present for sockets that are listening and not
-     * connected.
-     * 
- * - * string destination_ip = 1; - * @param value The destinationIp to set. - * @return This builder for chaining. - */ - public Builder setDestinationIp( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - destinationIp_ = value; - onChanged(); - return this; - } - /** - *
-     * Destination IP address. Not present for sockets that are listening and not
-     * connected.
-     * 
- * - * string destination_ip = 1; - * @return This builder for chaining. - */ - public Builder clearDestinationIp() { - - destinationIp_ = getDefaultInstance().getDestinationIp(); - onChanged(); - return this; - } - /** - *
-     * Destination IP address. Not present for sockets that are listening and not
-     * connected.
-     * 
- * - * string destination_ip = 1; - * @param value The bytes for destinationIp to set. - * @return This builder for chaining. - */ - public Builder setDestinationIpBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - destinationIp_ = value; - onChanged(); - return this; - } - - private int destinationPort_ ; - /** - *
-     * Destination port. Not present for sockets that are listening and not
-     * connected.
-     * 
- * - * int32 destination_port = 2; - * @return The destinationPort. - */ - @java.lang.Override - public int getDestinationPort() { - return destinationPort_; - } - /** - *
-     * Destination port. Not present for sockets that are listening and not
-     * connected.
-     * 
- * - * int32 destination_port = 2; - * @param value The destinationPort to set. - * @return This builder for chaining. - */ - public Builder setDestinationPort(int value) { - - destinationPort_ = value; - onChanged(); - return this; - } - /** - *
-     * Destination port. Not present for sockets that are listening and not
-     * connected.
-     * 
- * - * int32 destination_port = 2; - * @return This builder for chaining. - */ - public Builder clearDestinationPort() { - - destinationPort_ = 0; - onChanged(); - return this; - } - - private java.lang.Object sourceIp_ = ""; - /** - *
-     * Source IP address.
-     * 
- * - * string source_ip = 3; - * @return The sourceIp. - */ - public java.lang.String getSourceIp() { - java.lang.Object ref = sourceIp_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sourceIp_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Source IP address.
-     * 
- * - * string source_ip = 3; - * @return The bytes for sourceIp. - */ - public com.google.protobuf.ByteString - getSourceIpBytes() { - java.lang.Object ref = sourceIp_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sourceIp_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Source IP address.
-     * 
- * - * string source_ip = 3; - * @param value The sourceIp to set. - * @return This builder for chaining. - */ - public Builder setSourceIp( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - sourceIp_ = value; - onChanged(); - return this; - } - /** - *
-     * Source IP address.
-     * 
- * - * string source_ip = 3; - * @return This builder for chaining. - */ - public Builder clearSourceIp() { - - sourceIp_ = getDefaultInstance().getSourceIp(); - onChanged(); - return this; - } - /** - *
-     * Source IP address.
-     * 
- * - * string source_ip = 3; - * @param value The bytes for sourceIp to set. - * @return This builder for chaining. - */ - public Builder setSourceIpBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - sourceIp_ = value; - onChanged(); - return this; - } - - private int sourcePort_ ; - /** - *
-     * Source port.
-     * 
- * - * int32 source_port = 4; - * @return The sourcePort. - */ - @java.lang.Override - public int getSourcePort() { - return sourcePort_; - } - /** - *
-     * Source port.
-     * 
- * - * int32 source_port = 4; - * @param value The sourcePort to set. - * @return This builder for chaining. - */ - public Builder setSourcePort(int value) { - - sourcePort_ = value; - onChanged(); - return this; - } - /** - *
-     * Source port.
-     * 
- * - * int32 source_port = 4; - * @return This builder for chaining. - */ - public Builder clearSourcePort() { - - sourcePort_ = 0; - onChanged(); - return this; - } - - private int protocol_ = 0; - /** - *
-     * IANA Internet Protocol Number such as TCP(6) and UDP(17).
-     * 
- * - * .google.cloud.securitycenter.v1.Connection.Protocol protocol = 5; - * @return The enum numeric value on the wire for protocol. - */ - @java.lang.Override public int getProtocolValue() { - return protocol_; - } - /** - *
-     * IANA Internet Protocol Number such as TCP(6) and UDP(17).
-     * 
- * - * .google.cloud.securitycenter.v1.Connection.Protocol protocol = 5; - * @param value The enum numeric value on the wire for protocol to set. - * @return This builder for chaining. - */ - public Builder setProtocolValue(int value) { - - protocol_ = value; - onChanged(); - return this; - } - /** - *
-     * IANA Internet Protocol Number such as TCP(6) and UDP(17).
-     * 
- * - * .google.cloud.securitycenter.v1.Connection.Protocol protocol = 5; - * @return The protocol. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Connection.Protocol getProtocol() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.Connection.Protocol result = com.google.cloud.securitycenter.v1.Connection.Protocol.valueOf(protocol_); - return result == null ? com.google.cloud.securitycenter.v1.Connection.Protocol.UNRECOGNIZED : result; - } - /** - *
-     * IANA Internet Protocol Number such as TCP(6) and UDP(17).
-     * 
- * - * .google.cloud.securitycenter.v1.Connection.Protocol protocol = 5; - * @param value The protocol to set. - * @return This builder for chaining. - */ - public Builder setProtocol(com.google.cloud.securitycenter.v1.Connection.Protocol value) { - if (value == null) { - throw new NullPointerException(); - } - - protocol_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * IANA Internet Protocol Number such as TCP(6) and UDP(17).
-     * 
- * - * .google.cloud.securitycenter.v1.Connection.Protocol protocol = 5; - * @return This builder for chaining. - */ - public Builder clearProtocol() { - - protocol_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Connection) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Connection) - private static final com.google.cloud.securitycenter.v1.Connection DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Connection(); - } - - public static com.google.cloud.securitycenter.v1.Connection getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Connection parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Connection(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Connection getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ConnectionOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ConnectionOrBuilder.java deleted file mode 100644 index b4767499bfd3..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ConnectionOrBuilder.java +++ /dev/null @@ -1,91 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/connection.proto - -package com.google.cloud.securitycenter.v1; - -public interface ConnectionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Connection) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Destination IP address. Not present for sockets that are listening and not
-   * connected.
-   * 
- * - * string destination_ip = 1; - * @return The destinationIp. - */ - java.lang.String getDestinationIp(); - /** - *
-   * Destination IP address. Not present for sockets that are listening and not
-   * connected.
-   * 
- * - * string destination_ip = 1; - * @return The bytes for destinationIp. - */ - com.google.protobuf.ByteString - getDestinationIpBytes(); - - /** - *
-   * Destination port. Not present for sockets that are listening and not
-   * connected.
-   * 
- * - * int32 destination_port = 2; - * @return The destinationPort. - */ - int getDestinationPort(); - - /** - *
-   * Source IP address.
-   * 
- * - * string source_ip = 3; - * @return The sourceIp. - */ - java.lang.String getSourceIp(); - /** - *
-   * Source IP address.
-   * 
- * - * string source_ip = 3; - * @return The bytes for sourceIp. - */ - com.google.protobuf.ByteString - getSourceIpBytes(); - - /** - *
-   * Source port.
-   * 
- * - * int32 source_port = 4; - * @return The sourcePort. - */ - int getSourcePort(); - - /** - *
-   * IANA Internet Protocol Number such as TCP(6) and UDP(17).
-   * 
- * - * .google.cloud.securitycenter.v1.Connection.Protocol protocol = 5; - * @return The enum numeric value on the wire for protocol. - */ - int getProtocolValue(); - /** - *
-   * IANA Internet Protocol Number such as TCP(6) and UDP(17).
-   * 
- * - * .google.cloud.securitycenter.v1.Connection.Protocol protocol = 5; - * @return The protocol. - */ - com.google.cloud.securitycenter.v1.Connection.Protocol getProtocol(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ConnectionProto.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ConnectionProto.java deleted file mode 100644 index 5e2059a76d4d..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ConnectionProto.java +++ /dev/null @@ -1,60 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/connection.proto - -package com.google.cloud.securitycenter.v1; - -public final class ConnectionProto { - private ConnectionProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_Connection_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_Connection_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n/google/cloud/securitycenter/v1/connect" + - "ion.proto\022\036google.cloud.securitycenter.v" + - "1\"\201\002\n\nConnection\022\026\n\016destination_ip\030\001 \001(\t" + - "\022\030\n\020destination_port\030\002 \001(\005\022\021\n\tsource_ip\030" + - "\003 \001(\t\022\023\n\013source_port\030\004 \001(\005\022E\n\010protocol\030\005" + - " \001(\01623.google.cloud.securitycenter.v1.Co" + - "nnection.Protocol\"R\n\010Protocol\022\030\n\024PROTOCO" + - "L_UNSPECIFIED\020\000\022\010\n\004ICMP\020\001\022\007\n\003TCP\020\006\022\007\n\003UD" + - "P\020\021\022\007\n\003GRE\020/\022\007\n\003ESP\0202B\353\001\n\"com.google.clo" + - "ud.securitycenter.v1B\017ConnectionProtoP\001Z" + - "Lgoogle.golang.org/genproto/googleapis/c" + - "loud/securitycenter/v1;securitycenter\252\002\036" + - "Google.Cloud.SecurityCenter.V1\312\002\036Google\\" + - "Cloud\\SecurityCenter\\V1\352\002!Google::Cloud:" + - ":SecurityCenter::V1b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_google_cloud_securitycenter_v1_Connection_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_securitycenter_v1_Connection_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_Connection_descriptor, - new java.lang.String[] { "DestinationIp", "DestinationPort", "SourceIp", "SourcePort", "Protocol", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Contact.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Contact.java deleted file mode 100644 index 113ba064031d..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Contact.java +++ /dev/null @@ -1,595 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/contact_details.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Representa a single contact's email address
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Contact} - */ -public final class Contact extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Contact) - ContactOrBuilder { -private static final long serialVersionUID = 0L; - // Use Contact.newBuilder() to construct. - private Contact(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Contact() { - email_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Contact(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Contact( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - email_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.ContactDetailsProto.internal_static_google_cloud_securitycenter_v1_Contact_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.ContactDetailsProto.internal_static_google_cloud_securitycenter_v1_Contact_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Contact.class, com.google.cloud.securitycenter.v1.Contact.Builder.class); - } - - public static final int EMAIL_FIELD_NUMBER = 1; - private volatile java.lang.Object email_; - /** - *
-   * An email address e.g. "person123@company.com"
-   * 
- * - * string email = 1; - * @return The email. - */ - @java.lang.Override - public java.lang.String getEmail() { - java.lang.Object ref = email_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - email_ = s; - return s; - } - } - /** - *
-   * An email address e.g. "person123@company.com"
-   * 
- * - * string email = 1; - * @return The bytes for email. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getEmailBytes() { - java.lang.Object ref = email_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - email_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(email_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, email_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(email_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, email_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.Contact)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.Contact other = (com.google.cloud.securitycenter.v1.Contact) obj; - - if (!getEmail() - .equals(other.getEmail())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + EMAIL_FIELD_NUMBER; - hash = (53 * hash) + getEmail().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.Contact parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Contact parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Contact parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Contact parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Contact parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Contact parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Contact parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Contact parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Contact parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Contact parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Contact parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Contact parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.Contact prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Representa a single contact's email address
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Contact} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Contact) - com.google.cloud.securitycenter.v1.ContactOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.ContactDetailsProto.internal_static_google_cloud_securitycenter_v1_Contact_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.ContactDetailsProto.internal_static_google_cloud_securitycenter_v1_Contact_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Contact.class, com.google.cloud.securitycenter.v1.Contact.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.Contact.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - email_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.ContactDetailsProto.internal_static_google_cloud_securitycenter_v1_Contact_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Contact getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.Contact.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Contact build() { - com.google.cloud.securitycenter.v1.Contact result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Contact buildPartial() { - com.google.cloud.securitycenter.v1.Contact result = new com.google.cloud.securitycenter.v1.Contact(this); - result.email_ = email_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.Contact) { - return mergeFrom((com.google.cloud.securitycenter.v1.Contact)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.Contact other) { - if (other == com.google.cloud.securitycenter.v1.Contact.getDefaultInstance()) return this; - if (!other.getEmail().isEmpty()) { - email_ = other.email_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.Contact parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.Contact) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object email_ = ""; - /** - *
-     * An email address e.g. "person123@company.com"
-     * 
- * - * string email = 1; - * @return The email. - */ - public java.lang.String getEmail() { - java.lang.Object ref = email_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - email_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * An email address e.g. "person123@company.com"
-     * 
- * - * string email = 1; - * @return The bytes for email. - */ - public com.google.protobuf.ByteString - getEmailBytes() { - java.lang.Object ref = email_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - email_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * An email address e.g. "person123@company.com"
-     * 
- * - * string email = 1; - * @param value The email to set. - * @return This builder for chaining. - */ - public Builder setEmail( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - email_ = value; - onChanged(); - return this; - } - /** - *
-     * An email address e.g. "person123@company.com"
-     * 
- * - * string email = 1; - * @return This builder for chaining. - */ - public Builder clearEmail() { - - email_ = getDefaultInstance().getEmail(); - onChanged(); - return this; - } - /** - *
-     * An email address e.g. "person123@company.com"
-     * 
- * - * string email = 1; - * @param value The bytes for email to set. - * @return This builder for chaining. - */ - public Builder setEmailBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - email_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Contact) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Contact) - private static final com.google.cloud.securitycenter.v1.Contact DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Contact(); - } - - public static com.google.cloud.securitycenter.v1.Contact getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Contact parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Contact(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Contact getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContactDetails.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContactDetails.java deleted file mode 100644 index 42df17fb330c..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContactDetails.java +++ /dev/null @@ -1,872 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/contact_details.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * The details pertaining to specific contacts
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.ContactDetails} - */ -public final class ContactDetails extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.ContactDetails) - ContactDetailsOrBuilder { -private static final long serialVersionUID = 0L; - // Use ContactDetails.newBuilder() to construct. - private ContactDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ContactDetails() { - contacts_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ContactDetails(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ContactDetails( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - contacts_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - contacts_.add( - input.readMessage(com.google.cloud.securitycenter.v1.Contact.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - contacts_ = java.util.Collections.unmodifiableList(contacts_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.ContactDetailsProto.internal_static_google_cloud_securitycenter_v1_ContactDetails_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.ContactDetailsProto.internal_static_google_cloud_securitycenter_v1_ContactDetails_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.ContactDetails.class, com.google.cloud.securitycenter.v1.ContactDetails.Builder.class); - } - - public static final int CONTACTS_FIELD_NUMBER = 1; - private java.util.List contacts_; - /** - *
-   * A list of contacts
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; - */ - @java.lang.Override - public java.util.List getContactsList() { - return contacts_; - } - /** - *
-   * A list of contacts
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; - */ - @java.lang.Override - public java.util.List - getContactsOrBuilderList() { - return contacts_; - } - /** - *
-   * A list of contacts
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; - */ - @java.lang.Override - public int getContactsCount() { - return contacts_.size(); - } - /** - *
-   * A list of contacts
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Contact getContacts(int index) { - return contacts_.get(index); - } - /** - *
-   * A list of contacts
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.ContactOrBuilder getContactsOrBuilder( - int index) { - return contacts_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < contacts_.size(); i++) { - output.writeMessage(1, contacts_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < contacts_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, contacts_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.ContactDetails)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.ContactDetails other = (com.google.cloud.securitycenter.v1.ContactDetails) obj; - - if (!getContactsList() - .equals(other.getContactsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getContactsCount() > 0) { - hash = (37 * hash) + CONTACTS_FIELD_NUMBER; - hash = (53 * hash) + getContactsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.ContactDetails parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.ContactDetails parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.ContactDetails parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.ContactDetails parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.ContactDetails parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.ContactDetails parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.ContactDetails parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.ContactDetails parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.ContactDetails parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.ContactDetails parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.ContactDetails parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.ContactDetails parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.ContactDetails prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The details pertaining to specific contacts
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.ContactDetails} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.ContactDetails) - com.google.cloud.securitycenter.v1.ContactDetailsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.ContactDetailsProto.internal_static_google_cloud_securitycenter_v1_ContactDetails_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.ContactDetailsProto.internal_static_google_cloud_securitycenter_v1_ContactDetails_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.ContactDetails.class, com.google.cloud.securitycenter.v1.ContactDetails.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.ContactDetails.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getContactsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (contactsBuilder_ == null) { - contacts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - contactsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.ContactDetailsProto.internal_static_google_cloud_securitycenter_v1_ContactDetails_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.ContactDetails getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.ContactDetails.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.ContactDetails build() { - com.google.cloud.securitycenter.v1.ContactDetails result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.ContactDetails buildPartial() { - com.google.cloud.securitycenter.v1.ContactDetails result = new com.google.cloud.securitycenter.v1.ContactDetails(this); - int from_bitField0_ = bitField0_; - if (contactsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - contacts_ = java.util.Collections.unmodifiableList(contacts_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.contacts_ = contacts_; - } else { - result.contacts_ = contactsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.ContactDetails) { - return mergeFrom((com.google.cloud.securitycenter.v1.ContactDetails)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.ContactDetails other) { - if (other == com.google.cloud.securitycenter.v1.ContactDetails.getDefaultInstance()) return this; - if (contactsBuilder_ == null) { - if (!other.contacts_.isEmpty()) { - if (contacts_.isEmpty()) { - contacts_ = other.contacts_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureContactsIsMutable(); - contacts_.addAll(other.contacts_); - } - onChanged(); - } - } else { - if (!other.contacts_.isEmpty()) { - if (contactsBuilder_.isEmpty()) { - contactsBuilder_.dispose(); - contactsBuilder_ = null; - contacts_ = other.contacts_; - bitField0_ = (bitField0_ & ~0x00000001); - contactsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getContactsFieldBuilder() : null; - } else { - contactsBuilder_.addAllMessages(other.contacts_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.ContactDetails parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.ContactDetails) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List contacts_ = - java.util.Collections.emptyList(); - private void ensureContactsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - contacts_ = new java.util.ArrayList(contacts_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Contact, com.google.cloud.securitycenter.v1.Contact.Builder, com.google.cloud.securitycenter.v1.ContactOrBuilder> contactsBuilder_; - - /** - *
-     * A list of contacts
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; - */ - public java.util.List getContactsList() { - if (contactsBuilder_ == null) { - return java.util.Collections.unmodifiableList(contacts_); - } else { - return contactsBuilder_.getMessageList(); - } - } - /** - *
-     * A list of contacts
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; - */ - public int getContactsCount() { - if (contactsBuilder_ == null) { - return contacts_.size(); - } else { - return contactsBuilder_.getCount(); - } - } - /** - *
-     * A list of contacts
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; - */ - public com.google.cloud.securitycenter.v1.Contact getContacts(int index) { - if (contactsBuilder_ == null) { - return contacts_.get(index); - } else { - return contactsBuilder_.getMessage(index); - } - } - /** - *
-     * A list of contacts
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; - */ - public Builder setContacts( - int index, com.google.cloud.securitycenter.v1.Contact value) { - if (contactsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContactsIsMutable(); - contacts_.set(index, value); - onChanged(); - } else { - contactsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * A list of contacts
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; - */ - public Builder setContacts( - int index, com.google.cloud.securitycenter.v1.Contact.Builder builderForValue) { - if (contactsBuilder_ == null) { - ensureContactsIsMutable(); - contacts_.set(index, builderForValue.build()); - onChanged(); - } else { - contactsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of contacts
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; - */ - public Builder addContacts(com.google.cloud.securitycenter.v1.Contact value) { - if (contactsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContactsIsMutable(); - contacts_.add(value); - onChanged(); - } else { - contactsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * A list of contacts
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; - */ - public Builder addContacts( - int index, com.google.cloud.securitycenter.v1.Contact value) { - if (contactsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContactsIsMutable(); - contacts_.add(index, value); - onChanged(); - } else { - contactsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * A list of contacts
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; - */ - public Builder addContacts( - com.google.cloud.securitycenter.v1.Contact.Builder builderForValue) { - if (contactsBuilder_ == null) { - ensureContactsIsMutable(); - contacts_.add(builderForValue.build()); - onChanged(); - } else { - contactsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * A list of contacts
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; - */ - public Builder addContacts( - int index, com.google.cloud.securitycenter.v1.Contact.Builder builderForValue) { - if (contactsBuilder_ == null) { - ensureContactsIsMutable(); - contacts_.add(index, builderForValue.build()); - onChanged(); - } else { - contactsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of contacts
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; - */ - public Builder addAllContacts( - java.lang.Iterable values) { - if (contactsBuilder_ == null) { - ensureContactsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, contacts_); - onChanged(); - } else { - contactsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * A list of contacts
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; - */ - public Builder clearContacts() { - if (contactsBuilder_ == null) { - contacts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - contactsBuilder_.clear(); - } - return this; - } - /** - *
-     * A list of contacts
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; - */ - public Builder removeContacts(int index) { - if (contactsBuilder_ == null) { - ensureContactsIsMutable(); - contacts_.remove(index); - onChanged(); - } else { - contactsBuilder_.remove(index); - } - return this; - } - /** - *
-     * A list of contacts
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; - */ - public com.google.cloud.securitycenter.v1.Contact.Builder getContactsBuilder( - int index) { - return getContactsFieldBuilder().getBuilder(index); - } - /** - *
-     * A list of contacts
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; - */ - public com.google.cloud.securitycenter.v1.ContactOrBuilder getContactsOrBuilder( - int index) { - if (contactsBuilder_ == null) { - return contacts_.get(index); } else { - return contactsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * A list of contacts
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; - */ - public java.util.List - getContactsOrBuilderList() { - if (contactsBuilder_ != null) { - return contactsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(contacts_); - } - } - /** - *
-     * A list of contacts
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; - */ - public com.google.cloud.securitycenter.v1.Contact.Builder addContactsBuilder() { - return getContactsFieldBuilder().addBuilder( - com.google.cloud.securitycenter.v1.Contact.getDefaultInstance()); - } - /** - *
-     * A list of contacts
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; - */ - public com.google.cloud.securitycenter.v1.Contact.Builder addContactsBuilder( - int index) { - return getContactsFieldBuilder().addBuilder( - index, com.google.cloud.securitycenter.v1.Contact.getDefaultInstance()); - } - /** - *
-     * A list of contacts
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; - */ - public java.util.List - getContactsBuilderList() { - return getContactsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Contact, com.google.cloud.securitycenter.v1.Contact.Builder, com.google.cloud.securitycenter.v1.ContactOrBuilder> - getContactsFieldBuilder() { - if (contactsBuilder_ == null) { - contactsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Contact, com.google.cloud.securitycenter.v1.Contact.Builder, com.google.cloud.securitycenter.v1.ContactOrBuilder>( - contacts_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - contacts_ = null; - } - return contactsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.ContactDetails) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.ContactDetails) - private static final com.google.cloud.securitycenter.v1.ContactDetails DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.ContactDetails(); - } - - public static com.google.cloud.securitycenter.v1.ContactDetails getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ContactDetails parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ContactDetails(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.ContactDetails getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContactDetailsOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContactDetailsOrBuilder.java deleted file mode 100644 index a8758c422820..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContactDetailsOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/contact_details.proto - -package com.google.cloud.securitycenter.v1; - -public interface ContactDetailsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.ContactDetails) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A list of contacts
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; - */ - java.util.List - getContactsList(); - /** - *
-   * A list of contacts
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; - */ - com.google.cloud.securitycenter.v1.Contact getContacts(int index); - /** - *
-   * A list of contacts
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; - */ - int getContactsCount(); - /** - *
-   * A list of contacts
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; - */ - java.util.List - getContactsOrBuilderList(); - /** - *
-   * A list of contacts
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; - */ - com.google.cloud.securitycenter.v1.ContactOrBuilder getContactsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContactDetailsProto.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContactDetailsProto.java deleted file mode 100644 index 05974b13cd0b..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContactDetailsProto.java +++ /dev/null @@ -1,67 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/contact_details.proto - -package com.google.cloud.securitycenter.v1; - -public final class ContactDetailsProto { - private ContactDetailsProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_ContactDetails_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_ContactDetails_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_Contact_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_Contact_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n4google/cloud/securitycenter/v1/contact" + - "_details.proto\022\036google.cloud.securitycen" + - "ter.v1\"K\n\016ContactDetails\0229\n\010contacts\030\001 \003" + - "(\0132\'.google.cloud.securitycenter.v1.Cont" + - "act\"\030\n\007Contact\022\r\n\005email\030\001 \001(\tB\357\001\n\"com.go" + - "ogle.cloud.securitycenter.v1B\023ContactDet" + - "ailsProtoP\001ZLgoogle.golang.org/genproto/" + - "googleapis/cloud/securitycenter/v1;secur" + - "itycenter\252\002\036Google.Cloud.SecurityCenter." + - "V1\312\002\036Google\\Cloud\\SecurityCenter\\V1\352\002!Go" + - "ogle::Cloud::SecurityCenter::V1b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_google_cloud_securitycenter_v1_ContactDetails_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_securitycenter_v1_ContactDetails_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_ContactDetails_descriptor, - new java.lang.String[] { "Contacts", }); - internal_static_google_cloud_securitycenter_v1_Contact_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_securitycenter_v1_Contact_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_Contact_descriptor, - new java.lang.String[] { "Email", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContactOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContactOrBuilder.java deleted file mode 100644 index fab422a72568..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContactOrBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/contact_details.proto - -package com.google.cloud.securitycenter.v1; - -public interface ContactOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Contact) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * An email address e.g. "person123@company.com"
-   * 
- * - * string email = 1; - * @return The email. - */ - java.lang.String getEmail(); - /** - *
-   * An email address e.g. "person123@company.com"
-   * 
- * - * string email = 1; - * @return The bytes for email. - */ - com.google.protobuf.ByteString - getEmailBytes(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Container.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Container.java deleted file mode 100644 index fe68f444470a..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Container.java +++ /dev/null @@ -1,1391 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/container.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Container associated with the finding.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Container} - */ -public final class Container extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Container) - ContainerOrBuilder { -private static final long serialVersionUID = 0L; - // Use Container.newBuilder() to construct. - private Container(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Container() { - name_ = ""; - uri_ = ""; - imageId_ = ""; - labels_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Container(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Container( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - uri_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - imageId_ = s; - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - labels_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - labels_.add( - input.readMessage(com.google.cloud.securitycenter.v1.Label.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - labels_ = java.util.Collections.unmodifiableList(labels_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.ContainerProto.internal_static_google_cloud_securitycenter_v1_Container_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.ContainerProto.internal_static_google_cloud_securitycenter_v1_Container_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Container.class, com.google.cloud.securitycenter.v1.Container.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Container name.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Container name.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int URI_FIELD_NUMBER = 2; - private volatile java.lang.Object uri_; - /** - *
-   * Container image URI provided when configuring a pod/container.
-   * May identify a container image version using mutable tags.
-   * 
- * - * string uri = 2; - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } - } - /** - *
-   * Container image URI provided when configuring a pod/container.
-   * May identify a container image version using mutable tags.
-   * 
- * - * string uri = 2; - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int IMAGE_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object imageId_; - /** - *
-   * Optional container image id, when provided by the container runtime.
-   * Uniquely identifies the container image launched using a container image
-   * digest.
-   * 
- * - * string image_id = 3; - * @return The imageId. - */ - @java.lang.Override - public java.lang.String getImageId() { - java.lang.Object ref = imageId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - imageId_ = s; - return s; - } - } - /** - *
-   * Optional container image id, when provided by the container runtime.
-   * Uniquely identifies the container image launched using a container image
-   * digest.
-   * 
- * - * string image_id = 3; - * @return The bytes for imageId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getImageIdBytes() { - java.lang.Object ref = imageId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - imageId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LABELS_FIELD_NUMBER = 4; - private java.util.List labels_; - /** - *
-   * Container labels, as provided by the container runtime.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 4; - */ - @java.lang.Override - public java.util.List getLabelsList() { - return labels_; - } - /** - *
-   * Container labels, as provided by the container runtime.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 4; - */ - @java.lang.Override - public java.util.List - getLabelsOrBuilderList() { - return labels_; - } - /** - *
-   * Container labels, as provided by the container runtime.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 4; - */ - @java.lang.Override - public int getLabelsCount() { - return labels_.size(); - } - /** - *
-   * Container labels, as provided by the container runtime.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 4; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Label getLabels(int index) { - return labels_.get(index); - } - /** - *
-   * Container labels, as provided by the container runtime.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 4; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.LabelOrBuilder getLabelsOrBuilder( - int index) { - return labels_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, imageId_); - } - for (int i = 0; i < labels_.size(); i++) { - output.writeMessage(4, labels_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, imageId_); - } - for (int i = 0; i < labels_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, labels_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.Container)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.Container other = (com.google.cloud.securitycenter.v1.Container) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getUri() - .equals(other.getUri())) return false; - if (!getImageId() - .equals(other.getImageId())) return false; - if (!getLabelsList() - .equals(other.getLabelsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - hash = (37 * hash) + IMAGE_ID_FIELD_NUMBER; - hash = (53 * hash) + getImageId().hashCode(); - if (getLabelsCount() > 0) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + getLabelsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.Container parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Container parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Container parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Container parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Container parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Container parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Container parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Container parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Container parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Container parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Container parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Container parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.Container prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Container associated with the finding.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Container} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Container) - com.google.cloud.securitycenter.v1.ContainerOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.ContainerProto.internal_static_google_cloud_securitycenter_v1_Container_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.ContainerProto.internal_static_google_cloud_securitycenter_v1_Container_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Container.class, com.google.cloud.securitycenter.v1.Container.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.Container.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getLabelsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - uri_ = ""; - - imageId_ = ""; - - if (labelsBuilder_ == null) { - labels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - labelsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.ContainerProto.internal_static_google_cloud_securitycenter_v1_Container_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Container getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.Container.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Container build() { - com.google.cloud.securitycenter.v1.Container result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Container buildPartial() { - com.google.cloud.securitycenter.v1.Container result = new com.google.cloud.securitycenter.v1.Container(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.uri_ = uri_; - result.imageId_ = imageId_; - if (labelsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - labels_ = java.util.Collections.unmodifiableList(labels_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.labels_ = labels_; - } else { - result.labels_ = labelsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.Container) { - return mergeFrom((com.google.cloud.securitycenter.v1.Container)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.Container other) { - if (other == com.google.cloud.securitycenter.v1.Container.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - onChanged(); - } - if (!other.getImageId().isEmpty()) { - imageId_ = other.imageId_; - onChanged(); - } - if (labelsBuilder_ == null) { - if (!other.labels_.isEmpty()) { - if (labels_.isEmpty()) { - labels_ = other.labels_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureLabelsIsMutable(); - labels_.addAll(other.labels_); - } - onChanged(); - } - } else { - if (!other.labels_.isEmpty()) { - if (labelsBuilder_.isEmpty()) { - labelsBuilder_.dispose(); - labelsBuilder_ = null; - labels_ = other.labels_; - bitField0_ = (bitField0_ & ~0x00000001); - labelsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLabelsFieldBuilder() : null; - } else { - labelsBuilder_.addAllMessages(other.labels_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.Container parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.Container) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * Container name.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Container name.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Container name.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Container name.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Container name.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object uri_ = ""; - /** - *
-     * Container image URI provided when configuring a pod/container.
-     * May identify a container image version using mutable tags.
-     * 
- * - * string uri = 2; - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Container image URI provided when configuring a pod/container.
-     * May identify a container image version using mutable tags.
-     * 
- * - * string uri = 2; - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Container image URI provided when configuring a pod/container.
-     * May identify a container image version using mutable tags.
-     * 
- * - * string uri = 2; - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - uri_ = value; - onChanged(); - return this; - } - /** - *
-     * Container image URI provided when configuring a pod/container.
-     * May identify a container image version using mutable tags.
-     * 
- * - * string uri = 2; - * @return This builder for chaining. - */ - public Builder clearUri() { - - uri_ = getDefaultInstance().getUri(); - onChanged(); - return this; - } - /** - *
-     * Container image URI provided when configuring a pod/container.
-     * May identify a container image version using mutable tags.
-     * 
- * - * string uri = 2; - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - uri_ = value; - onChanged(); - return this; - } - - private java.lang.Object imageId_ = ""; - /** - *
-     * Optional container image id, when provided by the container runtime.
-     * Uniquely identifies the container image launched using a container image
-     * digest.
-     * 
- * - * string image_id = 3; - * @return The imageId. - */ - public java.lang.String getImageId() { - java.lang.Object ref = imageId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - imageId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Optional container image id, when provided by the container runtime.
-     * Uniquely identifies the container image launched using a container image
-     * digest.
-     * 
- * - * string image_id = 3; - * @return The bytes for imageId. - */ - public com.google.protobuf.ByteString - getImageIdBytes() { - java.lang.Object ref = imageId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - imageId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Optional container image id, when provided by the container runtime.
-     * Uniquely identifies the container image launched using a container image
-     * digest.
-     * 
- * - * string image_id = 3; - * @param value The imageId to set. - * @return This builder for chaining. - */ - public Builder setImageId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - imageId_ = value; - onChanged(); - return this; - } - /** - *
-     * Optional container image id, when provided by the container runtime.
-     * Uniquely identifies the container image launched using a container image
-     * digest.
-     * 
- * - * string image_id = 3; - * @return This builder for chaining. - */ - public Builder clearImageId() { - - imageId_ = getDefaultInstance().getImageId(); - onChanged(); - return this; - } - /** - *
-     * Optional container image id, when provided by the container runtime.
-     * Uniquely identifies the container image launched using a container image
-     * digest.
-     * 
- * - * string image_id = 3; - * @param value The bytes for imageId to set. - * @return This builder for chaining. - */ - public Builder setImageIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - imageId_ = value; - onChanged(); - return this; - } - - private java.util.List labels_ = - java.util.Collections.emptyList(); - private void ensureLabelsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - labels_ = new java.util.ArrayList(labels_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Label, com.google.cloud.securitycenter.v1.Label.Builder, com.google.cloud.securitycenter.v1.LabelOrBuilder> labelsBuilder_; - - /** - *
-     * Container labels, as provided by the container runtime.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 4; - */ - public java.util.List getLabelsList() { - if (labelsBuilder_ == null) { - return java.util.Collections.unmodifiableList(labels_); - } else { - return labelsBuilder_.getMessageList(); - } - } - /** - *
-     * Container labels, as provided by the container runtime.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 4; - */ - public int getLabelsCount() { - if (labelsBuilder_ == null) { - return labels_.size(); - } else { - return labelsBuilder_.getCount(); - } - } - /** - *
-     * Container labels, as provided by the container runtime.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 4; - */ - public com.google.cloud.securitycenter.v1.Label getLabels(int index) { - if (labelsBuilder_ == null) { - return labels_.get(index); - } else { - return labelsBuilder_.getMessage(index); - } - } - /** - *
-     * Container labels, as provided by the container runtime.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 4; - */ - public Builder setLabels( - int index, com.google.cloud.securitycenter.v1.Label value) { - if (labelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelsIsMutable(); - labels_.set(index, value); - onChanged(); - } else { - labelsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Container labels, as provided by the container runtime.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 4; - */ - public Builder setLabels( - int index, com.google.cloud.securitycenter.v1.Label.Builder builderForValue) { - if (labelsBuilder_ == null) { - ensureLabelsIsMutable(); - labels_.set(index, builderForValue.build()); - onChanged(); - } else { - labelsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Container labels, as provided by the container runtime.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 4; - */ - public Builder addLabels(com.google.cloud.securitycenter.v1.Label value) { - if (labelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelsIsMutable(); - labels_.add(value); - onChanged(); - } else { - labelsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Container labels, as provided by the container runtime.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 4; - */ - public Builder addLabels( - int index, com.google.cloud.securitycenter.v1.Label value) { - if (labelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelsIsMutable(); - labels_.add(index, value); - onChanged(); - } else { - labelsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Container labels, as provided by the container runtime.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 4; - */ - public Builder addLabels( - com.google.cloud.securitycenter.v1.Label.Builder builderForValue) { - if (labelsBuilder_ == null) { - ensureLabelsIsMutable(); - labels_.add(builderForValue.build()); - onChanged(); - } else { - labelsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Container labels, as provided by the container runtime.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 4; - */ - public Builder addLabels( - int index, com.google.cloud.securitycenter.v1.Label.Builder builderForValue) { - if (labelsBuilder_ == null) { - ensureLabelsIsMutable(); - labels_.add(index, builderForValue.build()); - onChanged(); - } else { - labelsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Container labels, as provided by the container runtime.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 4; - */ - public Builder addAllLabels( - java.lang.Iterable values) { - if (labelsBuilder_ == null) { - ensureLabelsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, labels_); - onChanged(); - } else { - labelsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Container labels, as provided by the container runtime.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 4; - */ - public Builder clearLabels() { - if (labelsBuilder_ == null) { - labels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - labelsBuilder_.clear(); - } - return this; - } - /** - *
-     * Container labels, as provided by the container runtime.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 4; - */ - public Builder removeLabels(int index) { - if (labelsBuilder_ == null) { - ensureLabelsIsMutable(); - labels_.remove(index); - onChanged(); - } else { - labelsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Container labels, as provided by the container runtime.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 4; - */ - public com.google.cloud.securitycenter.v1.Label.Builder getLabelsBuilder( - int index) { - return getLabelsFieldBuilder().getBuilder(index); - } - /** - *
-     * Container labels, as provided by the container runtime.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 4; - */ - public com.google.cloud.securitycenter.v1.LabelOrBuilder getLabelsOrBuilder( - int index) { - if (labelsBuilder_ == null) { - return labels_.get(index); } else { - return labelsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Container labels, as provided by the container runtime.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 4; - */ - public java.util.List - getLabelsOrBuilderList() { - if (labelsBuilder_ != null) { - return labelsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(labels_); - } - } - /** - *
-     * Container labels, as provided by the container runtime.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 4; - */ - public com.google.cloud.securitycenter.v1.Label.Builder addLabelsBuilder() { - return getLabelsFieldBuilder().addBuilder( - com.google.cloud.securitycenter.v1.Label.getDefaultInstance()); - } - /** - *
-     * Container labels, as provided by the container runtime.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 4; - */ - public com.google.cloud.securitycenter.v1.Label.Builder addLabelsBuilder( - int index) { - return getLabelsFieldBuilder().addBuilder( - index, com.google.cloud.securitycenter.v1.Label.getDefaultInstance()); - } - /** - *
-     * Container labels, as provided by the container runtime.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 4; - */ - public java.util.List - getLabelsBuilderList() { - return getLabelsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Label, com.google.cloud.securitycenter.v1.Label.Builder, com.google.cloud.securitycenter.v1.LabelOrBuilder> - getLabelsFieldBuilder() { - if (labelsBuilder_ == null) { - labelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Label, com.google.cloud.securitycenter.v1.Label.Builder, com.google.cloud.securitycenter.v1.LabelOrBuilder>( - labels_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - labels_ = null; - } - return labelsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Container) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Container) - private static final com.google.cloud.securitycenter.v1.Container DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Container(); - } - - public static com.google.cloud.securitycenter.v1.Container getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Container parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Container(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Container getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContainerOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContainerOrBuilder.java deleted file mode 100644 index 496b571fdc8e..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContainerOrBuilder.java +++ /dev/null @@ -1,119 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/container.proto - -package com.google.cloud.securitycenter.v1; - -public interface ContainerOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Container) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Container name.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Container name.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Container image URI provided when configuring a pod/container.
-   * May identify a container image version using mutable tags.
-   * 
- * - * string uri = 2; - * @return The uri. - */ - java.lang.String getUri(); - /** - *
-   * Container image URI provided when configuring a pod/container.
-   * May identify a container image version using mutable tags.
-   * 
- * - * string uri = 2; - * @return The bytes for uri. - */ - com.google.protobuf.ByteString - getUriBytes(); - - /** - *
-   * Optional container image id, when provided by the container runtime.
-   * Uniquely identifies the container image launched using a container image
-   * digest.
-   * 
- * - * string image_id = 3; - * @return The imageId. - */ - java.lang.String getImageId(); - /** - *
-   * Optional container image id, when provided by the container runtime.
-   * Uniquely identifies the container image launched using a container image
-   * digest.
-   * 
- * - * string image_id = 3; - * @return The bytes for imageId. - */ - com.google.protobuf.ByteString - getImageIdBytes(); - - /** - *
-   * Container labels, as provided by the container runtime.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 4; - */ - java.util.List - getLabelsList(); - /** - *
-   * Container labels, as provided by the container runtime.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 4; - */ - com.google.cloud.securitycenter.v1.Label getLabels(int index); - /** - *
-   * Container labels, as provided by the container runtime.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 4; - */ - int getLabelsCount(); - /** - *
-   * Container labels, as provided by the container runtime.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 4; - */ - java.util.List - getLabelsOrBuilderList(); - /** - *
-   * Container labels, as provided by the container runtime.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 4; - */ - com.google.cloud.securitycenter.v1.LabelOrBuilder getLabelsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContainerProto.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContainerProto.java deleted file mode 100644 index 223e319f3e0d..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContainerProto.java +++ /dev/null @@ -1,60 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/container.proto - -package com.google.cloud.securitycenter.v1; - -public final class ContainerProto { - private ContainerProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_Container_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_Container_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n.google/cloud/securitycenter/v1/contain" + - "er.proto\022\036google.cloud.securitycenter.v1" + - "\032*google/cloud/securitycenter/v1/label.p" + - "roto\"o\n\tContainer\022\014\n\004name\030\001 \001(\t\022\013\n\003uri\030\002" + - " \001(\t\022\020\n\010image_id\030\003 \001(\t\0225\n\006labels\030\004 \003(\0132%" + - ".google.cloud.securitycenter.v1.LabelB\352\001" + - "\n\"com.google.cloud.securitycenter.v1B\016Co" + - "ntainerProtoP\001ZLgoogle.golang.org/genpro" + - "to/googleapis/cloud/securitycenter/v1;se" + - "curitycenter\252\002\036Google.Cloud.SecurityCent" + - "er.V1\312\002\036Google\\Cloud\\SecurityCenter\\V1\352\002" + - "!Google::Cloud::SecurityCenter::V1b\006prot" + - "o3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.cloud.securitycenter.v1.LabelProto.getDescriptor(), - }); - internal_static_google_cloud_securitycenter_v1_Container_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_securitycenter_v1_Container_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_Container_descriptor, - new java.lang.String[] { "Name", "Uri", "ImageId", "Labels", }); - com.google.cloud.securitycenter.v1.LabelProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateBigQueryExportRequest.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateBigQueryExportRequest.java deleted file mode 100644 index 50d3a1894d3e..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateBigQueryExportRequest.java +++ /dev/null @@ -1,1032 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Request message for creating a big query export.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.CreateBigQueryExportRequest} - */ -public final class CreateBigQueryExportRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.CreateBigQueryExportRequest) - CreateBigQueryExportRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateBigQueryExportRequest.newBuilder() to construct. - private CreateBigQueryExportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateBigQueryExportRequest() { - parent_ = ""; - bigQueryExportId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateBigQueryExportRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateBigQueryExportRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.cloud.securitycenter.v1.BigQueryExport.Builder subBuilder = null; - if (bigQueryExport_ != null) { - subBuilder = bigQueryExport_.toBuilder(); - } - bigQueryExport_ = input.readMessage(com.google.cloud.securitycenter.v1.BigQueryExport.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(bigQueryExport_); - bigQueryExport_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - bigQueryExportId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_CreateBigQueryExportRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_CreateBigQueryExportRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest.class, com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. Resource name of the new big query export's parent. Its format is
-   * "organizations/[organization_id]", "folders/[folder_id]", or
-   * "projects/[project_id]".
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the new big query export's parent. Its format is
-   * "organizations/[organization_id]", "folders/[folder_id]", or
-   * "projects/[project_id]".
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BIG_QUERY_EXPORT_FIELD_NUMBER = 2; - private com.google.cloud.securitycenter.v1.BigQueryExport bigQueryExport_; - /** - *
-   * Required. The big query export being created.
-   * 
- * - * .google.cloud.securitycenter.v1.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the bigQueryExport field is set. - */ - @java.lang.Override - public boolean hasBigQueryExport() { - return bigQueryExport_ != null; - } - /** - *
-   * Required. The big query export being created.
-   * 
- * - * .google.cloud.securitycenter.v1.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bigQueryExport. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.BigQueryExport getBigQueryExport() { - return bigQueryExport_ == null ? com.google.cloud.securitycenter.v1.BigQueryExport.getDefaultInstance() : bigQueryExport_; - } - /** - *
-   * Required. The big query export being created.
-   * 
- * - * .google.cloud.securitycenter.v1.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.BigQueryExportOrBuilder getBigQueryExportOrBuilder() { - return getBigQueryExport(); - } - - public static final int BIG_QUERY_EXPORT_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object bigQueryExportId_; - /** - *
-   * Required. Unique identifier provided by the client within the parent scope.
-   * It must consist of lower case letters, numbers, and hyphen, with the first
-   * character a letter, the last a letter or a number, and a 63 character
-   * maximum.
-   * 
- * - * string big_query_export_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bigQueryExportId. - */ - @java.lang.Override - public java.lang.String getBigQueryExportId() { - java.lang.Object ref = bigQueryExportId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - bigQueryExportId_ = s; - return s; - } - } - /** - *
-   * Required. Unique identifier provided by the client within the parent scope.
-   * It must consist of lower case letters, numbers, and hyphen, with the first
-   * character a letter, the last a letter or a number, and a 63 character
-   * maximum.
-   * 
- * - * string big_query_export_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for bigQueryExportId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getBigQueryExportIdBytes() { - java.lang.Object ref = bigQueryExportId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - bigQueryExportId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (bigQueryExport_ != null) { - output.writeMessage(2, getBigQueryExport()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bigQueryExportId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, bigQueryExportId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (bigQueryExport_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getBigQueryExport()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bigQueryExportId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, bigQueryExportId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest other = (com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasBigQueryExport() != other.hasBigQueryExport()) return false; - if (hasBigQueryExport()) { - if (!getBigQueryExport() - .equals(other.getBigQueryExport())) return false; - } - if (!getBigQueryExportId() - .equals(other.getBigQueryExportId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasBigQueryExport()) { - hash = (37 * hash) + BIG_QUERY_EXPORT_FIELD_NUMBER; - hash = (53 * hash) + getBigQueryExport().hashCode(); - } - hash = (37 * hash) + BIG_QUERY_EXPORT_ID_FIELD_NUMBER; - hash = (53 * hash) + getBigQueryExportId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for creating a big query export.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.CreateBigQueryExportRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.CreateBigQueryExportRequest) - com.google.cloud.securitycenter.v1.CreateBigQueryExportRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_CreateBigQueryExportRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_CreateBigQueryExportRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest.class, com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (bigQueryExportBuilder_ == null) { - bigQueryExport_ = null; - } else { - bigQueryExport_ = null; - bigQueryExportBuilder_ = null; - } - bigQueryExportId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_CreateBigQueryExportRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest build() { - com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest buildPartial() { - com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest result = new com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest(this); - result.parent_ = parent_; - if (bigQueryExportBuilder_ == null) { - result.bigQueryExport_ = bigQueryExport_; - } else { - result.bigQueryExport_ = bigQueryExportBuilder_.build(); - } - result.bigQueryExportId_ = bigQueryExportId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest) { - return mergeFrom((com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest other) { - if (other == com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasBigQueryExport()) { - mergeBigQueryExport(other.getBigQueryExport()); - } - if (!other.getBigQueryExportId().isEmpty()) { - bigQueryExportId_ = other.bigQueryExportId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. Resource name of the new big query export's parent. Its format is
-     * "organizations/[organization_id]", "folders/[folder_id]", or
-     * "projects/[project_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the new big query export's parent. Its format is
-     * "organizations/[organization_id]", "folders/[folder_id]", or
-     * "projects/[project_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the new big query export's parent. Its format is
-     * "organizations/[organization_id]", "folders/[folder_id]", or
-     * "projects/[project_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the new big query export's parent. Its format is
-     * "organizations/[organization_id]", "folders/[folder_id]", or
-     * "projects/[project_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the new big query export's parent. Its format is
-     * "organizations/[organization_id]", "folders/[folder_id]", or
-     * "projects/[project_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.cloud.securitycenter.v1.BigQueryExport bigQueryExport_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.BigQueryExport, com.google.cloud.securitycenter.v1.BigQueryExport.Builder, com.google.cloud.securitycenter.v1.BigQueryExportOrBuilder> bigQueryExportBuilder_; - /** - *
-     * Required. The big query export being created.
-     * 
- * - * .google.cloud.securitycenter.v1.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the bigQueryExport field is set. - */ - public boolean hasBigQueryExport() { - return bigQueryExportBuilder_ != null || bigQueryExport_ != null; - } - /** - *
-     * Required. The big query export being created.
-     * 
- * - * .google.cloud.securitycenter.v1.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bigQueryExport. - */ - public com.google.cloud.securitycenter.v1.BigQueryExport getBigQueryExport() { - if (bigQueryExportBuilder_ == null) { - return bigQueryExport_ == null ? com.google.cloud.securitycenter.v1.BigQueryExport.getDefaultInstance() : bigQueryExport_; - } else { - return bigQueryExportBuilder_.getMessage(); - } - } - /** - *
-     * Required. The big query export being created.
-     * 
- * - * .google.cloud.securitycenter.v1.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setBigQueryExport(com.google.cloud.securitycenter.v1.BigQueryExport value) { - if (bigQueryExportBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - bigQueryExport_ = value; - onChanged(); - } else { - bigQueryExportBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The big query export being created.
-     * 
- * - * .google.cloud.securitycenter.v1.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setBigQueryExport( - com.google.cloud.securitycenter.v1.BigQueryExport.Builder builderForValue) { - if (bigQueryExportBuilder_ == null) { - bigQueryExport_ = builderForValue.build(); - onChanged(); - } else { - bigQueryExportBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The big query export being created.
-     * 
- * - * .google.cloud.securitycenter.v1.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeBigQueryExport(com.google.cloud.securitycenter.v1.BigQueryExport value) { - if (bigQueryExportBuilder_ == null) { - if (bigQueryExport_ != null) { - bigQueryExport_ = - com.google.cloud.securitycenter.v1.BigQueryExport.newBuilder(bigQueryExport_).mergeFrom(value).buildPartial(); - } else { - bigQueryExport_ = value; - } - onChanged(); - } else { - bigQueryExportBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The big query export being created.
-     * 
- * - * .google.cloud.securitycenter.v1.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearBigQueryExport() { - if (bigQueryExportBuilder_ == null) { - bigQueryExport_ = null; - onChanged(); - } else { - bigQueryExport_ = null; - bigQueryExportBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The big query export being created.
-     * 
- * - * .google.cloud.securitycenter.v1.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.securitycenter.v1.BigQueryExport.Builder getBigQueryExportBuilder() { - - onChanged(); - return getBigQueryExportFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The big query export being created.
-     * 
- * - * .google.cloud.securitycenter.v1.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.securitycenter.v1.BigQueryExportOrBuilder getBigQueryExportOrBuilder() { - if (bigQueryExportBuilder_ != null) { - return bigQueryExportBuilder_.getMessageOrBuilder(); - } else { - return bigQueryExport_ == null ? - com.google.cloud.securitycenter.v1.BigQueryExport.getDefaultInstance() : bigQueryExport_; - } - } - /** - *
-     * Required. The big query export being created.
-     * 
- * - * .google.cloud.securitycenter.v1.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.BigQueryExport, com.google.cloud.securitycenter.v1.BigQueryExport.Builder, com.google.cloud.securitycenter.v1.BigQueryExportOrBuilder> - getBigQueryExportFieldBuilder() { - if (bigQueryExportBuilder_ == null) { - bigQueryExportBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.BigQueryExport, com.google.cloud.securitycenter.v1.BigQueryExport.Builder, com.google.cloud.securitycenter.v1.BigQueryExportOrBuilder>( - getBigQueryExport(), - getParentForChildren(), - isClean()); - bigQueryExport_ = null; - } - return bigQueryExportBuilder_; - } - - private java.lang.Object bigQueryExportId_ = ""; - /** - *
-     * Required. Unique identifier provided by the client within the parent scope.
-     * It must consist of lower case letters, numbers, and hyphen, with the first
-     * character a letter, the last a letter or a number, and a 63 character
-     * maximum.
-     * 
- * - * string big_query_export_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bigQueryExportId. - */ - public java.lang.String getBigQueryExportId() { - java.lang.Object ref = bigQueryExportId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - bigQueryExportId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Unique identifier provided by the client within the parent scope.
-     * It must consist of lower case letters, numbers, and hyphen, with the first
-     * character a letter, the last a letter or a number, and a 63 character
-     * maximum.
-     * 
- * - * string big_query_export_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for bigQueryExportId. - */ - public com.google.protobuf.ByteString - getBigQueryExportIdBytes() { - java.lang.Object ref = bigQueryExportId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - bigQueryExportId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Unique identifier provided by the client within the parent scope.
-     * It must consist of lower case letters, numbers, and hyphen, with the first
-     * character a letter, the last a letter or a number, and a 63 character
-     * maximum.
-     * 
- * - * string big_query_export_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bigQueryExportId to set. - * @return This builder for chaining. - */ - public Builder setBigQueryExportId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - bigQueryExportId_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Unique identifier provided by the client within the parent scope.
-     * It must consist of lower case letters, numbers, and hyphen, with the first
-     * character a letter, the last a letter or a number, and a 63 character
-     * maximum.
-     * 
- * - * string big_query_export_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearBigQueryExportId() { - - bigQueryExportId_ = getDefaultInstance().getBigQueryExportId(); - onChanged(); - return this; - } - /** - *
-     * Required. Unique identifier provided by the client within the parent scope.
-     * It must consist of lower case letters, numbers, and hyphen, with the first
-     * character a letter, the last a letter or a number, and a 63 character
-     * maximum.
-     * 
- * - * string big_query_export_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for bigQueryExportId to set. - * @return This builder for chaining. - */ - public Builder setBigQueryExportIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - bigQueryExportId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.CreateBigQueryExportRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.CreateBigQueryExportRequest) - private static final com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest(); - } - - public static com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateBigQueryExportRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateBigQueryExportRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.CreateBigQueryExportRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateBigQueryExportRequestOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateBigQueryExportRequestOrBuilder.java deleted file mode 100644 index 3f272247cea1..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateBigQueryExportRequestOrBuilder.java +++ /dev/null @@ -1,86 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -public interface CreateBigQueryExportRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.CreateBigQueryExportRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the new big query export's parent. Its format is
-   * "organizations/[organization_id]", "folders/[folder_id]", or
-   * "projects/[project_id]".
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. Resource name of the new big query export's parent. Its format is
-   * "organizations/[organization_id]", "folders/[folder_id]", or
-   * "projects/[project_id]".
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. The big query export being created.
-   * 
- * - * .google.cloud.securitycenter.v1.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the bigQueryExport field is set. - */ - boolean hasBigQueryExport(); - /** - *
-   * Required. The big query export being created.
-   * 
- * - * .google.cloud.securitycenter.v1.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bigQueryExport. - */ - com.google.cloud.securitycenter.v1.BigQueryExport getBigQueryExport(); - /** - *
-   * Required. The big query export being created.
-   * 
- * - * .google.cloud.securitycenter.v1.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.securitycenter.v1.BigQueryExportOrBuilder getBigQueryExportOrBuilder(); - - /** - *
-   * Required. Unique identifier provided by the client within the parent scope.
-   * It must consist of lower case letters, numbers, and hyphen, with the first
-   * character a letter, the last a letter or a number, and a 63 character
-   * maximum.
-   * 
- * - * string big_query_export_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bigQueryExportId. - */ - java.lang.String getBigQueryExportId(); - /** - *
-   * Required. Unique identifier provided by the client within the parent scope.
-   * It must consist of lower case letters, numbers, and hyphen, with the first
-   * character a letter, the last a letter or a number, and a 63 character
-   * maximum.
-   * 
- * - * string big_query_export_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for bigQueryExportId. - */ - com.google.protobuf.ByteString - getBigQueryExportIdBytes(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateFindingRequest.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateFindingRequest.java deleted file mode 100644 index ec857615f4ed..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateFindingRequest.java +++ /dev/null @@ -1,1030 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Request message for creating a finding.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.CreateFindingRequest} - */ -public final class CreateFindingRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.CreateFindingRequest) - CreateFindingRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateFindingRequest.newBuilder() to construct. - private CreateFindingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateFindingRequest() { - parent_ = ""; - findingId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateFindingRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateFindingRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - findingId_ = s; - break; - } - case 26: { - com.google.cloud.securitycenter.v1.Finding.Builder subBuilder = null; - if (finding_ != null) { - subBuilder = finding_.toBuilder(); - } - finding_ = input.readMessage(com.google.cloud.securitycenter.v1.Finding.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(finding_); - finding_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_CreateFindingRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_CreateFindingRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.CreateFindingRequest.class, com.google.cloud.securitycenter.v1.CreateFindingRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. Resource name of the new finding's parent. Its format should be
-   * "organizations/[organization_id]/sources/[source_id]".
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the new finding's parent. Its format should be
-   * "organizations/[organization_id]/sources/[source_id]".
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FINDING_ID_FIELD_NUMBER = 2; - private volatile java.lang.Object 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.
-   * 
- * - * string finding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The findingId. - */ - @java.lang.Override - public java.lang.String getFindingId() { - java.lang.Object ref = findingId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - findingId_ = s; - return s; - } - } - /** - *
-   * 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.
-   * 
- * - * string finding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for findingId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFindingIdBytes() { - java.lang.Object ref = findingId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - findingId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FINDING_FIELD_NUMBER = 3; - private com.google.cloud.securitycenter.v1.Finding finding_; - /** - *
-   * Required. The Finding being created. The name and security_marks will be ignored as
-   * they are both output only fields on this resource.
-   * 
- * - * .google.cloud.securitycenter.v1.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the finding field is set. - */ - @java.lang.Override - public boolean hasFinding() { - return finding_ != null; - } - /** - *
-   * Required. The Finding being created. The name and security_marks will be ignored as
-   * they are both output only fields on this resource.
-   * 
- * - * .google.cloud.securitycenter.v1.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The finding. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Finding getFinding() { - return finding_ == null ? com.google.cloud.securitycenter.v1.Finding.getDefaultInstance() : finding_; - } - /** - *
-   * Required. The Finding being created. The name and security_marks will be ignored as
-   * they are both output only fields on this resource.
-   * 
- * - * .google.cloud.securitycenter.v1.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.FindingOrBuilder getFindingOrBuilder() { - return getFinding(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(findingId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, findingId_); - } - if (finding_ != null) { - output.writeMessage(3, getFinding()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(findingId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, findingId_); - } - if (finding_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getFinding()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.CreateFindingRequest)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.CreateFindingRequest other = (com.google.cloud.securitycenter.v1.CreateFindingRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!getFindingId() - .equals(other.getFindingId())) return false; - if (hasFinding() != other.hasFinding()) return false; - if (hasFinding()) { - if (!getFinding() - .equals(other.getFinding())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + FINDING_ID_FIELD_NUMBER; - hash = (53 * hash) + getFindingId().hashCode(); - if (hasFinding()) { - hash = (37 * hash) + FINDING_FIELD_NUMBER; - hash = (53 * hash) + getFinding().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.CreateFindingRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.CreateFindingRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.CreateFindingRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.CreateFindingRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.CreateFindingRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.CreateFindingRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.CreateFindingRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.CreateFindingRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.CreateFindingRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.CreateFindingRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.CreateFindingRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.CreateFindingRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.CreateFindingRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for creating a finding.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.CreateFindingRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.CreateFindingRequest) - com.google.cloud.securitycenter.v1.CreateFindingRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_CreateFindingRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_CreateFindingRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.CreateFindingRequest.class, com.google.cloud.securitycenter.v1.CreateFindingRequest.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.CreateFindingRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - findingId_ = ""; - - if (findingBuilder_ == null) { - finding_ = null; - } else { - finding_ = null; - findingBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_CreateFindingRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.CreateFindingRequest getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.CreateFindingRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.CreateFindingRequest build() { - com.google.cloud.securitycenter.v1.CreateFindingRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.CreateFindingRequest buildPartial() { - com.google.cloud.securitycenter.v1.CreateFindingRequest result = new com.google.cloud.securitycenter.v1.CreateFindingRequest(this); - result.parent_ = parent_; - result.findingId_ = findingId_; - if (findingBuilder_ == null) { - result.finding_ = finding_; - } else { - result.finding_ = findingBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.CreateFindingRequest) { - return mergeFrom((com.google.cloud.securitycenter.v1.CreateFindingRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.CreateFindingRequest other) { - if (other == com.google.cloud.securitycenter.v1.CreateFindingRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (!other.getFindingId().isEmpty()) { - findingId_ = other.findingId_; - onChanged(); - } - if (other.hasFinding()) { - mergeFinding(other.getFinding()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.CreateFindingRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.CreateFindingRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. Resource name of the new finding's parent. Its format should be
-     * "organizations/[organization_id]/sources/[source_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the new finding's parent. Its format should be
-     * "organizations/[organization_id]/sources/[source_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the new finding's parent. Its format should be
-     * "organizations/[organization_id]/sources/[source_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the new finding's parent. Its format should be
-     * "organizations/[organization_id]/sources/[source_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the new finding's parent. Its format should be
-     * "organizations/[organization_id]/sources/[source_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private java.lang.Object 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.
-     * 
- * - * string finding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The findingId. - */ - public java.lang.String getFindingId() { - java.lang.Object ref = findingId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - findingId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * 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.
-     * 
- * - * string finding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for findingId. - */ - public com.google.protobuf.ByteString - getFindingIdBytes() { - java.lang.Object ref = findingId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - findingId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * 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.
-     * 
- * - * string finding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The findingId to set. - * @return This builder for chaining. - */ - public Builder setFindingId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - findingId_ = value; - onChanged(); - return this; - } - /** - *
-     * 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.
-     * 
- * - * string finding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearFindingId() { - - findingId_ = getDefaultInstance().getFindingId(); - onChanged(); - return this; - } - /** - *
-     * 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.
-     * 
- * - * string finding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for findingId to set. - * @return This builder for chaining. - */ - public Builder setFindingIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - findingId_ = value; - onChanged(); - return this; - } - - private com.google.cloud.securitycenter.v1.Finding finding_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Finding, com.google.cloud.securitycenter.v1.Finding.Builder, com.google.cloud.securitycenter.v1.FindingOrBuilder> findingBuilder_; - /** - *
-     * Required. The Finding being created. The name and security_marks will be ignored as
-     * they are both output only fields on this resource.
-     * 
- * - * .google.cloud.securitycenter.v1.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the finding field is set. - */ - public boolean hasFinding() { - return findingBuilder_ != null || finding_ != null; - } - /** - *
-     * Required. The Finding being created. The name and security_marks will be ignored as
-     * they are both output only fields on this resource.
-     * 
- * - * .google.cloud.securitycenter.v1.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The finding. - */ - public com.google.cloud.securitycenter.v1.Finding getFinding() { - if (findingBuilder_ == null) { - return finding_ == null ? com.google.cloud.securitycenter.v1.Finding.getDefaultInstance() : finding_; - } else { - return findingBuilder_.getMessage(); - } - } - /** - *
-     * Required. The Finding being created. The name and security_marks will be ignored as
-     * they are both output only fields on this resource.
-     * 
- * - * .google.cloud.securitycenter.v1.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setFinding(com.google.cloud.securitycenter.v1.Finding value) { - if (findingBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - finding_ = value; - onChanged(); - } else { - findingBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The Finding being created. The name and security_marks will be ignored as
-     * they are both output only fields on this resource.
-     * 
- * - * .google.cloud.securitycenter.v1.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setFinding( - com.google.cloud.securitycenter.v1.Finding.Builder builderForValue) { - if (findingBuilder_ == null) { - finding_ = builderForValue.build(); - onChanged(); - } else { - findingBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The Finding being created. The name and security_marks will be ignored as
-     * they are both output only fields on this resource.
-     * 
- * - * .google.cloud.securitycenter.v1.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeFinding(com.google.cloud.securitycenter.v1.Finding value) { - if (findingBuilder_ == null) { - if (finding_ != null) { - finding_ = - com.google.cloud.securitycenter.v1.Finding.newBuilder(finding_).mergeFrom(value).buildPartial(); - } else { - finding_ = value; - } - onChanged(); - } else { - findingBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The Finding being created. The name and security_marks will be ignored as
-     * they are both output only fields on this resource.
-     * 
- * - * .google.cloud.securitycenter.v1.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearFinding() { - if (findingBuilder_ == null) { - finding_ = null; - onChanged(); - } else { - finding_ = null; - findingBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The Finding being created. The name and security_marks will be ignored as
-     * they are both output only fields on this resource.
-     * 
- * - * .google.cloud.securitycenter.v1.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.securitycenter.v1.Finding.Builder getFindingBuilder() { - - onChanged(); - return getFindingFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The Finding being created. The name and security_marks will be ignored as
-     * they are both output only fields on this resource.
-     * 
- * - * .google.cloud.securitycenter.v1.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.securitycenter.v1.FindingOrBuilder getFindingOrBuilder() { - if (findingBuilder_ != null) { - return findingBuilder_.getMessageOrBuilder(); - } else { - return finding_ == null ? - com.google.cloud.securitycenter.v1.Finding.getDefaultInstance() : finding_; - } - } - /** - *
-     * Required. The Finding being created. The name and security_marks will be ignored as
-     * they are both output only fields on this resource.
-     * 
- * - * .google.cloud.securitycenter.v1.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Finding, com.google.cloud.securitycenter.v1.Finding.Builder, com.google.cloud.securitycenter.v1.FindingOrBuilder> - getFindingFieldBuilder() { - if (findingBuilder_ == null) { - findingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Finding, com.google.cloud.securitycenter.v1.Finding.Builder, com.google.cloud.securitycenter.v1.FindingOrBuilder>( - getFinding(), - getParentForChildren(), - isClean()); - finding_ = null; - } - return findingBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.CreateFindingRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.CreateFindingRequest) - private static final com.google.cloud.securitycenter.v1.CreateFindingRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.CreateFindingRequest(); - } - - public static com.google.cloud.securitycenter.v1.CreateFindingRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateFindingRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateFindingRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.CreateFindingRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateFindingRequestOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateFindingRequestOrBuilder.java deleted file mode 100644 index 3d6ecd597023..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateFindingRequestOrBuilder.java +++ /dev/null @@ -1,85 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -public interface CreateFindingRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.CreateFindingRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the new finding's parent. Its format should be
-   * "organizations/[organization_id]/sources/[source_id]".
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. Resource name of the new finding's parent. Its format should be
-   * "organizations/[organization_id]/sources/[source_id]".
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * 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.
-   * 
- * - * string finding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The findingId. - */ - java.lang.String getFindingId(); - /** - *
-   * 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.
-   * 
- * - * string finding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for findingId. - */ - com.google.protobuf.ByteString - getFindingIdBytes(); - - /** - *
-   * Required. The Finding being created. The name and security_marks will be ignored as
-   * they are both output only fields on this resource.
-   * 
- * - * .google.cloud.securitycenter.v1.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the finding field is set. - */ - boolean hasFinding(); - /** - *
-   * Required. The Finding being created. The name and security_marks will be ignored as
-   * they are both output only fields on this resource.
-   * 
- * - * .google.cloud.securitycenter.v1.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The finding. - */ - com.google.cloud.securitycenter.v1.Finding getFinding(); - /** - *
-   * Required. The Finding being created. The name and security_marks will be ignored as
-   * they are both output only fields on this resource.
-   * 
- * - * .google.cloud.securitycenter.v1.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.securitycenter.v1.FindingOrBuilder getFindingOrBuilder(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateMuteConfigRequest.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateMuteConfigRequest.java deleted file mode 100644 index 0a4746c96b81..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateMuteConfigRequest.java +++ /dev/null @@ -1,1032 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Request message for creating a mute config.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.CreateMuteConfigRequest} - */ -public final class CreateMuteConfigRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.CreateMuteConfigRequest) - CreateMuteConfigRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateMuteConfigRequest.newBuilder() to construct. - private CreateMuteConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateMuteConfigRequest() { - parent_ = ""; - muteConfigId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateMuteConfigRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateMuteConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.cloud.securitycenter.v1.MuteConfig.Builder subBuilder = null; - if (muteConfig_ != null) { - subBuilder = muteConfig_.toBuilder(); - } - muteConfig_ = input.readMessage(com.google.cloud.securitycenter.v1.MuteConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(muteConfig_); - muteConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - muteConfigId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_CreateMuteConfigRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_CreateMuteConfigRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.CreateMuteConfigRequest.class, com.google.cloud.securitycenter.v1.CreateMuteConfigRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. Resource name of the new mute configs's parent. Its format is
-   * "organizations/[organization_id]", "folders/[folder_id]", or
-   * "projects/[project_id]".
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the new mute configs's parent. Its format is
-   * "organizations/[organization_id]", "folders/[folder_id]", or
-   * "projects/[project_id]".
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MUTE_CONFIG_FIELD_NUMBER = 2; - private com.google.cloud.securitycenter.v1.MuteConfig muteConfig_; - /** - *
-   * Required. The mute config being created.
-   * 
- * - * .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the muteConfig field is set. - */ - @java.lang.Override - public boolean hasMuteConfig() { - return muteConfig_ != null; - } - /** - *
-   * Required. The mute config being created.
-   * 
- * - * .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The muteConfig. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.MuteConfig getMuteConfig() { - return muteConfig_ == null ? com.google.cloud.securitycenter.v1.MuteConfig.getDefaultInstance() : muteConfig_; - } - /** - *
-   * Required. The mute config being created.
-   * 
- * - * .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.MuteConfigOrBuilder getMuteConfigOrBuilder() { - return getMuteConfig(); - } - - public static final int MUTE_CONFIG_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object muteConfigId_; - /** - *
-   * Required. Unique identifier provided by the client within the parent scope.
-   * It must consist of lower case letters, numbers, and hyphen, with the first
-   * character a letter, the last a letter or a number, and a 63 character
-   * maximum.
-   * 
- * - * string mute_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The muteConfigId. - */ - @java.lang.Override - public java.lang.String getMuteConfigId() { - java.lang.Object ref = muteConfigId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - muteConfigId_ = s; - return s; - } - } - /** - *
-   * Required. Unique identifier provided by the client within the parent scope.
-   * It must consist of lower case letters, numbers, and hyphen, with the first
-   * character a letter, the last a letter or a number, and a 63 character
-   * maximum.
-   * 
- * - * string mute_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for muteConfigId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMuteConfigIdBytes() { - java.lang.Object ref = muteConfigId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - muteConfigId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (muteConfig_ != null) { - output.writeMessage(2, getMuteConfig()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(muteConfigId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, muteConfigId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (muteConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getMuteConfig()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(muteConfigId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, muteConfigId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.CreateMuteConfigRequest)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.CreateMuteConfigRequest other = (com.google.cloud.securitycenter.v1.CreateMuteConfigRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasMuteConfig() != other.hasMuteConfig()) return false; - if (hasMuteConfig()) { - if (!getMuteConfig() - .equals(other.getMuteConfig())) return false; - } - if (!getMuteConfigId() - .equals(other.getMuteConfigId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasMuteConfig()) { - hash = (37 * hash) + MUTE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getMuteConfig().hashCode(); - } - hash = (37 * hash) + MUTE_CONFIG_ID_FIELD_NUMBER; - hash = (53 * hash) + getMuteConfigId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.CreateMuteConfigRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.CreateMuteConfigRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.CreateMuteConfigRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.CreateMuteConfigRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.CreateMuteConfigRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.CreateMuteConfigRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.CreateMuteConfigRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.CreateMuteConfigRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.CreateMuteConfigRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.CreateMuteConfigRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.CreateMuteConfigRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.CreateMuteConfigRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.CreateMuteConfigRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for creating a mute config.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.CreateMuteConfigRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.CreateMuteConfigRequest) - com.google.cloud.securitycenter.v1.CreateMuteConfigRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_CreateMuteConfigRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_CreateMuteConfigRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.CreateMuteConfigRequest.class, com.google.cloud.securitycenter.v1.CreateMuteConfigRequest.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.CreateMuteConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (muteConfigBuilder_ == null) { - muteConfig_ = null; - } else { - muteConfig_ = null; - muteConfigBuilder_ = null; - } - muteConfigId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_CreateMuteConfigRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.CreateMuteConfigRequest getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.CreateMuteConfigRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.CreateMuteConfigRequest build() { - com.google.cloud.securitycenter.v1.CreateMuteConfigRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.CreateMuteConfigRequest buildPartial() { - com.google.cloud.securitycenter.v1.CreateMuteConfigRequest result = new com.google.cloud.securitycenter.v1.CreateMuteConfigRequest(this); - result.parent_ = parent_; - if (muteConfigBuilder_ == null) { - result.muteConfig_ = muteConfig_; - } else { - result.muteConfig_ = muteConfigBuilder_.build(); - } - result.muteConfigId_ = muteConfigId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.CreateMuteConfigRequest) { - return mergeFrom((com.google.cloud.securitycenter.v1.CreateMuteConfigRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.CreateMuteConfigRequest other) { - if (other == com.google.cloud.securitycenter.v1.CreateMuteConfigRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasMuteConfig()) { - mergeMuteConfig(other.getMuteConfig()); - } - if (!other.getMuteConfigId().isEmpty()) { - muteConfigId_ = other.muteConfigId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.CreateMuteConfigRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.CreateMuteConfigRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. Resource name of the new mute configs's parent. Its format is
-     * "organizations/[organization_id]", "folders/[folder_id]", or
-     * "projects/[project_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the new mute configs's parent. Its format is
-     * "organizations/[organization_id]", "folders/[folder_id]", or
-     * "projects/[project_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the new mute configs's parent. Its format is
-     * "organizations/[organization_id]", "folders/[folder_id]", or
-     * "projects/[project_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the new mute configs's parent. Its format is
-     * "organizations/[organization_id]", "folders/[folder_id]", or
-     * "projects/[project_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the new mute configs's parent. Its format is
-     * "organizations/[organization_id]", "folders/[folder_id]", or
-     * "projects/[project_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.cloud.securitycenter.v1.MuteConfig muteConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.MuteConfig, com.google.cloud.securitycenter.v1.MuteConfig.Builder, com.google.cloud.securitycenter.v1.MuteConfigOrBuilder> muteConfigBuilder_; - /** - *
-     * Required. The mute config being created.
-     * 
- * - * .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the muteConfig field is set. - */ - public boolean hasMuteConfig() { - return muteConfigBuilder_ != null || muteConfig_ != null; - } - /** - *
-     * Required. The mute config being created.
-     * 
- * - * .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The muteConfig. - */ - public com.google.cloud.securitycenter.v1.MuteConfig getMuteConfig() { - if (muteConfigBuilder_ == null) { - return muteConfig_ == null ? com.google.cloud.securitycenter.v1.MuteConfig.getDefaultInstance() : muteConfig_; - } else { - return muteConfigBuilder_.getMessage(); - } - } - /** - *
-     * Required. The mute config being created.
-     * 
- * - * .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setMuteConfig(com.google.cloud.securitycenter.v1.MuteConfig value) { - if (muteConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - muteConfig_ = value; - onChanged(); - } else { - muteConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The mute config being created.
-     * 
- * - * .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setMuteConfig( - com.google.cloud.securitycenter.v1.MuteConfig.Builder builderForValue) { - if (muteConfigBuilder_ == null) { - muteConfig_ = builderForValue.build(); - onChanged(); - } else { - muteConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The mute config being created.
-     * 
- * - * .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeMuteConfig(com.google.cloud.securitycenter.v1.MuteConfig value) { - if (muteConfigBuilder_ == null) { - if (muteConfig_ != null) { - muteConfig_ = - com.google.cloud.securitycenter.v1.MuteConfig.newBuilder(muteConfig_).mergeFrom(value).buildPartial(); - } else { - muteConfig_ = value; - } - onChanged(); - } else { - muteConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The mute config being created.
-     * 
- * - * .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearMuteConfig() { - if (muteConfigBuilder_ == null) { - muteConfig_ = null; - onChanged(); - } else { - muteConfig_ = null; - muteConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The mute config being created.
-     * 
- * - * .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.securitycenter.v1.MuteConfig.Builder getMuteConfigBuilder() { - - onChanged(); - return getMuteConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The mute config being created.
-     * 
- * - * .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.securitycenter.v1.MuteConfigOrBuilder getMuteConfigOrBuilder() { - if (muteConfigBuilder_ != null) { - return muteConfigBuilder_.getMessageOrBuilder(); - } else { - return muteConfig_ == null ? - com.google.cloud.securitycenter.v1.MuteConfig.getDefaultInstance() : muteConfig_; - } - } - /** - *
-     * Required. The mute config being created.
-     * 
- * - * .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.MuteConfig, com.google.cloud.securitycenter.v1.MuteConfig.Builder, com.google.cloud.securitycenter.v1.MuteConfigOrBuilder> - getMuteConfigFieldBuilder() { - if (muteConfigBuilder_ == null) { - muteConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.MuteConfig, com.google.cloud.securitycenter.v1.MuteConfig.Builder, com.google.cloud.securitycenter.v1.MuteConfigOrBuilder>( - getMuteConfig(), - getParentForChildren(), - isClean()); - muteConfig_ = null; - } - return muteConfigBuilder_; - } - - private java.lang.Object muteConfigId_ = ""; - /** - *
-     * Required. Unique identifier provided by the client within the parent scope.
-     * It must consist of lower case letters, numbers, and hyphen, with the first
-     * character a letter, the last a letter or a number, and a 63 character
-     * maximum.
-     * 
- * - * string mute_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The muteConfigId. - */ - public java.lang.String getMuteConfigId() { - java.lang.Object ref = muteConfigId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - muteConfigId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Unique identifier provided by the client within the parent scope.
-     * It must consist of lower case letters, numbers, and hyphen, with the first
-     * character a letter, the last a letter or a number, and a 63 character
-     * maximum.
-     * 
- * - * string mute_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for muteConfigId. - */ - public com.google.protobuf.ByteString - getMuteConfigIdBytes() { - java.lang.Object ref = muteConfigId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - muteConfigId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Unique identifier provided by the client within the parent scope.
-     * It must consist of lower case letters, numbers, and hyphen, with the first
-     * character a letter, the last a letter or a number, and a 63 character
-     * maximum.
-     * 
- * - * string mute_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param value The muteConfigId to set. - * @return This builder for chaining. - */ - public Builder setMuteConfigId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - muteConfigId_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Unique identifier provided by the client within the parent scope.
-     * It must consist of lower case letters, numbers, and hyphen, with the first
-     * character a letter, the last a letter or a number, and a 63 character
-     * maximum.
-     * 
- * - * string mute_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearMuteConfigId() { - - muteConfigId_ = getDefaultInstance().getMuteConfigId(); - onChanged(); - return this; - } - /** - *
-     * Required. Unique identifier provided by the client within the parent scope.
-     * It must consist of lower case letters, numbers, and hyphen, with the first
-     * character a letter, the last a letter or a number, and a 63 character
-     * maximum.
-     * 
- * - * string mute_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for muteConfigId to set. - * @return This builder for chaining. - */ - public Builder setMuteConfigIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - muteConfigId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.CreateMuteConfigRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.CreateMuteConfigRequest) - private static final com.google.cloud.securitycenter.v1.CreateMuteConfigRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.CreateMuteConfigRequest(); - } - - public static com.google.cloud.securitycenter.v1.CreateMuteConfigRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateMuteConfigRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateMuteConfigRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.CreateMuteConfigRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateMuteConfigRequestOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateMuteConfigRequestOrBuilder.java deleted file mode 100644 index 2aadf4ad7b73..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateMuteConfigRequestOrBuilder.java +++ /dev/null @@ -1,86 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -public interface CreateMuteConfigRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.CreateMuteConfigRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the new mute configs's parent. Its format is
-   * "organizations/[organization_id]", "folders/[folder_id]", or
-   * "projects/[project_id]".
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. Resource name of the new mute configs's parent. Its format is
-   * "organizations/[organization_id]", "folders/[folder_id]", or
-   * "projects/[project_id]".
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. The mute config being created.
-   * 
- * - * .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the muteConfig field is set. - */ - boolean hasMuteConfig(); - /** - *
-   * Required. The mute config being created.
-   * 
- * - * .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The muteConfig. - */ - com.google.cloud.securitycenter.v1.MuteConfig getMuteConfig(); - /** - *
-   * Required. The mute config being created.
-   * 
- * - * .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.securitycenter.v1.MuteConfigOrBuilder getMuteConfigOrBuilder(); - - /** - *
-   * Required. Unique identifier provided by the client within the parent scope.
-   * It must consist of lower case letters, numbers, and hyphen, with the first
-   * character a letter, the last a letter or a number, and a 63 character
-   * maximum.
-   * 
- * - * string mute_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The muteConfigId. - */ - java.lang.String getMuteConfigId(); - /** - *
-   * Required. Unique identifier provided by the client within the parent scope.
-   * It must consist of lower case letters, numbers, and hyphen, with the first
-   * character a letter, the last a letter or a number, and a 63 character
-   * maximum.
-   * 
- * - * string mute_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for muteConfigId. - */ - com.google.protobuf.ByteString - getMuteConfigIdBytes(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateNotificationConfigRequest.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateNotificationConfigRequest.java deleted file mode 100644 index afb05529cb58..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateNotificationConfigRequest.java +++ /dev/null @@ -1,1037 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Request message for creating a notification config.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.CreateNotificationConfigRequest} - */ -public final class CreateNotificationConfigRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.CreateNotificationConfigRequest) - CreateNotificationConfigRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateNotificationConfigRequest.newBuilder() to construct. - private CreateNotificationConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateNotificationConfigRequest() { - parent_ = ""; - configId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateNotificationConfigRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateNotificationConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - configId_ = s; - break; - } - case 26: { - com.google.cloud.securitycenter.v1.NotificationConfig.Builder subBuilder = null; - if (notificationConfig_ != null) { - subBuilder = notificationConfig_.toBuilder(); - } - notificationConfig_ = input.readMessage(com.google.cloud.securitycenter.v1.NotificationConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(notificationConfig_); - notificationConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_CreateNotificationConfigRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_CreateNotificationConfigRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest.class, com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. Resource name of the new notification config's parent. Its format is
-   * "organizations/[organization_id]".
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the new notification config's parent. Its format is
-   * "organizations/[organization_id]".
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONFIG_ID_FIELD_NUMBER = 2; - private volatile java.lang.Object configId_; - /** - *
-   * Required.
-   * Unique identifier provided by the client within the parent scope.
-   * It must be between 1 and 128 characters, and contains alphanumeric
-   * characters, underscores or hyphens only.
-   * 
- * - * string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The configId. - */ - @java.lang.Override - public java.lang.String getConfigId() { - java.lang.Object ref = configId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - configId_ = s; - return s; - } - } - /** - *
-   * Required.
-   * Unique identifier provided by the client within the parent scope.
-   * It must be between 1 and 128 characters, and contains alphanumeric
-   * characters, underscores or hyphens only.
-   * 
- * - * string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for configId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getConfigIdBytes() { - java.lang.Object ref = configId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - configId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NOTIFICATION_CONFIG_FIELD_NUMBER = 3; - private com.google.cloud.securitycenter.v1.NotificationConfig notificationConfig_; - /** - *
-   * Required. The notification config being created. The name and the service account
-   * will be ignored as they are both output only fields on this resource.
-   * 
- * - * .google.cloud.securitycenter.v1.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the notificationConfig field is set. - */ - @java.lang.Override - public boolean hasNotificationConfig() { - return notificationConfig_ != null; - } - /** - *
-   * Required. The notification config being created. The name and the service account
-   * will be ignored as they are both output only fields on this resource.
-   * 
- * - * .google.cloud.securitycenter.v1.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The notificationConfig. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.NotificationConfig getNotificationConfig() { - return notificationConfig_ == null ? com.google.cloud.securitycenter.v1.NotificationConfig.getDefaultInstance() : notificationConfig_; - } - /** - *
-   * Required. The notification config being created. The name and the service account
-   * will be ignored as they are both output only fields on this resource.
-   * 
- * - * .google.cloud.securitycenter.v1.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.NotificationConfigOrBuilder getNotificationConfigOrBuilder() { - return getNotificationConfig(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(configId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, configId_); - } - if (notificationConfig_ != null) { - output.writeMessage(3, getNotificationConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(configId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, configId_); - } - if (notificationConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getNotificationConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest other = (com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!getConfigId() - .equals(other.getConfigId())) return false; - if (hasNotificationConfig() != other.hasNotificationConfig()) return false; - if (hasNotificationConfig()) { - if (!getNotificationConfig() - .equals(other.getNotificationConfig())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + CONFIG_ID_FIELD_NUMBER; - hash = (53 * hash) + getConfigId().hashCode(); - if (hasNotificationConfig()) { - hash = (37 * hash) + NOTIFICATION_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getNotificationConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for creating a notification config.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.CreateNotificationConfigRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.CreateNotificationConfigRequest) - com.google.cloud.securitycenter.v1.CreateNotificationConfigRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_CreateNotificationConfigRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_CreateNotificationConfigRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest.class, com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - configId_ = ""; - - if (notificationConfigBuilder_ == null) { - notificationConfig_ = null; - } else { - notificationConfig_ = null; - notificationConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_CreateNotificationConfigRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest build() { - com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest buildPartial() { - com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest result = new com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest(this); - result.parent_ = parent_; - result.configId_ = configId_; - if (notificationConfigBuilder_ == null) { - result.notificationConfig_ = notificationConfig_; - } else { - result.notificationConfig_ = notificationConfigBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest) { - return mergeFrom((com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest other) { - if (other == com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (!other.getConfigId().isEmpty()) { - configId_ = other.configId_; - onChanged(); - } - if (other.hasNotificationConfig()) { - mergeNotificationConfig(other.getNotificationConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. Resource name of the new notification config's parent. Its format is
-     * "organizations/[organization_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the new notification config's parent. Its format is
-     * "organizations/[organization_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the new notification config's parent. Its format is
-     * "organizations/[organization_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the new notification config's parent. Its format is
-     * "organizations/[organization_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the new notification config's parent. Its format is
-     * "organizations/[organization_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private java.lang.Object configId_ = ""; - /** - *
-     * Required.
-     * Unique identifier provided by the client within the parent scope.
-     * It must be between 1 and 128 characters, and contains alphanumeric
-     * characters, underscores or hyphens only.
-     * 
- * - * string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The configId. - */ - public java.lang.String getConfigId() { - java.lang.Object ref = configId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - configId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required.
-     * Unique identifier provided by the client within the parent scope.
-     * It must be between 1 and 128 characters, and contains alphanumeric
-     * characters, underscores or hyphens only.
-     * 
- * - * string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for configId. - */ - public com.google.protobuf.ByteString - getConfigIdBytes() { - java.lang.Object ref = configId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - configId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required.
-     * Unique identifier provided by the client within the parent scope.
-     * It must be between 1 and 128 characters, and contains alphanumeric
-     * characters, underscores or hyphens only.
-     * 
- * - * string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The configId to set. - * @return This builder for chaining. - */ - public Builder setConfigId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - configId_ = value; - onChanged(); - return this; - } - /** - *
-     * Required.
-     * Unique identifier provided by the client within the parent scope.
-     * It must be between 1 and 128 characters, and contains alphanumeric
-     * characters, underscores or hyphens only.
-     * 
- * - * string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearConfigId() { - - configId_ = getDefaultInstance().getConfigId(); - onChanged(); - return this; - } - /** - *
-     * Required.
-     * Unique identifier provided by the client within the parent scope.
-     * It must be between 1 and 128 characters, and contains alphanumeric
-     * characters, underscores or hyphens only.
-     * 
- * - * string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for configId to set. - * @return This builder for chaining. - */ - public Builder setConfigIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - configId_ = value; - onChanged(); - return this; - } - - private com.google.cloud.securitycenter.v1.NotificationConfig notificationConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.NotificationConfig, com.google.cloud.securitycenter.v1.NotificationConfig.Builder, com.google.cloud.securitycenter.v1.NotificationConfigOrBuilder> notificationConfigBuilder_; - /** - *
-     * Required. The notification config being created. The name and the service account
-     * will be ignored as they are both output only fields on this resource.
-     * 
- * - * .google.cloud.securitycenter.v1.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the notificationConfig field is set. - */ - public boolean hasNotificationConfig() { - return notificationConfigBuilder_ != null || notificationConfig_ != null; - } - /** - *
-     * Required. The notification config being created. The name and the service account
-     * will be ignored as they are both output only fields on this resource.
-     * 
- * - * .google.cloud.securitycenter.v1.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The notificationConfig. - */ - public com.google.cloud.securitycenter.v1.NotificationConfig getNotificationConfig() { - if (notificationConfigBuilder_ == null) { - return notificationConfig_ == null ? com.google.cloud.securitycenter.v1.NotificationConfig.getDefaultInstance() : notificationConfig_; - } else { - return notificationConfigBuilder_.getMessage(); - } - } - /** - *
-     * Required. The notification config being created. The name and the service account
-     * will be ignored as they are both output only fields on this resource.
-     * 
- * - * .google.cloud.securitycenter.v1.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setNotificationConfig(com.google.cloud.securitycenter.v1.NotificationConfig value) { - if (notificationConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - notificationConfig_ = value; - onChanged(); - } else { - notificationConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The notification config being created. The name and the service account
-     * will be ignored as they are both output only fields on this resource.
-     * 
- * - * .google.cloud.securitycenter.v1.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setNotificationConfig( - com.google.cloud.securitycenter.v1.NotificationConfig.Builder builderForValue) { - if (notificationConfigBuilder_ == null) { - notificationConfig_ = builderForValue.build(); - onChanged(); - } else { - notificationConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The notification config being created. The name and the service account
-     * will be ignored as they are both output only fields on this resource.
-     * 
- * - * .google.cloud.securitycenter.v1.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeNotificationConfig(com.google.cloud.securitycenter.v1.NotificationConfig value) { - if (notificationConfigBuilder_ == null) { - if (notificationConfig_ != null) { - notificationConfig_ = - com.google.cloud.securitycenter.v1.NotificationConfig.newBuilder(notificationConfig_).mergeFrom(value).buildPartial(); - } else { - notificationConfig_ = value; - } - onChanged(); - } else { - notificationConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The notification config being created. The name and the service account
-     * will be ignored as they are both output only fields on this resource.
-     * 
- * - * .google.cloud.securitycenter.v1.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearNotificationConfig() { - if (notificationConfigBuilder_ == null) { - notificationConfig_ = null; - onChanged(); - } else { - notificationConfig_ = null; - notificationConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The notification config being created. The name and the service account
-     * will be ignored as they are both output only fields on this resource.
-     * 
- * - * .google.cloud.securitycenter.v1.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.securitycenter.v1.NotificationConfig.Builder getNotificationConfigBuilder() { - - onChanged(); - return getNotificationConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The notification config being created. The name and the service account
-     * will be ignored as they are both output only fields on this resource.
-     * 
- * - * .google.cloud.securitycenter.v1.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.securitycenter.v1.NotificationConfigOrBuilder getNotificationConfigOrBuilder() { - if (notificationConfigBuilder_ != null) { - return notificationConfigBuilder_.getMessageOrBuilder(); - } else { - return notificationConfig_ == null ? - com.google.cloud.securitycenter.v1.NotificationConfig.getDefaultInstance() : notificationConfig_; - } - } - /** - *
-     * Required. The notification config being created. The name and the service account
-     * will be ignored as they are both output only fields on this resource.
-     * 
- * - * .google.cloud.securitycenter.v1.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.NotificationConfig, com.google.cloud.securitycenter.v1.NotificationConfig.Builder, com.google.cloud.securitycenter.v1.NotificationConfigOrBuilder> - getNotificationConfigFieldBuilder() { - if (notificationConfigBuilder_ == null) { - notificationConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.NotificationConfig, com.google.cloud.securitycenter.v1.NotificationConfig.Builder, com.google.cloud.securitycenter.v1.NotificationConfigOrBuilder>( - getNotificationConfig(), - getParentForChildren(), - isClean()); - notificationConfig_ = null; - } - return notificationConfigBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.CreateNotificationConfigRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.CreateNotificationConfigRequest) - private static final com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest(); - } - - public static com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateNotificationConfigRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateNotificationConfigRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateNotificationConfigRequestOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateNotificationConfigRequestOrBuilder.java deleted file mode 100644 index 553e974e84f9..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateNotificationConfigRequestOrBuilder.java +++ /dev/null @@ -1,87 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -public interface CreateNotificationConfigRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.CreateNotificationConfigRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the new notification config's parent. Its format is
-   * "organizations/[organization_id]".
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. Resource name of the new notification config's parent. Its format is
-   * "organizations/[organization_id]".
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required.
-   * Unique identifier provided by the client within the parent scope.
-   * It must be between 1 and 128 characters, and contains alphanumeric
-   * characters, underscores or hyphens only.
-   * 
- * - * string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The configId. - */ - java.lang.String getConfigId(); - /** - *
-   * Required.
-   * Unique identifier provided by the client within the parent scope.
-   * It must be between 1 and 128 characters, and contains alphanumeric
-   * characters, underscores or hyphens only.
-   * 
- * - * string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for configId. - */ - com.google.protobuf.ByteString - getConfigIdBytes(); - - /** - *
-   * Required. The notification config being created. The name and the service account
-   * will be ignored as they are both output only fields on this resource.
-   * 
- * - * .google.cloud.securitycenter.v1.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the notificationConfig field is set. - */ - boolean hasNotificationConfig(); - /** - *
-   * Required. The notification config being created. The name and the service account
-   * will be ignored as they are both output only fields on this resource.
-   * 
- * - * .google.cloud.securitycenter.v1.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The notificationConfig. - */ - com.google.cloud.securitycenter.v1.NotificationConfig getNotificationConfig(); - /** - *
-   * Required. The notification config being created. The name and the service account
-   * will be ignored as they are both output only fields on this resource.
-   * 
- * - * .google.cloud.securitycenter.v1.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.securitycenter.v1.NotificationConfigOrBuilder getNotificationConfigOrBuilder(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateSourceRequest.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateSourceRequest.java deleted file mode 100644 index b9138b600c7d..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateSourceRequest.java +++ /dev/null @@ -1,850 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Request message for creating a source.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.CreateSourceRequest} - */ -public final class CreateSourceRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.CreateSourceRequest) - CreateSourceRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateSourceRequest.newBuilder() to construct. - private CreateSourceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateSourceRequest() { - parent_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateSourceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateSourceRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.cloud.securitycenter.v1.Source.Builder subBuilder = null; - if (source_ != null) { - subBuilder = source_.toBuilder(); - } - source_ = input.readMessage(com.google.cloud.securitycenter.v1.Source.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(source_); - source_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_CreateSourceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_CreateSourceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.CreateSourceRequest.class, com.google.cloud.securitycenter.v1.CreateSourceRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. Resource name of the new source's parent. Its format should be
-   * "organizations/[organization_id]".
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the new source's parent. Its format should be
-   * "organizations/[organization_id]".
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SOURCE_FIELD_NUMBER = 2; - private com.google.cloud.securitycenter.v1.Source source_; - /** - *
-   * Required. The Source being created, only the display_name and description will be
-   * used. All other fields will be ignored.
-   * 
- * - * .google.cloud.securitycenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the source field is set. - */ - @java.lang.Override - public boolean hasSource() { - return source_ != null; - } - /** - *
-   * Required. The Source being created, only the display_name and description will be
-   * used. All other fields will be ignored.
-   * 
- * - * .google.cloud.securitycenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The source. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Source getSource() { - return source_ == null ? com.google.cloud.securitycenter.v1.Source.getDefaultInstance() : source_; - } - /** - *
-   * Required. The Source being created, only the display_name and description will be
-   * used. All other fields will be ignored.
-   * 
- * - * .google.cloud.securitycenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.SourceOrBuilder getSourceOrBuilder() { - return getSource(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (source_ != null) { - output.writeMessage(2, getSource()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (source_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getSource()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.CreateSourceRequest)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.CreateSourceRequest other = (com.google.cloud.securitycenter.v1.CreateSourceRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasSource() != other.hasSource()) return false; - if (hasSource()) { - if (!getSource() - .equals(other.getSource())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasSource()) { - hash = (37 * hash) + SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getSource().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.CreateSourceRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.CreateSourceRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.CreateSourceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.CreateSourceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.CreateSourceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.CreateSourceRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.CreateSourceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.CreateSourceRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.CreateSourceRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.CreateSourceRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.CreateSourceRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.CreateSourceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.CreateSourceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for creating a source.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.CreateSourceRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.CreateSourceRequest) - com.google.cloud.securitycenter.v1.CreateSourceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_CreateSourceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_CreateSourceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.CreateSourceRequest.class, com.google.cloud.securitycenter.v1.CreateSourceRequest.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.CreateSourceRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (sourceBuilder_ == null) { - source_ = null; - } else { - source_ = null; - sourceBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_CreateSourceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.CreateSourceRequest getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.CreateSourceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.CreateSourceRequest build() { - com.google.cloud.securitycenter.v1.CreateSourceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.CreateSourceRequest buildPartial() { - com.google.cloud.securitycenter.v1.CreateSourceRequest result = new com.google.cloud.securitycenter.v1.CreateSourceRequest(this); - result.parent_ = parent_; - if (sourceBuilder_ == null) { - result.source_ = source_; - } else { - result.source_ = sourceBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.CreateSourceRequest) { - return mergeFrom((com.google.cloud.securitycenter.v1.CreateSourceRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.CreateSourceRequest other) { - if (other == com.google.cloud.securitycenter.v1.CreateSourceRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasSource()) { - mergeSource(other.getSource()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.CreateSourceRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.CreateSourceRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. Resource name of the new source's parent. Its format should be
-     * "organizations/[organization_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the new source's parent. Its format should be
-     * "organizations/[organization_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the new source's parent. Its format should be
-     * "organizations/[organization_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the new source's parent. Its format should be
-     * "organizations/[organization_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the new source's parent. Its format should be
-     * "organizations/[organization_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.cloud.securitycenter.v1.Source source_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Source, com.google.cloud.securitycenter.v1.Source.Builder, com.google.cloud.securitycenter.v1.SourceOrBuilder> sourceBuilder_; - /** - *
-     * Required. The Source being created, only the display_name and description will be
-     * used. All other fields will be ignored.
-     * 
- * - * .google.cloud.securitycenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the source field is set. - */ - public boolean hasSource() { - return sourceBuilder_ != null || source_ != null; - } - /** - *
-     * Required. The Source being created, only the display_name and description will be
-     * used. All other fields will be ignored.
-     * 
- * - * .google.cloud.securitycenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The source. - */ - public com.google.cloud.securitycenter.v1.Source getSource() { - if (sourceBuilder_ == null) { - return source_ == null ? com.google.cloud.securitycenter.v1.Source.getDefaultInstance() : source_; - } else { - return sourceBuilder_.getMessage(); - } - } - /** - *
-     * Required. The Source being created, only the display_name and description will be
-     * used. All other fields will be ignored.
-     * 
- * - * .google.cloud.securitycenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setSource(com.google.cloud.securitycenter.v1.Source value) { - if (sourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - source_ = value; - onChanged(); - } else { - sourceBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The Source being created, only the display_name and description will be
-     * used. All other fields will be ignored.
-     * 
- * - * .google.cloud.securitycenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setSource( - com.google.cloud.securitycenter.v1.Source.Builder builderForValue) { - if (sourceBuilder_ == null) { - source_ = builderForValue.build(); - onChanged(); - } else { - sourceBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The Source being created, only the display_name and description will be
-     * used. All other fields will be ignored.
-     * 
- * - * .google.cloud.securitycenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeSource(com.google.cloud.securitycenter.v1.Source value) { - if (sourceBuilder_ == null) { - if (source_ != null) { - source_ = - com.google.cloud.securitycenter.v1.Source.newBuilder(source_).mergeFrom(value).buildPartial(); - } else { - source_ = value; - } - onChanged(); - } else { - sourceBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The Source being created, only the display_name and description will be
-     * used. All other fields will be ignored.
-     * 
- * - * .google.cloud.securitycenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearSource() { - if (sourceBuilder_ == null) { - source_ = null; - onChanged(); - } else { - source_ = null; - sourceBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The Source being created, only the display_name and description will be
-     * used. All other fields will be ignored.
-     * 
- * - * .google.cloud.securitycenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.securitycenter.v1.Source.Builder getSourceBuilder() { - - onChanged(); - return getSourceFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The Source being created, only the display_name and description will be
-     * used. All other fields will be ignored.
-     * 
- * - * .google.cloud.securitycenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.securitycenter.v1.SourceOrBuilder getSourceOrBuilder() { - if (sourceBuilder_ != null) { - return sourceBuilder_.getMessageOrBuilder(); - } else { - return source_ == null ? - com.google.cloud.securitycenter.v1.Source.getDefaultInstance() : source_; - } - } - /** - *
-     * Required. The Source being created, only the display_name and description will be
-     * used. All other fields will be ignored.
-     * 
- * - * .google.cloud.securitycenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Source, com.google.cloud.securitycenter.v1.Source.Builder, com.google.cloud.securitycenter.v1.SourceOrBuilder> - getSourceFieldBuilder() { - if (sourceBuilder_ == null) { - sourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Source, com.google.cloud.securitycenter.v1.Source.Builder, com.google.cloud.securitycenter.v1.SourceOrBuilder>( - getSource(), - getParentForChildren(), - isClean()); - source_ = null; - } - return sourceBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.CreateSourceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.CreateSourceRequest) - private static final com.google.cloud.securitycenter.v1.CreateSourceRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.CreateSourceRequest(); - } - - public static com.google.cloud.securitycenter.v1.CreateSourceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateSourceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateSourceRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.CreateSourceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateSourceRequestOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateSourceRequestOrBuilder.java deleted file mode 100644 index 8552a2d047db..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CreateSourceRequestOrBuilder.java +++ /dev/null @@ -1,61 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -public interface CreateSourceRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.CreateSourceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the new source's parent. Its format should be
-   * "organizations/[organization_id]".
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. Resource name of the new source's parent. Its format should be
-   * "organizations/[organization_id]".
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. The Source being created, only the display_name and description will be
-   * used. All other fields will be ignored.
-   * 
- * - * .google.cloud.securitycenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the source field is set. - */ - boolean hasSource(); - /** - *
-   * Required. The Source being created, only the display_name and description will be
-   * used. All other fields will be ignored.
-   * 
- * - * .google.cloud.securitycenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The source. - */ - com.google.cloud.securitycenter.v1.Source getSource(); - /** - *
-   * Required. The Source being created, only the display_name and description will be
-   * used. All other fields will be ignored.
-   * 
- * - * .google.cloud.securitycenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.securitycenter.v1.SourceOrBuilder getSourceOrBuilder(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Cve.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Cve.java deleted file mode 100644 index 1e0e50bc5823..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Cve.java +++ /dev/null @@ -1,1392 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/vulnerability.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * CVE stands for Common Vulnerabilities and Exposures.
- * More information: https://cve.mitre.org
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Cve} - */ -public final class Cve extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Cve) - CveOrBuilder { -private static final long serialVersionUID = 0L; - // Use Cve.newBuilder() to construct. - private Cve(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Cve() { - id_ = ""; - references_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Cve(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Cve( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - id_ = s; - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - references_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - references_.add( - input.readMessage(com.google.cloud.securitycenter.v1.Reference.parser(), extensionRegistry)); - break; - } - case 26: { - com.google.cloud.securitycenter.v1.Cvssv3.Builder subBuilder = null; - if (cvssv3_ != null) { - subBuilder = cvssv3_.toBuilder(); - } - cvssv3_ = input.readMessage(com.google.cloud.securitycenter.v1.Cvssv3.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(cvssv3_); - cvssv3_ = subBuilder.buildPartial(); - } - - break; - } - case 32: { - - upstreamFixAvailable_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - references_ = java.util.Collections.unmodifiableList(references_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.VulnerabilityProto.internal_static_google_cloud_securitycenter_v1_Cve_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.VulnerabilityProto.internal_static_google_cloud_securitycenter_v1_Cve_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Cve.class, com.google.cloud.securitycenter.v1.Cve.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - private volatile java.lang.Object id_; - /** - *
-   * The unique identifier for the vulnerability. e.g. CVE-2021-34527
-   * 
- * - * string id = 1; - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - *
-   * The unique identifier for the vulnerability. e.g. CVE-2021-34527
-   * 
- * - * string id = 1; - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REFERENCES_FIELD_NUMBER = 2; - private java.util.List references_; - /** - *
-   * Additional information about the CVE.
-   * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Reference references = 2; - */ - @java.lang.Override - public java.util.List getReferencesList() { - return references_; - } - /** - *
-   * Additional information about the CVE.
-   * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Reference references = 2; - */ - @java.lang.Override - public java.util.List - getReferencesOrBuilderList() { - return references_; - } - /** - *
-   * Additional information about the CVE.
-   * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Reference references = 2; - */ - @java.lang.Override - public int getReferencesCount() { - return references_.size(); - } - /** - *
-   * Additional information about the CVE.
-   * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Reference references = 2; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Reference getReferences(int index) { - return references_.get(index); - } - /** - *
-   * Additional information about the CVE.
-   * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Reference references = 2; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.ReferenceOrBuilder getReferencesOrBuilder( - int index) { - return references_.get(index); - } - - public static final int CVSSV3_FIELD_NUMBER = 3; - private com.google.cloud.securitycenter.v1.Cvssv3 cvssv3_; - /** - *
-   * Describe Common Vulnerability Scoring System specified at
-   * https://www.first.org/cvss/v3.1/specification-document
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; - * @return Whether the cvssv3 field is set. - */ - @java.lang.Override - public boolean hasCvssv3() { - return cvssv3_ != null; - } - /** - *
-   * Describe Common Vulnerability Scoring System specified at
-   * https://www.first.org/cvss/v3.1/specification-document
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; - * @return The cvssv3. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Cvssv3 getCvssv3() { - return cvssv3_ == null ? com.google.cloud.securitycenter.v1.Cvssv3.getDefaultInstance() : cvssv3_; - } - /** - *
-   * Describe Common Vulnerability Scoring System specified at
-   * https://www.first.org/cvss/v3.1/specification-document
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Cvssv3OrBuilder getCvssv3OrBuilder() { - return getCvssv3(); - } - - public static final int UPSTREAM_FIX_AVAILABLE_FIELD_NUMBER = 4; - private boolean upstreamFixAvailable_; - /** - *
-   * Whether upstream fix is available for the CVE.
-   * 
- * - * bool upstream_fix_available = 4; - * @return The upstreamFixAvailable. - */ - @java.lang.Override - public boolean getUpstreamFixAvailable() { - return upstreamFixAvailable_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - for (int i = 0; i < references_.size(); i++) { - output.writeMessage(2, references_.get(i)); - } - if (cvssv3_ != null) { - output.writeMessage(3, getCvssv3()); - } - if (upstreamFixAvailable_ != false) { - output.writeBool(4, upstreamFixAvailable_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - for (int i = 0; i < references_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, references_.get(i)); - } - if (cvssv3_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getCvssv3()); - } - if (upstreamFixAvailable_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(4, upstreamFixAvailable_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.Cve)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.Cve other = (com.google.cloud.securitycenter.v1.Cve) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getReferencesList() - .equals(other.getReferencesList())) return false; - if (hasCvssv3() != other.hasCvssv3()) return false; - if (hasCvssv3()) { - if (!getCvssv3() - .equals(other.getCvssv3())) return false; - } - if (getUpstreamFixAvailable() - != other.getUpstreamFixAvailable()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - if (getReferencesCount() > 0) { - hash = (37 * hash) + REFERENCES_FIELD_NUMBER; - hash = (53 * hash) + getReferencesList().hashCode(); - } - if (hasCvssv3()) { - hash = (37 * hash) + CVSSV3_FIELD_NUMBER; - hash = (53 * hash) + getCvssv3().hashCode(); - } - hash = (37 * hash) + UPSTREAM_FIX_AVAILABLE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getUpstreamFixAvailable()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.Cve parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Cve parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Cve parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Cve parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Cve parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Cve parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Cve parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Cve parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Cve parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Cve parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Cve parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Cve parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.Cve prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * CVE stands for Common Vulnerabilities and Exposures.
-   * More information: https://cve.mitre.org
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Cve} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Cve) - com.google.cloud.securitycenter.v1.CveOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.VulnerabilityProto.internal_static_google_cloud_securitycenter_v1_Cve_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.VulnerabilityProto.internal_static_google_cloud_securitycenter_v1_Cve_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Cve.class, com.google.cloud.securitycenter.v1.Cve.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.Cve.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getReferencesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - id_ = ""; - - if (referencesBuilder_ == null) { - references_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - referencesBuilder_.clear(); - } - if (cvssv3Builder_ == null) { - cvssv3_ = null; - } else { - cvssv3_ = null; - cvssv3Builder_ = null; - } - upstreamFixAvailable_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.VulnerabilityProto.internal_static_google_cloud_securitycenter_v1_Cve_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Cve getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.Cve.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Cve build() { - com.google.cloud.securitycenter.v1.Cve result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Cve buildPartial() { - com.google.cloud.securitycenter.v1.Cve result = new com.google.cloud.securitycenter.v1.Cve(this); - int from_bitField0_ = bitField0_; - result.id_ = id_; - if (referencesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - references_ = java.util.Collections.unmodifiableList(references_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.references_ = references_; - } else { - result.references_ = referencesBuilder_.build(); - } - if (cvssv3Builder_ == null) { - result.cvssv3_ = cvssv3_; - } else { - result.cvssv3_ = cvssv3Builder_.build(); - } - result.upstreamFixAvailable_ = upstreamFixAvailable_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.Cve) { - return mergeFrom((com.google.cloud.securitycenter.v1.Cve)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.Cve other) { - if (other == com.google.cloud.securitycenter.v1.Cve.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - onChanged(); - } - if (referencesBuilder_ == null) { - if (!other.references_.isEmpty()) { - if (references_.isEmpty()) { - references_ = other.references_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureReferencesIsMutable(); - references_.addAll(other.references_); - } - onChanged(); - } - } else { - if (!other.references_.isEmpty()) { - if (referencesBuilder_.isEmpty()) { - referencesBuilder_.dispose(); - referencesBuilder_ = null; - references_ = other.references_; - bitField0_ = (bitField0_ & ~0x00000001); - referencesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getReferencesFieldBuilder() : null; - } else { - referencesBuilder_.addAllMessages(other.references_); - } - } - } - if (other.hasCvssv3()) { - mergeCvssv3(other.getCvssv3()); - } - if (other.getUpstreamFixAvailable() != false) { - setUpstreamFixAvailable(other.getUpstreamFixAvailable()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.Cve parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.Cve) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - *
-     * The unique identifier for the vulnerability. e.g. CVE-2021-34527
-     * 
- * - * string id = 1; - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The unique identifier for the vulnerability. e.g. CVE-2021-34527
-     * 
- * - * string id = 1; - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The unique identifier for the vulnerability. e.g. CVE-2021-34527
-     * 
- * - * string id = 1; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - id_ = value; - onChanged(); - return this; - } - /** - *
-     * The unique identifier for the vulnerability. e.g. CVE-2021-34527
-     * 
- * - * string id = 1; - * @return This builder for chaining. - */ - public Builder clearId() { - - id_ = getDefaultInstance().getId(); - onChanged(); - return this; - } - /** - *
-     * The unique identifier for the vulnerability. e.g. CVE-2021-34527
-     * 
- * - * string id = 1; - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - id_ = value; - onChanged(); - return this; - } - - private java.util.List references_ = - java.util.Collections.emptyList(); - private void ensureReferencesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - references_ = new java.util.ArrayList(references_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Reference, com.google.cloud.securitycenter.v1.Reference.Builder, com.google.cloud.securitycenter.v1.ReferenceOrBuilder> referencesBuilder_; - - /** - *
-     * Additional information about the CVE.
-     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Reference references = 2; - */ - public java.util.List getReferencesList() { - if (referencesBuilder_ == null) { - return java.util.Collections.unmodifiableList(references_); - } else { - return referencesBuilder_.getMessageList(); - } - } - /** - *
-     * Additional information about the CVE.
-     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Reference references = 2; - */ - public int getReferencesCount() { - if (referencesBuilder_ == null) { - return references_.size(); - } else { - return referencesBuilder_.getCount(); - } - } - /** - *
-     * Additional information about the CVE.
-     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Reference references = 2; - */ - public com.google.cloud.securitycenter.v1.Reference getReferences(int index) { - if (referencesBuilder_ == null) { - return references_.get(index); - } else { - return referencesBuilder_.getMessage(index); - } - } - /** - *
-     * Additional information about the CVE.
-     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Reference references = 2; - */ - public Builder setReferences( - int index, com.google.cloud.securitycenter.v1.Reference value) { - if (referencesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReferencesIsMutable(); - references_.set(index, value); - onChanged(); - } else { - referencesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Additional information about the CVE.
-     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Reference references = 2; - */ - public Builder setReferences( - int index, com.google.cloud.securitycenter.v1.Reference.Builder builderForValue) { - if (referencesBuilder_ == null) { - ensureReferencesIsMutable(); - references_.set(index, builderForValue.build()); - onChanged(); - } else { - referencesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Additional information about the CVE.
-     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Reference references = 2; - */ - public Builder addReferences(com.google.cloud.securitycenter.v1.Reference value) { - if (referencesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReferencesIsMutable(); - references_.add(value); - onChanged(); - } else { - referencesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Additional information about the CVE.
-     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Reference references = 2; - */ - public Builder addReferences( - int index, com.google.cloud.securitycenter.v1.Reference value) { - if (referencesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReferencesIsMutable(); - references_.add(index, value); - onChanged(); - } else { - referencesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Additional information about the CVE.
-     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Reference references = 2; - */ - public Builder addReferences( - com.google.cloud.securitycenter.v1.Reference.Builder builderForValue) { - if (referencesBuilder_ == null) { - ensureReferencesIsMutable(); - references_.add(builderForValue.build()); - onChanged(); - } else { - referencesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Additional information about the CVE.
-     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Reference references = 2; - */ - public Builder addReferences( - int index, com.google.cloud.securitycenter.v1.Reference.Builder builderForValue) { - if (referencesBuilder_ == null) { - ensureReferencesIsMutable(); - references_.add(index, builderForValue.build()); - onChanged(); - } else { - referencesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Additional information about the CVE.
-     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Reference references = 2; - */ - public Builder addAllReferences( - java.lang.Iterable values) { - if (referencesBuilder_ == null) { - ensureReferencesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, references_); - onChanged(); - } else { - referencesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Additional information about the CVE.
-     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Reference references = 2; - */ - public Builder clearReferences() { - if (referencesBuilder_ == null) { - references_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - referencesBuilder_.clear(); - } - return this; - } - /** - *
-     * Additional information about the CVE.
-     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Reference references = 2; - */ - public Builder removeReferences(int index) { - if (referencesBuilder_ == null) { - ensureReferencesIsMutable(); - references_.remove(index); - onChanged(); - } else { - referencesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Additional information about the CVE.
-     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Reference references = 2; - */ - public com.google.cloud.securitycenter.v1.Reference.Builder getReferencesBuilder( - int index) { - return getReferencesFieldBuilder().getBuilder(index); - } - /** - *
-     * Additional information about the CVE.
-     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Reference references = 2; - */ - public com.google.cloud.securitycenter.v1.ReferenceOrBuilder getReferencesOrBuilder( - int index) { - if (referencesBuilder_ == null) { - return references_.get(index); } else { - return referencesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Additional information about the CVE.
-     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Reference references = 2; - */ - public java.util.List - getReferencesOrBuilderList() { - if (referencesBuilder_ != null) { - return referencesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(references_); - } - } - /** - *
-     * Additional information about the CVE.
-     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Reference references = 2; - */ - public com.google.cloud.securitycenter.v1.Reference.Builder addReferencesBuilder() { - return getReferencesFieldBuilder().addBuilder( - com.google.cloud.securitycenter.v1.Reference.getDefaultInstance()); - } - /** - *
-     * Additional information about the CVE.
-     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Reference references = 2; - */ - public com.google.cloud.securitycenter.v1.Reference.Builder addReferencesBuilder( - int index) { - return getReferencesFieldBuilder().addBuilder( - index, com.google.cloud.securitycenter.v1.Reference.getDefaultInstance()); - } - /** - *
-     * Additional information about the CVE.
-     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Reference references = 2; - */ - public java.util.List - getReferencesBuilderList() { - return getReferencesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Reference, com.google.cloud.securitycenter.v1.Reference.Builder, com.google.cloud.securitycenter.v1.ReferenceOrBuilder> - getReferencesFieldBuilder() { - if (referencesBuilder_ == null) { - referencesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Reference, com.google.cloud.securitycenter.v1.Reference.Builder, com.google.cloud.securitycenter.v1.ReferenceOrBuilder>( - references_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - references_ = null; - } - return referencesBuilder_; - } - - private com.google.cloud.securitycenter.v1.Cvssv3 cvssv3_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Cvssv3, com.google.cloud.securitycenter.v1.Cvssv3.Builder, com.google.cloud.securitycenter.v1.Cvssv3OrBuilder> cvssv3Builder_; - /** - *
-     * Describe Common Vulnerability Scoring System specified at
-     * https://www.first.org/cvss/v3.1/specification-document
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; - * @return Whether the cvssv3 field is set. - */ - public boolean hasCvssv3() { - return cvssv3Builder_ != null || cvssv3_ != null; - } - /** - *
-     * Describe Common Vulnerability Scoring System specified at
-     * https://www.first.org/cvss/v3.1/specification-document
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; - * @return The cvssv3. - */ - public com.google.cloud.securitycenter.v1.Cvssv3 getCvssv3() { - if (cvssv3Builder_ == null) { - return cvssv3_ == null ? com.google.cloud.securitycenter.v1.Cvssv3.getDefaultInstance() : cvssv3_; - } else { - return cvssv3Builder_.getMessage(); - } - } - /** - *
-     * Describe Common Vulnerability Scoring System specified at
-     * https://www.first.org/cvss/v3.1/specification-document
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; - */ - public Builder setCvssv3(com.google.cloud.securitycenter.v1.Cvssv3 value) { - if (cvssv3Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - cvssv3_ = value; - onChanged(); - } else { - cvssv3Builder_.setMessage(value); - } - - return this; - } - /** - *
-     * Describe Common Vulnerability Scoring System specified at
-     * https://www.first.org/cvss/v3.1/specification-document
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; - */ - public Builder setCvssv3( - com.google.cloud.securitycenter.v1.Cvssv3.Builder builderForValue) { - if (cvssv3Builder_ == null) { - cvssv3_ = builderForValue.build(); - onChanged(); - } else { - cvssv3Builder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Describe Common Vulnerability Scoring System specified at
-     * https://www.first.org/cvss/v3.1/specification-document
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; - */ - public Builder mergeCvssv3(com.google.cloud.securitycenter.v1.Cvssv3 value) { - if (cvssv3Builder_ == null) { - if (cvssv3_ != null) { - cvssv3_ = - com.google.cloud.securitycenter.v1.Cvssv3.newBuilder(cvssv3_).mergeFrom(value).buildPartial(); - } else { - cvssv3_ = value; - } - onChanged(); - } else { - cvssv3Builder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Describe Common Vulnerability Scoring System specified at
-     * https://www.first.org/cvss/v3.1/specification-document
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; - */ - public Builder clearCvssv3() { - if (cvssv3Builder_ == null) { - cvssv3_ = null; - onChanged(); - } else { - cvssv3_ = null; - cvssv3Builder_ = null; - } - - return this; - } - /** - *
-     * Describe Common Vulnerability Scoring System specified at
-     * https://www.first.org/cvss/v3.1/specification-document
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; - */ - public com.google.cloud.securitycenter.v1.Cvssv3.Builder getCvssv3Builder() { - - onChanged(); - return getCvssv3FieldBuilder().getBuilder(); - } - /** - *
-     * Describe Common Vulnerability Scoring System specified at
-     * https://www.first.org/cvss/v3.1/specification-document
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; - */ - public com.google.cloud.securitycenter.v1.Cvssv3OrBuilder getCvssv3OrBuilder() { - if (cvssv3Builder_ != null) { - return cvssv3Builder_.getMessageOrBuilder(); - } else { - return cvssv3_ == null ? - com.google.cloud.securitycenter.v1.Cvssv3.getDefaultInstance() : cvssv3_; - } - } - /** - *
-     * Describe Common Vulnerability Scoring System specified at
-     * https://www.first.org/cvss/v3.1/specification-document
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Cvssv3, com.google.cloud.securitycenter.v1.Cvssv3.Builder, com.google.cloud.securitycenter.v1.Cvssv3OrBuilder> - getCvssv3FieldBuilder() { - if (cvssv3Builder_ == null) { - cvssv3Builder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Cvssv3, com.google.cloud.securitycenter.v1.Cvssv3.Builder, com.google.cloud.securitycenter.v1.Cvssv3OrBuilder>( - getCvssv3(), - getParentForChildren(), - isClean()); - cvssv3_ = null; - } - return cvssv3Builder_; - } - - private boolean upstreamFixAvailable_ ; - /** - *
-     * Whether upstream fix is available for the CVE.
-     * 
- * - * bool upstream_fix_available = 4; - * @return The upstreamFixAvailable. - */ - @java.lang.Override - public boolean getUpstreamFixAvailable() { - return upstreamFixAvailable_; - } - /** - *
-     * Whether upstream fix is available for the CVE.
-     * 
- * - * bool upstream_fix_available = 4; - * @param value The upstreamFixAvailable to set. - * @return This builder for chaining. - */ - public Builder setUpstreamFixAvailable(boolean value) { - - upstreamFixAvailable_ = value; - onChanged(); - return this; - } - /** - *
-     * Whether upstream fix is available for the CVE.
-     * 
- * - * bool upstream_fix_available = 4; - * @return This builder for chaining. - */ - public Builder clearUpstreamFixAvailable() { - - upstreamFixAvailable_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Cve) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Cve) - private static final com.google.cloud.securitycenter.v1.Cve DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Cve(); - } - - public static com.google.cloud.securitycenter.v1.Cve getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Cve parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Cve(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Cve getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CveOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CveOrBuilder.java deleted file mode 100644 index 049698d86761..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/CveOrBuilder.java +++ /dev/null @@ -1,118 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/vulnerability.proto - -package com.google.cloud.securitycenter.v1; - -public interface CveOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Cve) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The unique identifier for the vulnerability. e.g. CVE-2021-34527
-   * 
- * - * string id = 1; - * @return The id. - */ - java.lang.String getId(); - /** - *
-   * The unique identifier for the vulnerability. e.g. CVE-2021-34527
-   * 
- * - * string id = 1; - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - - /** - *
-   * Additional information about the CVE.
-   * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Reference references = 2; - */ - java.util.List - getReferencesList(); - /** - *
-   * Additional information about the CVE.
-   * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Reference references = 2; - */ - com.google.cloud.securitycenter.v1.Reference getReferences(int index); - /** - *
-   * Additional information about the CVE.
-   * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Reference references = 2; - */ - int getReferencesCount(); - /** - *
-   * Additional information about the CVE.
-   * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Reference references = 2; - */ - java.util.List - getReferencesOrBuilderList(); - /** - *
-   * Additional information about the CVE.
-   * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Reference references = 2; - */ - com.google.cloud.securitycenter.v1.ReferenceOrBuilder getReferencesOrBuilder( - int index); - - /** - *
-   * Describe Common Vulnerability Scoring System specified at
-   * https://www.first.org/cvss/v3.1/specification-document
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; - * @return Whether the cvssv3 field is set. - */ - boolean hasCvssv3(); - /** - *
-   * Describe Common Vulnerability Scoring System specified at
-   * https://www.first.org/cvss/v3.1/specification-document
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; - * @return The cvssv3. - */ - com.google.cloud.securitycenter.v1.Cvssv3 getCvssv3(); - /** - *
-   * Describe Common Vulnerability Scoring System specified at
-   * https://www.first.org/cvss/v3.1/specification-document
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; - */ - com.google.cloud.securitycenter.v1.Cvssv3OrBuilder getCvssv3OrBuilder(); - - /** - *
-   * Whether upstream fix is available for the CVE.
-   * 
- * - * bool upstream_fix_available = 4; - * @return The upstreamFixAvailable. - */ - boolean getUpstreamFixAvailable(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Cvssv3.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Cvssv3.java deleted file mode 100644 index 6e6bc286e028..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Cvssv3.java +++ /dev/null @@ -1,2582 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/vulnerability.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Common Vulnerability Scoring System version 3.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Cvssv3} - */ -public final class Cvssv3 extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Cvssv3) - Cvssv3OrBuilder { -private static final long serialVersionUID = 0L; - // Use Cvssv3.newBuilder() to construct. - private Cvssv3(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Cvssv3() { - attackVector_ = 0; - attackComplexity_ = 0; - privilegesRequired_ = 0; - userInteraction_ = 0; - scope_ = 0; - confidentialityImpact_ = 0; - integrityImpact_ = 0; - availabilityImpact_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Cvssv3(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Cvssv3( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 9: { - - baseScore_ = input.readDouble(); - break; - } - case 40: { - int rawValue = input.readEnum(); - - attackVector_ = rawValue; - break; - } - case 48: { - int rawValue = input.readEnum(); - - attackComplexity_ = rawValue; - break; - } - case 56: { - int rawValue = input.readEnum(); - - privilegesRequired_ = rawValue; - break; - } - case 64: { - int rawValue = input.readEnum(); - - userInteraction_ = rawValue; - break; - } - case 72: { - int rawValue = input.readEnum(); - - scope_ = rawValue; - break; - } - case 80: { - int rawValue = input.readEnum(); - - confidentialityImpact_ = rawValue; - break; - } - case 88: { - int rawValue = input.readEnum(); - - integrityImpact_ = rawValue; - break; - } - case 96: { - int rawValue = input.readEnum(); - - availabilityImpact_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.VulnerabilityProto.internal_static_google_cloud_securitycenter_v1_Cvssv3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.VulnerabilityProto.internal_static_google_cloud_securitycenter_v1_Cvssv3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Cvssv3.class, com.google.cloud.securitycenter.v1.Cvssv3.Builder.class); - } - - /** - *
-   * This metric reflects the context by which vulnerability exploitation is
-   * possible.
-   * 
- * - * Protobuf enum {@code google.cloud.securitycenter.v1.Cvssv3.AttackVector} - */ - public enum AttackVector - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Invalid value.
-     * 
- * - * ATTACK_VECTOR_UNSPECIFIED = 0; - */ - ATTACK_VECTOR_UNSPECIFIED(0), - /** - *
-     * The vulnerable component is bound to the network stack and the set of
-     * possible attackers extends beyond the other options listed below, up to
-     * and including the entire Internet.
-     * 
- * - * ATTACK_VECTOR_NETWORK = 1; - */ - ATTACK_VECTOR_NETWORK(1), - /** - *
-     * The vulnerable component is bound to the network stack, but the attack is
-     * limited at the protocol level to a logically adjacent topology.
-     * 
- * - * ATTACK_VECTOR_ADJACENT = 2; - */ - ATTACK_VECTOR_ADJACENT(2), - /** - *
-     * The vulnerable component is not bound to the network stack and the
-     * attacker's path is via read/write/execute capabilities.
-     * 
- * - * ATTACK_VECTOR_LOCAL = 3; - */ - ATTACK_VECTOR_LOCAL(3), - /** - *
-     * The attack requires the attacker to physically touch or manipulate the
-     * vulnerable component.
-     * 
- * - * ATTACK_VECTOR_PHYSICAL = 4; - */ - ATTACK_VECTOR_PHYSICAL(4), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Invalid value.
-     * 
- * - * ATTACK_VECTOR_UNSPECIFIED = 0; - */ - public static final int ATTACK_VECTOR_UNSPECIFIED_VALUE = 0; - /** - *
-     * The vulnerable component is bound to the network stack and the set of
-     * possible attackers extends beyond the other options listed below, up to
-     * and including the entire Internet.
-     * 
- * - * ATTACK_VECTOR_NETWORK = 1; - */ - public static final int ATTACK_VECTOR_NETWORK_VALUE = 1; - /** - *
-     * The vulnerable component is bound to the network stack, but the attack is
-     * limited at the protocol level to a logically adjacent topology.
-     * 
- * - * ATTACK_VECTOR_ADJACENT = 2; - */ - public static final int ATTACK_VECTOR_ADJACENT_VALUE = 2; - /** - *
-     * The vulnerable component is not bound to the network stack and the
-     * attacker's path is via read/write/execute capabilities.
-     * 
- * - * ATTACK_VECTOR_LOCAL = 3; - */ - public static final int ATTACK_VECTOR_LOCAL_VALUE = 3; - /** - *
-     * The attack requires the attacker to physically touch or manipulate the
-     * vulnerable component.
-     * 
- * - * ATTACK_VECTOR_PHYSICAL = 4; - */ - public static final int ATTACK_VECTOR_PHYSICAL_VALUE = 4; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AttackVector valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static AttackVector forNumber(int value) { - switch (value) { - case 0: return ATTACK_VECTOR_UNSPECIFIED; - case 1: return ATTACK_VECTOR_NETWORK; - case 2: return ATTACK_VECTOR_ADJACENT; - case 3: return ATTACK_VECTOR_LOCAL; - case 4: return ATTACK_VECTOR_PHYSICAL; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - AttackVector> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public AttackVector findValueByNumber(int number) { - return AttackVector.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.Cvssv3.getDescriptor().getEnumTypes().get(0); - } - - private static final AttackVector[] VALUES = values(); - - public static AttackVector valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private AttackVector(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v1.Cvssv3.AttackVector) - } - - /** - *
-   * This metric describes the conditions beyond the attacker's control that
-   * must exist in order to exploit the vulnerability.
-   * 
- * - * Protobuf enum {@code google.cloud.securitycenter.v1.Cvssv3.AttackComplexity} - */ - public enum AttackComplexity - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Invalid value.
-     * 
- * - * ATTACK_COMPLEXITY_UNSPECIFIED = 0; - */ - ATTACK_COMPLEXITY_UNSPECIFIED(0), - /** - *
-     * Specialized access conditions or extenuating circumstances do not exist.
-     * An attacker can expect repeatable success when attacking the vulnerable
-     * component.
-     * 
- * - * ATTACK_COMPLEXITY_LOW = 1; - */ - ATTACK_COMPLEXITY_LOW(1), - /** - *
-     * A successful attack depends on conditions beyond the attacker's control.
-     * That is, a successful attack cannot be accomplished at will, but requires
-     * the attacker to invest in some measurable amount of effort in preparation
-     * or execution against the vulnerable component before a successful attack
-     * can be expected.
-     * 
- * - * ATTACK_COMPLEXITY_HIGH = 2; - */ - ATTACK_COMPLEXITY_HIGH(2), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Invalid value.
-     * 
- * - * ATTACK_COMPLEXITY_UNSPECIFIED = 0; - */ - public static final int ATTACK_COMPLEXITY_UNSPECIFIED_VALUE = 0; - /** - *
-     * Specialized access conditions or extenuating circumstances do not exist.
-     * An attacker can expect repeatable success when attacking the vulnerable
-     * component.
-     * 
- * - * ATTACK_COMPLEXITY_LOW = 1; - */ - public static final int ATTACK_COMPLEXITY_LOW_VALUE = 1; - /** - *
-     * A successful attack depends on conditions beyond the attacker's control.
-     * That is, a successful attack cannot be accomplished at will, but requires
-     * the attacker to invest in some measurable amount of effort in preparation
-     * or execution against the vulnerable component before a successful attack
-     * can be expected.
-     * 
- * - * ATTACK_COMPLEXITY_HIGH = 2; - */ - public static final int ATTACK_COMPLEXITY_HIGH_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AttackComplexity valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static AttackComplexity forNumber(int value) { - switch (value) { - case 0: return ATTACK_COMPLEXITY_UNSPECIFIED; - case 1: return ATTACK_COMPLEXITY_LOW; - case 2: return ATTACK_COMPLEXITY_HIGH; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - AttackComplexity> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public AttackComplexity findValueByNumber(int number) { - return AttackComplexity.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.Cvssv3.getDescriptor().getEnumTypes().get(1); - } - - private static final AttackComplexity[] VALUES = values(); - - public static AttackComplexity valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private AttackComplexity(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v1.Cvssv3.AttackComplexity) - } - - /** - *
-   * This metric describes the level of privileges an attacker must possess
-   * before successfully exploiting the vulnerability.
-   * 
- * - * Protobuf enum {@code google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired} - */ - public enum PrivilegesRequired - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Invalid value.
-     * 
- * - * PRIVILEGES_REQUIRED_UNSPECIFIED = 0; - */ - PRIVILEGES_REQUIRED_UNSPECIFIED(0), - /** - *
-     * The attacker is unauthorized prior to attack, and therefore does not
-     * require any access to settings or files of the vulnerable system to
-     * carry out an attack.
-     * 
- * - * PRIVILEGES_REQUIRED_NONE = 1; - */ - PRIVILEGES_REQUIRED_NONE(1), - /** - *
-     * The attacker requires privileges that provide basic user capabilities
-     * that could normally affect only settings and files owned by a user.
-     * Alternatively, an attacker with Low privileges has the ability to access
-     * only non-sensitive resources.
-     * 
- * - * PRIVILEGES_REQUIRED_LOW = 2; - */ - PRIVILEGES_REQUIRED_LOW(2), - /** - *
-     * The attacker requires privileges that provide significant (e.g.,
-     * administrative) control over the vulnerable component allowing access to
-     * component-wide settings and files.
-     * 
- * - * PRIVILEGES_REQUIRED_HIGH = 3; - */ - PRIVILEGES_REQUIRED_HIGH(3), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Invalid value.
-     * 
- * - * PRIVILEGES_REQUIRED_UNSPECIFIED = 0; - */ - public static final int PRIVILEGES_REQUIRED_UNSPECIFIED_VALUE = 0; - /** - *
-     * The attacker is unauthorized prior to attack, and therefore does not
-     * require any access to settings or files of the vulnerable system to
-     * carry out an attack.
-     * 
- * - * PRIVILEGES_REQUIRED_NONE = 1; - */ - public static final int PRIVILEGES_REQUIRED_NONE_VALUE = 1; - /** - *
-     * The attacker requires privileges that provide basic user capabilities
-     * that could normally affect only settings and files owned by a user.
-     * Alternatively, an attacker with Low privileges has the ability to access
-     * only non-sensitive resources.
-     * 
- * - * PRIVILEGES_REQUIRED_LOW = 2; - */ - public static final int PRIVILEGES_REQUIRED_LOW_VALUE = 2; - /** - *
-     * The attacker requires privileges that provide significant (e.g.,
-     * administrative) control over the vulnerable component allowing access to
-     * component-wide settings and files.
-     * 
- * - * PRIVILEGES_REQUIRED_HIGH = 3; - */ - public static final int PRIVILEGES_REQUIRED_HIGH_VALUE = 3; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static PrivilegesRequired valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static PrivilegesRequired forNumber(int value) { - switch (value) { - case 0: return PRIVILEGES_REQUIRED_UNSPECIFIED; - case 1: return PRIVILEGES_REQUIRED_NONE; - case 2: return PRIVILEGES_REQUIRED_LOW; - case 3: return PRIVILEGES_REQUIRED_HIGH; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - PrivilegesRequired> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public PrivilegesRequired findValueByNumber(int number) { - return PrivilegesRequired.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.Cvssv3.getDescriptor().getEnumTypes().get(2); - } - - private static final PrivilegesRequired[] VALUES = values(); - - public static PrivilegesRequired valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private PrivilegesRequired(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired) - } - - /** - *
-   * This metric captures the requirement for a human user, other than the
-   * attacker, to participate in the successful compromise of the vulnerable
-   * component.
-   * 
- * - * Protobuf enum {@code google.cloud.securitycenter.v1.Cvssv3.UserInteraction} - */ - public enum UserInteraction - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Invalid value.
-     * 
- * - * USER_INTERACTION_UNSPECIFIED = 0; - */ - USER_INTERACTION_UNSPECIFIED(0), - /** - *
-     * The vulnerable system can be exploited without interaction from any user.
-     * 
- * - * USER_INTERACTION_NONE = 1; - */ - USER_INTERACTION_NONE(1), - /** - *
-     * Successful exploitation of this vulnerability requires a user to take
-     * some action before the vulnerability can be exploited.
-     * 
- * - * USER_INTERACTION_REQUIRED = 2; - */ - USER_INTERACTION_REQUIRED(2), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Invalid value.
-     * 
- * - * USER_INTERACTION_UNSPECIFIED = 0; - */ - public static final int USER_INTERACTION_UNSPECIFIED_VALUE = 0; - /** - *
-     * The vulnerable system can be exploited without interaction from any user.
-     * 
- * - * USER_INTERACTION_NONE = 1; - */ - public static final int USER_INTERACTION_NONE_VALUE = 1; - /** - *
-     * Successful exploitation of this vulnerability requires a user to take
-     * some action before the vulnerability can be exploited.
-     * 
- * - * USER_INTERACTION_REQUIRED = 2; - */ - public static final int USER_INTERACTION_REQUIRED_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static UserInteraction valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static UserInteraction forNumber(int value) { - switch (value) { - case 0: return USER_INTERACTION_UNSPECIFIED; - case 1: return USER_INTERACTION_NONE; - case 2: return USER_INTERACTION_REQUIRED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - UserInteraction> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public UserInteraction findValueByNumber(int number) { - return UserInteraction.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.Cvssv3.getDescriptor().getEnumTypes().get(3); - } - - private static final UserInteraction[] VALUES = values(); - - public static UserInteraction valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private UserInteraction(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v1.Cvssv3.UserInteraction) - } - - /** - *
-   * The Scope metric captures whether a vulnerability in one vulnerable
-   * component impacts resources in components beyond its security scope.
-   * 
- * - * Protobuf enum {@code google.cloud.securitycenter.v1.Cvssv3.Scope} - */ - public enum Scope - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Invalid value.
-     * 
- * - * SCOPE_UNSPECIFIED = 0; - */ - SCOPE_UNSPECIFIED(0), - /** - *
-     * An exploited vulnerability can only affect resources managed by the same
-     * security authority.
-     * 
- * - * SCOPE_UNCHANGED = 1; - */ - SCOPE_UNCHANGED(1), - /** - *
-     * An exploited vulnerability can affect resources beyond the security scope
-     * managed by the security authority of the vulnerable component.
-     * 
- * - * SCOPE_CHANGED = 2; - */ - SCOPE_CHANGED(2), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Invalid value.
-     * 
- * - * SCOPE_UNSPECIFIED = 0; - */ - public static final int SCOPE_UNSPECIFIED_VALUE = 0; - /** - *
-     * An exploited vulnerability can only affect resources managed by the same
-     * security authority.
-     * 
- * - * SCOPE_UNCHANGED = 1; - */ - public static final int SCOPE_UNCHANGED_VALUE = 1; - /** - *
-     * An exploited vulnerability can affect resources beyond the security scope
-     * managed by the security authority of the vulnerable component.
-     * 
- * - * SCOPE_CHANGED = 2; - */ - public static final int SCOPE_CHANGED_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Scope valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Scope forNumber(int value) { - switch (value) { - case 0: return SCOPE_UNSPECIFIED; - case 1: return SCOPE_UNCHANGED; - case 2: return SCOPE_CHANGED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Scope> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Scope findValueByNumber(int number) { - return Scope.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.Cvssv3.getDescriptor().getEnumTypes().get(4); - } - - private static final Scope[] VALUES = values(); - - public static Scope valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Scope(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v1.Cvssv3.Scope) - } - - /** - *
-   * The Impact metrics capture the effects of a successfully exploited
-   * vulnerability on the component that suffers the worst outcome that is most
-   * directly and predictably associated with the attack.
-   * 
- * - * Protobuf enum {@code google.cloud.securitycenter.v1.Cvssv3.Impact} - */ - public enum Impact - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Invalid value.
-     * 
- * - * IMPACT_UNSPECIFIED = 0; - */ - IMPACT_UNSPECIFIED(0), - /** - *
-     * High impact.
-     * 
- * - * IMPACT_HIGH = 1; - */ - IMPACT_HIGH(1), - /** - *
-     * Low impact.
-     * 
- * - * IMPACT_LOW = 2; - */ - IMPACT_LOW(2), - /** - *
-     * No impact.
-     * 
- * - * IMPACT_NONE = 3; - */ - IMPACT_NONE(3), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Invalid value.
-     * 
- * - * IMPACT_UNSPECIFIED = 0; - */ - public static final int IMPACT_UNSPECIFIED_VALUE = 0; - /** - *
-     * High impact.
-     * 
- * - * IMPACT_HIGH = 1; - */ - public static final int IMPACT_HIGH_VALUE = 1; - /** - *
-     * Low impact.
-     * 
- * - * IMPACT_LOW = 2; - */ - public static final int IMPACT_LOW_VALUE = 2; - /** - *
-     * No impact.
-     * 
- * - * IMPACT_NONE = 3; - */ - public static final int IMPACT_NONE_VALUE = 3; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Impact valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Impact forNumber(int value) { - switch (value) { - case 0: return IMPACT_UNSPECIFIED; - case 1: return IMPACT_HIGH; - case 2: return IMPACT_LOW; - case 3: return IMPACT_NONE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Impact> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Impact findValueByNumber(int number) { - return Impact.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.Cvssv3.getDescriptor().getEnumTypes().get(5); - } - - private static final Impact[] VALUES = values(); - - public static Impact valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Impact(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v1.Cvssv3.Impact) - } - - public static final int BASE_SCORE_FIELD_NUMBER = 1; - private double baseScore_; - /** - *
-   * The base score is a function of the base metric scores.
-   * 
- * - * double base_score = 1; - * @return The baseScore. - */ - @java.lang.Override - public double getBaseScore() { - return baseScore_; - } - - public static final int ATTACK_VECTOR_FIELD_NUMBER = 5; - private int attackVector_; - /** - *
-   * Base Metrics
-   * Represents the intrinsic characteristics of a vulnerability that are
-   * constant over time and across user environments.
-   * This metric reflects the context by which vulnerability exploitation is
-   * possible.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.AttackVector attack_vector = 5; - * @return The enum numeric value on the wire for attackVector. - */ - @java.lang.Override public int getAttackVectorValue() { - return attackVector_; - } - /** - *
-   * Base Metrics
-   * Represents the intrinsic characteristics of a vulnerability that are
-   * constant over time and across user environments.
-   * This metric reflects the context by which vulnerability exploitation is
-   * possible.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.AttackVector attack_vector = 5; - * @return The attackVector. - */ - @java.lang.Override public com.google.cloud.securitycenter.v1.Cvssv3.AttackVector getAttackVector() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.Cvssv3.AttackVector result = com.google.cloud.securitycenter.v1.Cvssv3.AttackVector.valueOf(attackVector_); - return result == null ? com.google.cloud.securitycenter.v1.Cvssv3.AttackVector.UNRECOGNIZED : result; - } - - public static final int ATTACK_COMPLEXITY_FIELD_NUMBER = 6; - private int attackComplexity_; - /** - *
-   * This metric describes the conditions beyond the attacker's control that
-   * must exist in order to exploit the vulnerability.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.AttackComplexity attack_complexity = 6; - * @return The enum numeric value on the wire for attackComplexity. - */ - @java.lang.Override public int getAttackComplexityValue() { - return attackComplexity_; - } - /** - *
-   * This metric describes the conditions beyond the attacker's control that
-   * must exist in order to exploit the vulnerability.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.AttackComplexity attack_complexity = 6; - * @return The attackComplexity. - */ - @java.lang.Override public com.google.cloud.securitycenter.v1.Cvssv3.AttackComplexity getAttackComplexity() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.Cvssv3.AttackComplexity result = com.google.cloud.securitycenter.v1.Cvssv3.AttackComplexity.valueOf(attackComplexity_); - return result == null ? com.google.cloud.securitycenter.v1.Cvssv3.AttackComplexity.UNRECOGNIZED : result; - } - - public static final int PRIVILEGES_REQUIRED_FIELD_NUMBER = 7; - private int privilegesRequired_; - /** - *
-   * This metric describes the level of privileges an attacker must possess
-   * before successfully exploiting the vulnerability.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired privileges_required = 7; - * @return The enum numeric value on the wire for privilegesRequired. - */ - @java.lang.Override public int getPrivilegesRequiredValue() { - return privilegesRequired_; - } - /** - *
-   * This metric describes the level of privileges an attacker must possess
-   * before successfully exploiting the vulnerability.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired privileges_required = 7; - * @return The privilegesRequired. - */ - @java.lang.Override public com.google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired getPrivilegesRequired() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired result = com.google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired.valueOf(privilegesRequired_); - return result == null ? com.google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired.UNRECOGNIZED : result; - } - - public static final int USER_INTERACTION_FIELD_NUMBER = 8; - private int userInteraction_; - /** - *
-   * This metric captures the requirement for a human user, other than the
-   * attacker, to participate in the successful compromise of the vulnerable
-   * component.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.UserInteraction user_interaction = 8; - * @return The enum numeric value on the wire for userInteraction. - */ - @java.lang.Override public int getUserInteractionValue() { - return userInteraction_; - } - /** - *
-   * This metric captures the requirement for a human user, other than the
-   * attacker, to participate in the successful compromise of the vulnerable
-   * component.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.UserInteraction user_interaction = 8; - * @return The userInteraction. - */ - @java.lang.Override public com.google.cloud.securitycenter.v1.Cvssv3.UserInteraction getUserInteraction() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.Cvssv3.UserInteraction result = com.google.cloud.securitycenter.v1.Cvssv3.UserInteraction.valueOf(userInteraction_); - return result == null ? com.google.cloud.securitycenter.v1.Cvssv3.UserInteraction.UNRECOGNIZED : result; - } - - public static final int SCOPE_FIELD_NUMBER = 9; - private int scope_; - /** - *
-   * The Scope metric captures whether a vulnerability in one vulnerable
-   * component impacts resources in components beyond its security scope.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Scope scope = 9; - * @return The enum numeric value on the wire for scope. - */ - @java.lang.Override public int getScopeValue() { - return scope_; - } - /** - *
-   * The Scope metric captures whether a vulnerability in one vulnerable
-   * component impacts resources in components beyond its security scope.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Scope scope = 9; - * @return The scope. - */ - @java.lang.Override public com.google.cloud.securitycenter.v1.Cvssv3.Scope getScope() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.Cvssv3.Scope result = com.google.cloud.securitycenter.v1.Cvssv3.Scope.valueOf(scope_); - return result == null ? com.google.cloud.securitycenter.v1.Cvssv3.Scope.UNRECOGNIZED : result; - } - - public static final int CONFIDENTIALITY_IMPACT_FIELD_NUMBER = 10; - private int confidentialityImpact_; - /** - *
-   * This metric measures the impact to the confidentiality of the information
-   * resources managed by a software component due to a successfully exploited
-   * vulnerability.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Impact confidentiality_impact = 10; - * @return The enum numeric value on the wire for confidentialityImpact. - */ - @java.lang.Override public int getConfidentialityImpactValue() { - return confidentialityImpact_; - } - /** - *
-   * This metric measures the impact to the confidentiality of the information
-   * resources managed by a software component due to a successfully exploited
-   * vulnerability.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Impact confidentiality_impact = 10; - * @return The confidentialityImpact. - */ - @java.lang.Override public com.google.cloud.securitycenter.v1.Cvssv3.Impact getConfidentialityImpact() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.Cvssv3.Impact result = com.google.cloud.securitycenter.v1.Cvssv3.Impact.valueOf(confidentialityImpact_); - return result == null ? com.google.cloud.securitycenter.v1.Cvssv3.Impact.UNRECOGNIZED : result; - } - - public static final int INTEGRITY_IMPACT_FIELD_NUMBER = 11; - private int integrityImpact_; - /** - *
-   * This metric measures the impact to integrity of a successfully exploited
-   * vulnerability.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Impact integrity_impact = 11; - * @return The enum numeric value on the wire for integrityImpact. - */ - @java.lang.Override public int getIntegrityImpactValue() { - return integrityImpact_; - } - /** - *
-   * This metric measures the impact to integrity of a successfully exploited
-   * vulnerability.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Impact integrity_impact = 11; - * @return The integrityImpact. - */ - @java.lang.Override public com.google.cloud.securitycenter.v1.Cvssv3.Impact getIntegrityImpact() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.Cvssv3.Impact result = com.google.cloud.securitycenter.v1.Cvssv3.Impact.valueOf(integrityImpact_); - return result == null ? com.google.cloud.securitycenter.v1.Cvssv3.Impact.UNRECOGNIZED : result; - } - - public static final int AVAILABILITY_IMPACT_FIELD_NUMBER = 12; - private int availabilityImpact_; - /** - *
-   * This metric measures the impact to the availability of the impacted
-   * component resulting from a successfully exploited vulnerability.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Impact availability_impact = 12; - * @return The enum numeric value on the wire for availabilityImpact. - */ - @java.lang.Override public int getAvailabilityImpactValue() { - return availabilityImpact_; - } - /** - *
-   * This metric measures the impact to the availability of the impacted
-   * component resulting from a successfully exploited vulnerability.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Impact availability_impact = 12; - * @return The availabilityImpact. - */ - @java.lang.Override public com.google.cloud.securitycenter.v1.Cvssv3.Impact getAvailabilityImpact() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.Cvssv3.Impact result = com.google.cloud.securitycenter.v1.Cvssv3.Impact.valueOf(availabilityImpact_); - return result == null ? com.google.cloud.securitycenter.v1.Cvssv3.Impact.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (java.lang.Double.doubleToRawLongBits(baseScore_) != 0) { - output.writeDouble(1, baseScore_); - } - if (attackVector_ != com.google.cloud.securitycenter.v1.Cvssv3.AttackVector.ATTACK_VECTOR_UNSPECIFIED.getNumber()) { - output.writeEnum(5, attackVector_); - } - if (attackComplexity_ != com.google.cloud.securitycenter.v1.Cvssv3.AttackComplexity.ATTACK_COMPLEXITY_UNSPECIFIED.getNumber()) { - output.writeEnum(6, attackComplexity_); - } - if (privilegesRequired_ != com.google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired.PRIVILEGES_REQUIRED_UNSPECIFIED.getNumber()) { - output.writeEnum(7, privilegesRequired_); - } - if (userInteraction_ != com.google.cloud.securitycenter.v1.Cvssv3.UserInteraction.USER_INTERACTION_UNSPECIFIED.getNumber()) { - output.writeEnum(8, userInteraction_); - } - if (scope_ != com.google.cloud.securitycenter.v1.Cvssv3.Scope.SCOPE_UNSPECIFIED.getNumber()) { - output.writeEnum(9, scope_); - } - if (confidentialityImpact_ != com.google.cloud.securitycenter.v1.Cvssv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { - output.writeEnum(10, confidentialityImpact_); - } - if (integrityImpact_ != com.google.cloud.securitycenter.v1.Cvssv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { - output.writeEnum(11, integrityImpact_); - } - if (availabilityImpact_ != com.google.cloud.securitycenter.v1.Cvssv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { - output.writeEnum(12, availabilityImpact_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Double.doubleToRawLongBits(baseScore_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(1, baseScore_); - } - if (attackVector_ != com.google.cloud.securitycenter.v1.Cvssv3.AttackVector.ATTACK_VECTOR_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(5, attackVector_); - } - if (attackComplexity_ != com.google.cloud.securitycenter.v1.Cvssv3.AttackComplexity.ATTACK_COMPLEXITY_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(6, attackComplexity_); - } - if (privilegesRequired_ != com.google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired.PRIVILEGES_REQUIRED_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(7, privilegesRequired_); - } - if (userInteraction_ != com.google.cloud.securitycenter.v1.Cvssv3.UserInteraction.USER_INTERACTION_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(8, userInteraction_); - } - if (scope_ != com.google.cloud.securitycenter.v1.Cvssv3.Scope.SCOPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(9, scope_); - } - if (confidentialityImpact_ != com.google.cloud.securitycenter.v1.Cvssv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(10, confidentialityImpact_); - } - if (integrityImpact_ != com.google.cloud.securitycenter.v1.Cvssv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(11, integrityImpact_); - } - if (availabilityImpact_ != com.google.cloud.securitycenter.v1.Cvssv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(12, availabilityImpact_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.Cvssv3)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.Cvssv3 other = (com.google.cloud.securitycenter.v1.Cvssv3) obj; - - if (java.lang.Double.doubleToLongBits(getBaseScore()) - != java.lang.Double.doubleToLongBits( - other.getBaseScore())) return false; - if (attackVector_ != other.attackVector_) return false; - if (attackComplexity_ != other.attackComplexity_) return false; - if (privilegesRequired_ != other.privilegesRequired_) return false; - if (userInteraction_ != other.userInteraction_) return false; - if (scope_ != other.scope_) return false; - if (confidentialityImpact_ != other.confidentialityImpact_) return false; - if (integrityImpact_ != other.integrityImpact_) return false; - if (availabilityImpact_ != other.availabilityImpact_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + BASE_SCORE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getBaseScore())); - hash = (37 * hash) + ATTACK_VECTOR_FIELD_NUMBER; - hash = (53 * hash) + attackVector_; - hash = (37 * hash) + ATTACK_COMPLEXITY_FIELD_NUMBER; - hash = (53 * hash) + attackComplexity_; - hash = (37 * hash) + PRIVILEGES_REQUIRED_FIELD_NUMBER; - hash = (53 * hash) + privilegesRequired_; - hash = (37 * hash) + USER_INTERACTION_FIELD_NUMBER; - hash = (53 * hash) + userInteraction_; - hash = (37 * hash) + SCOPE_FIELD_NUMBER; - hash = (53 * hash) + scope_; - hash = (37 * hash) + CONFIDENTIALITY_IMPACT_FIELD_NUMBER; - hash = (53 * hash) + confidentialityImpact_; - hash = (37 * hash) + INTEGRITY_IMPACT_FIELD_NUMBER; - hash = (53 * hash) + integrityImpact_; - hash = (37 * hash) + AVAILABILITY_IMPACT_FIELD_NUMBER; - hash = (53 * hash) + availabilityImpact_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.Cvssv3 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Cvssv3 parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Cvssv3 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Cvssv3 parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Cvssv3 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Cvssv3 parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Cvssv3 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Cvssv3 parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Cvssv3 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Cvssv3 parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Cvssv3 parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Cvssv3 parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.Cvssv3 prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Common Vulnerability Scoring System version 3.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Cvssv3} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Cvssv3) - com.google.cloud.securitycenter.v1.Cvssv3OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.VulnerabilityProto.internal_static_google_cloud_securitycenter_v1_Cvssv3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.VulnerabilityProto.internal_static_google_cloud_securitycenter_v1_Cvssv3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Cvssv3.class, com.google.cloud.securitycenter.v1.Cvssv3.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.Cvssv3.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - baseScore_ = 0D; - - attackVector_ = 0; - - attackComplexity_ = 0; - - privilegesRequired_ = 0; - - userInteraction_ = 0; - - scope_ = 0; - - confidentialityImpact_ = 0; - - integrityImpact_ = 0; - - availabilityImpact_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.VulnerabilityProto.internal_static_google_cloud_securitycenter_v1_Cvssv3_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Cvssv3 getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.Cvssv3.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Cvssv3 build() { - com.google.cloud.securitycenter.v1.Cvssv3 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Cvssv3 buildPartial() { - com.google.cloud.securitycenter.v1.Cvssv3 result = new com.google.cloud.securitycenter.v1.Cvssv3(this); - result.baseScore_ = baseScore_; - result.attackVector_ = attackVector_; - result.attackComplexity_ = attackComplexity_; - result.privilegesRequired_ = privilegesRequired_; - result.userInteraction_ = userInteraction_; - result.scope_ = scope_; - result.confidentialityImpact_ = confidentialityImpact_; - result.integrityImpact_ = integrityImpact_; - result.availabilityImpact_ = availabilityImpact_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.Cvssv3) { - return mergeFrom((com.google.cloud.securitycenter.v1.Cvssv3)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.Cvssv3 other) { - if (other == com.google.cloud.securitycenter.v1.Cvssv3.getDefaultInstance()) return this; - if (other.getBaseScore() != 0D) { - setBaseScore(other.getBaseScore()); - } - if (other.attackVector_ != 0) { - setAttackVectorValue(other.getAttackVectorValue()); - } - if (other.attackComplexity_ != 0) { - setAttackComplexityValue(other.getAttackComplexityValue()); - } - if (other.privilegesRequired_ != 0) { - setPrivilegesRequiredValue(other.getPrivilegesRequiredValue()); - } - if (other.userInteraction_ != 0) { - setUserInteractionValue(other.getUserInteractionValue()); - } - if (other.scope_ != 0) { - setScopeValue(other.getScopeValue()); - } - if (other.confidentialityImpact_ != 0) { - setConfidentialityImpactValue(other.getConfidentialityImpactValue()); - } - if (other.integrityImpact_ != 0) { - setIntegrityImpactValue(other.getIntegrityImpactValue()); - } - if (other.availabilityImpact_ != 0) { - setAvailabilityImpactValue(other.getAvailabilityImpactValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.Cvssv3 parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.Cvssv3) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private double baseScore_ ; - /** - *
-     * The base score is a function of the base metric scores.
-     * 
- * - * double base_score = 1; - * @return The baseScore. - */ - @java.lang.Override - public double getBaseScore() { - return baseScore_; - } - /** - *
-     * The base score is a function of the base metric scores.
-     * 
- * - * double base_score = 1; - * @param value The baseScore to set. - * @return This builder for chaining. - */ - public Builder setBaseScore(double value) { - - baseScore_ = value; - onChanged(); - return this; - } - /** - *
-     * The base score is a function of the base metric scores.
-     * 
- * - * double base_score = 1; - * @return This builder for chaining. - */ - public Builder clearBaseScore() { - - baseScore_ = 0D; - onChanged(); - return this; - } - - private int attackVector_ = 0; - /** - *
-     * Base Metrics
-     * Represents the intrinsic characteristics of a vulnerability that are
-     * constant over time and across user environments.
-     * This metric reflects the context by which vulnerability exploitation is
-     * possible.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.AttackVector attack_vector = 5; - * @return The enum numeric value on the wire for attackVector. - */ - @java.lang.Override public int getAttackVectorValue() { - return attackVector_; - } - /** - *
-     * Base Metrics
-     * Represents the intrinsic characteristics of a vulnerability that are
-     * constant over time and across user environments.
-     * This metric reflects the context by which vulnerability exploitation is
-     * possible.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.AttackVector attack_vector = 5; - * @param value The enum numeric value on the wire for attackVector to set. - * @return This builder for chaining. - */ - public Builder setAttackVectorValue(int value) { - - attackVector_ = value; - onChanged(); - return this; - } - /** - *
-     * Base Metrics
-     * Represents the intrinsic characteristics of a vulnerability that are
-     * constant over time and across user environments.
-     * This metric reflects the context by which vulnerability exploitation is
-     * possible.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.AttackVector attack_vector = 5; - * @return The attackVector. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Cvssv3.AttackVector getAttackVector() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.Cvssv3.AttackVector result = com.google.cloud.securitycenter.v1.Cvssv3.AttackVector.valueOf(attackVector_); - return result == null ? com.google.cloud.securitycenter.v1.Cvssv3.AttackVector.UNRECOGNIZED : result; - } - /** - *
-     * Base Metrics
-     * Represents the intrinsic characteristics of a vulnerability that are
-     * constant over time and across user environments.
-     * This metric reflects the context by which vulnerability exploitation is
-     * possible.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.AttackVector attack_vector = 5; - * @param value The attackVector to set. - * @return This builder for chaining. - */ - public Builder setAttackVector(com.google.cloud.securitycenter.v1.Cvssv3.AttackVector value) { - if (value == null) { - throw new NullPointerException(); - } - - attackVector_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Base Metrics
-     * Represents the intrinsic characteristics of a vulnerability that are
-     * constant over time and across user environments.
-     * This metric reflects the context by which vulnerability exploitation is
-     * possible.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.AttackVector attack_vector = 5; - * @return This builder for chaining. - */ - public Builder clearAttackVector() { - - attackVector_ = 0; - onChanged(); - return this; - } - - private int attackComplexity_ = 0; - /** - *
-     * This metric describes the conditions beyond the attacker's control that
-     * must exist in order to exploit the vulnerability.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.AttackComplexity attack_complexity = 6; - * @return The enum numeric value on the wire for attackComplexity. - */ - @java.lang.Override public int getAttackComplexityValue() { - return attackComplexity_; - } - /** - *
-     * This metric describes the conditions beyond the attacker's control that
-     * must exist in order to exploit the vulnerability.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.AttackComplexity attack_complexity = 6; - * @param value The enum numeric value on the wire for attackComplexity to set. - * @return This builder for chaining. - */ - public Builder setAttackComplexityValue(int value) { - - attackComplexity_ = value; - onChanged(); - return this; - } - /** - *
-     * This metric describes the conditions beyond the attacker's control that
-     * must exist in order to exploit the vulnerability.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.AttackComplexity attack_complexity = 6; - * @return The attackComplexity. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Cvssv3.AttackComplexity getAttackComplexity() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.Cvssv3.AttackComplexity result = com.google.cloud.securitycenter.v1.Cvssv3.AttackComplexity.valueOf(attackComplexity_); - return result == null ? com.google.cloud.securitycenter.v1.Cvssv3.AttackComplexity.UNRECOGNIZED : result; - } - /** - *
-     * This metric describes the conditions beyond the attacker's control that
-     * must exist in order to exploit the vulnerability.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.AttackComplexity attack_complexity = 6; - * @param value The attackComplexity to set. - * @return This builder for chaining. - */ - public Builder setAttackComplexity(com.google.cloud.securitycenter.v1.Cvssv3.AttackComplexity value) { - if (value == null) { - throw new NullPointerException(); - } - - attackComplexity_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * This metric describes the conditions beyond the attacker's control that
-     * must exist in order to exploit the vulnerability.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.AttackComplexity attack_complexity = 6; - * @return This builder for chaining. - */ - public Builder clearAttackComplexity() { - - attackComplexity_ = 0; - onChanged(); - return this; - } - - private int privilegesRequired_ = 0; - /** - *
-     * This metric describes the level of privileges an attacker must possess
-     * before successfully exploiting the vulnerability.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired privileges_required = 7; - * @return The enum numeric value on the wire for privilegesRequired. - */ - @java.lang.Override public int getPrivilegesRequiredValue() { - return privilegesRequired_; - } - /** - *
-     * This metric describes the level of privileges an attacker must possess
-     * before successfully exploiting the vulnerability.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired privileges_required = 7; - * @param value The enum numeric value on the wire for privilegesRequired to set. - * @return This builder for chaining. - */ - public Builder setPrivilegesRequiredValue(int value) { - - privilegesRequired_ = value; - onChanged(); - return this; - } - /** - *
-     * This metric describes the level of privileges an attacker must possess
-     * before successfully exploiting the vulnerability.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired privileges_required = 7; - * @return The privilegesRequired. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired getPrivilegesRequired() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired result = com.google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired.valueOf(privilegesRequired_); - return result == null ? com.google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired.UNRECOGNIZED : result; - } - /** - *
-     * This metric describes the level of privileges an attacker must possess
-     * before successfully exploiting the vulnerability.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired privileges_required = 7; - * @param value The privilegesRequired to set. - * @return This builder for chaining. - */ - public Builder setPrivilegesRequired(com.google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired value) { - if (value == null) { - throw new NullPointerException(); - } - - privilegesRequired_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * This metric describes the level of privileges an attacker must possess
-     * before successfully exploiting the vulnerability.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired privileges_required = 7; - * @return This builder for chaining. - */ - public Builder clearPrivilegesRequired() { - - privilegesRequired_ = 0; - onChanged(); - return this; - } - - private int userInteraction_ = 0; - /** - *
-     * This metric captures the requirement for a human user, other than the
-     * attacker, to participate in the successful compromise of the vulnerable
-     * component.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.UserInteraction user_interaction = 8; - * @return The enum numeric value on the wire for userInteraction. - */ - @java.lang.Override public int getUserInteractionValue() { - return userInteraction_; - } - /** - *
-     * This metric captures the requirement for a human user, other than the
-     * attacker, to participate in the successful compromise of the vulnerable
-     * component.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.UserInteraction user_interaction = 8; - * @param value The enum numeric value on the wire for userInteraction to set. - * @return This builder for chaining. - */ - public Builder setUserInteractionValue(int value) { - - userInteraction_ = value; - onChanged(); - return this; - } - /** - *
-     * This metric captures the requirement for a human user, other than the
-     * attacker, to participate in the successful compromise of the vulnerable
-     * component.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.UserInteraction user_interaction = 8; - * @return The userInteraction. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Cvssv3.UserInteraction getUserInteraction() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.Cvssv3.UserInteraction result = com.google.cloud.securitycenter.v1.Cvssv3.UserInteraction.valueOf(userInteraction_); - return result == null ? com.google.cloud.securitycenter.v1.Cvssv3.UserInteraction.UNRECOGNIZED : result; - } - /** - *
-     * This metric captures the requirement for a human user, other than the
-     * attacker, to participate in the successful compromise of the vulnerable
-     * component.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.UserInteraction user_interaction = 8; - * @param value The userInteraction to set. - * @return This builder for chaining. - */ - public Builder setUserInteraction(com.google.cloud.securitycenter.v1.Cvssv3.UserInteraction value) { - if (value == null) { - throw new NullPointerException(); - } - - userInteraction_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * This metric captures the requirement for a human user, other than the
-     * attacker, to participate in the successful compromise of the vulnerable
-     * component.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.UserInteraction user_interaction = 8; - * @return This builder for chaining. - */ - public Builder clearUserInteraction() { - - userInteraction_ = 0; - onChanged(); - return this; - } - - private int scope_ = 0; - /** - *
-     * The Scope metric captures whether a vulnerability in one vulnerable
-     * component impacts resources in components beyond its security scope.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Scope scope = 9; - * @return The enum numeric value on the wire for scope. - */ - @java.lang.Override public int getScopeValue() { - return scope_; - } - /** - *
-     * The Scope metric captures whether a vulnerability in one vulnerable
-     * component impacts resources in components beyond its security scope.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Scope scope = 9; - * @param value The enum numeric value on the wire for scope to set. - * @return This builder for chaining. - */ - public Builder setScopeValue(int value) { - - scope_ = value; - onChanged(); - return this; - } - /** - *
-     * The Scope metric captures whether a vulnerability in one vulnerable
-     * component impacts resources in components beyond its security scope.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Scope scope = 9; - * @return The scope. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Cvssv3.Scope getScope() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.Cvssv3.Scope result = com.google.cloud.securitycenter.v1.Cvssv3.Scope.valueOf(scope_); - return result == null ? com.google.cloud.securitycenter.v1.Cvssv3.Scope.UNRECOGNIZED : result; - } - /** - *
-     * The Scope metric captures whether a vulnerability in one vulnerable
-     * component impacts resources in components beyond its security scope.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Scope scope = 9; - * @param value The scope to set. - * @return This builder for chaining. - */ - public Builder setScope(com.google.cloud.securitycenter.v1.Cvssv3.Scope value) { - if (value == null) { - throw new NullPointerException(); - } - - scope_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The Scope metric captures whether a vulnerability in one vulnerable
-     * component impacts resources in components beyond its security scope.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Scope scope = 9; - * @return This builder for chaining. - */ - public Builder clearScope() { - - scope_ = 0; - onChanged(); - return this; - } - - private int confidentialityImpact_ = 0; - /** - *
-     * This metric measures the impact to the confidentiality of the information
-     * resources managed by a software component due to a successfully exploited
-     * vulnerability.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Impact confidentiality_impact = 10; - * @return The enum numeric value on the wire for confidentialityImpact. - */ - @java.lang.Override public int getConfidentialityImpactValue() { - return confidentialityImpact_; - } - /** - *
-     * This metric measures the impact to the confidentiality of the information
-     * resources managed by a software component due to a successfully exploited
-     * vulnerability.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Impact confidentiality_impact = 10; - * @param value The enum numeric value on the wire for confidentialityImpact to set. - * @return This builder for chaining. - */ - public Builder setConfidentialityImpactValue(int value) { - - confidentialityImpact_ = value; - onChanged(); - return this; - } - /** - *
-     * This metric measures the impact to the confidentiality of the information
-     * resources managed by a software component due to a successfully exploited
-     * vulnerability.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Impact confidentiality_impact = 10; - * @return The confidentialityImpact. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Cvssv3.Impact getConfidentialityImpact() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.Cvssv3.Impact result = com.google.cloud.securitycenter.v1.Cvssv3.Impact.valueOf(confidentialityImpact_); - return result == null ? com.google.cloud.securitycenter.v1.Cvssv3.Impact.UNRECOGNIZED : result; - } - /** - *
-     * This metric measures the impact to the confidentiality of the information
-     * resources managed by a software component due to a successfully exploited
-     * vulnerability.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Impact confidentiality_impact = 10; - * @param value The confidentialityImpact to set. - * @return This builder for chaining. - */ - public Builder setConfidentialityImpact(com.google.cloud.securitycenter.v1.Cvssv3.Impact value) { - if (value == null) { - throw new NullPointerException(); - } - - confidentialityImpact_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * This metric measures the impact to the confidentiality of the information
-     * resources managed by a software component due to a successfully exploited
-     * vulnerability.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Impact confidentiality_impact = 10; - * @return This builder for chaining. - */ - public Builder clearConfidentialityImpact() { - - confidentialityImpact_ = 0; - onChanged(); - return this; - } - - private int integrityImpact_ = 0; - /** - *
-     * This metric measures the impact to integrity of a successfully exploited
-     * vulnerability.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Impact integrity_impact = 11; - * @return The enum numeric value on the wire for integrityImpact. - */ - @java.lang.Override public int getIntegrityImpactValue() { - return integrityImpact_; - } - /** - *
-     * This metric measures the impact to integrity of a successfully exploited
-     * vulnerability.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Impact integrity_impact = 11; - * @param value The enum numeric value on the wire for integrityImpact to set. - * @return This builder for chaining. - */ - public Builder setIntegrityImpactValue(int value) { - - integrityImpact_ = value; - onChanged(); - return this; - } - /** - *
-     * This metric measures the impact to integrity of a successfully exploited
-     * vulnerability.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Impact integrity_impact = 11; - * @return The integrityImpact. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Cvssv3.Impact getIntegrityImpact() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.Cvssv3.Impact result = com.google.cloud.securitycenter.v1.Cvssv3.Impact.valueOf(integrityImpact_); - return result == null ? com.google.cloud.securitycenter.v1.Cvssv3.Impact.UNRECOGNIZED : result; - } - /** - *
-     * This metric measures the impact to integrity of a successfully exploited
-     * vulnerability.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Impact integrity_impact = 11; - * @param value The integrityImpact to set. - * @return This builder for chaining. - */ - public Builder setIntegrityImpact(com.google.cloud.securitycenter.v1.Cvssv3.Impact value) { - if (value == null) { - throw new NullPointerException(); - } - - integrityImpact_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * This metric measures the impact to integrity of a successfully exploited
-     * vulnerability.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Impact integrity_impact = 11; - * @return This builder for chaining. - */ - public Builder clearIntegrityImpact() { - - integrityImpact_ = 0; - onChanged(); - return this; - } - - private int availabilityImpact_ = 0; - /** - *
-     * This metric measures the impact to the availability of the impacted
-     * component resulting from a successfully exploited vulnerability.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Impact availability_impact = 12; - * @return The enum numeric value on the wire for availabilityImpact. - */ - @java.lang.Override public int getAvailabilityImpactValue() { - return availabilityImpact_; - } - /** - *
-     * This metric measures the impact to the availability of the impacted
-     * component resulting from a successfully exploited vulnerability.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Impact availability_impact = 12; - * @param value The enum numeric value on the wire for availabilityImpact to set. - * @return This builder for chaining. - */ - public Builder setAvailabilityImpactValue(int value) { - - availabilityImpact_ = value; - onChanged(); - return this; - } - /** - *
-     * This metric measures the impact to the availability of the impacted
-     * component resulting from a successfully exploited vulnerability.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Impact availability_impact = 12; - * @return The availabilityImpact. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Cvssv3.Impact getAvailabilityImpact() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.Cvssv3.Impact result = com.google.cloud.securitycenter.v1.Cvssv3.Impact.valueOf(availabilityImpact_); - return result == null ? com.google.cloud.securitycenter.v1.Cvssv3.Impact.UNRECOGNIZED : result; - } - /** - *
-     * This metric measures the impact to the availability of the impacted
-     * component resulting from a successfully exploited vulnerability.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Impact availability_impact = 12; - * @param value The availabilityImpact to set. - * @return This builder for chaining. - */ - public Builder setAvailabilityImpact(com.google.cloud.securitycenter.v1.Cvssv3.Impact value) { - if (value == null) { - throw new NullPointerException(); - } - - availabilityImpact_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * This metric measures the impact to the availability of the impacted
-     * component resulting from a successfully exploited vulnerability.
-     * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Impact availability_impact = 12; - * @return This builder for chaining. - */ - public Builder clearAvailabilityImpact() { - - availabilityImpact_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Cvssv3) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Cvssv3) - private static final com.google.cloud.securitycenter.v1.Cvssv3 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Cvssv3(); - } - - public static com.google.cloud.securitycenter.v1.Cvssv3 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Cvssv3 parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Cvssv3(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Cvssv3 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Cvssv3OrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Cvssv3OrBuilder.java deleted file mode 100644 index 2f70ec964559..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Cvssv3OrBuilder.java +++ /dev/null @@ -1,197 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/vulnerability.proto - -package com.google.cloud.securitycenter.v1; - -public interface Cvssv3OrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Cvssv3) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The base score is a function of the base metric scores.
-   * 
- * - * double base_score = 1; - * @return The baseScore. - */ - double getBaseScore(); - - /** - *
-   * Base Metrics
-   * Represents the intrinsic characteristics of a vulnerability that are
-   * constant over time and across user environments.
-   * This metric reflects the context by which vulnerability exploitation is
-   * possible.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.AttackVector attack_vector = 5; - * @return The enum numeric value on the wire for attackVector. - */ - int getAttackVectorValue(); - /** - *
-   * Base Metrics
-   * Represents the intrinsic characteristics of a vulnerability that are
-   * constant over time and across user environments.
-   * This metric reflects the context by which vulnerability exploitation is
-   * possible.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.AttackVector attack_vector = 5; - * @return The attackVector. - */ - com.google.cloud.securitycenter.v1.Cvssv3.AttackVector getAttackVector(); - - /** - *
-   * This metric describes the conditions beyond the attacker's control that
-   * must exist in order to exploit the vulnerability.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.AttackComplexity attack_complexity = 6; - * @return The enum numeric value on the wire for attackComplexity. - */ - int getAttackComplexityValue(); - /** - *
-   * This metric describes the conditions beyond the attacker's control that
-   * must exist in order to exploit the vulnerability.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.AttackComplexity attack_complexity = 6; - * @return The attackComplexity. - */ - com.google.cloud.securitycenter.v1.Cvssv3.AttackComplexity getAttackComplexity(); - - /** - *
-   * This metric describes the level of privileges an attacker must possess
-   * before successfully exploiting the vulnerability.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired privileges_required = 7; - * @return The enum numeric value on the wire for privilegesRequired. - */ - int getPrivilegesRequiredValue(); - /** - *
-   * This metric describes the level of privileges an attacker must possess
-   * before successfully exploiting the vulnerability.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired privileges_required = 7; - * @return The privilegesRequired. - */ - com.google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired getPrivilegesRequired(); - - /** - *
-   * This metric captures the requirement for a human user, other than the
-   * attacker, to participate in the successful compromise of the vulnerable
-   * component.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.UserInteraction user_interaction = 8; - * @return The enum numeric value on the wire for userInteraction. - */ - int getUserInteractionValue(); - /** - *
-   * This metric captures the requirement for a human user, other than the
-   * attacker, to participate in the successful compromise of the vulnerable
-   * component.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.UserInteraction user_interaction = 8; - * @return The userInteraction. - */ - com.google.cloud.securitycenter.v1.Cvssv3.UserInteraction getUserInteraction(); - - /** - *
-   * The Scope metric captures whether a vulnerability in one vulnerable
-   * component impacts resources in components beyond its security scope.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Scope scope = 9; - * @return The enum numeric value on the wire for scope. - */ - int getScopeValue(); - /** - *
-   * The Scope metric captures whether a vulnerability in one vulnerable
-   * component impacts resources in components beyond its security scope.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Scope scope = 9; - * @return The scope. - */ - com.google.cloud.securitycenter.v1.Cvssv3.Scope getScope(); - - /** - *
-   * This metric measures the impact to the confidentiality of the information
-   * resources managed by a software component due to a successfully exploited
-   * vulnerability.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Impact confidentiality_impact = 10; - * @return The enum numeric value on the wire for confidentialityImpact. - */ - int getConfidentialityImpactValue(); - /** - *
-   * This metric measures the impact to the confidentiality of the information
-   * resources managed by a software component due to a successfully exploited
-   * vulnerability.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Impact confidentiality_impact = 10; - * @return The confidentialityImpact. - */ - com.google.cloud.securitycenter.v1.Cvssv3.Impact getConfidentialityImpact(); - - /** - *
-   * This metric measures the impact to integrity of a successfully exploited
-   * vulnerability.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Impact integrity_impact = 11; - * @return The enum numeric value on the wire for integrityImpact. - */ - int getIntegrityImpactValue(); - /** - *
-   * This metric measures the impact to integrity of a successfully exploited
-   * vulnerability.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Impact integrity_impact = 11; - * @return The integrityImpact. - */ - com.google.cloud.securitycenter.v1.Cvssv3.Impact getIntegrityImpact(); - - /** - *
-   * This metric measures the impact to the availability of the impacted
-   * component resulting from a successfully exploited vulnerability.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Impact availability_impact = 12; - * @return The enum numeric value on the wire for availabilityImpact. - */ - int getAvailabilityImpactValue(); - /** - *
-   * This metric measures the impact to the availability of the impacted
-   * component resulting from a successfully exploited vulnerability.
-   * 
- * - * .google.cloud.securitycenter.v1.Cvssv3.Impact availability_impact = 12; - * @return The availabilityImpact. - */ - com.google.cloud.securitycenter.v1.Cvssv3.Impact getAvailabilityImpact(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DatabaseProto.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DatabaseProto.java deleted file mode 100644 index b28d9f4411af..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DatabaseProto.java +++ /dev/null @@ -1,56 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/database.proto - -package com.google.cloud.securitycenter.v1; - -public final class DatabaseProto { - private DatabaseProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_Database_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_Database_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n-google/cloud/securitycenter/v1/databas" + - "e.proto\022\036google.cloud.securitycenter.v1\"" + - "b\n\010Database\022\014\n\004name\030\001 \001(\t\022\024\n\014display_nam" + - "e\030\002 \001(\t\022\021\n\tuser_name\030\003 \001(\t\022\r\n\005query\030\004 \001(" + - "\t\022\020\n\010grantees\030\005 \003(\tB\351\001\n\"com.google.cloud" + - ".securitycenter.v1B\rDatabaseProtoP\001ZLgoo" + - "gle.golang.org/genproto/googleapis/cloud" + - "/securitycenter/v1;securitycenter\252\002\036Goog" + - "le.Cloud.SecurityCenter.V1\312\002\036Google\\Clou" + - "d\\SecurityCenter\\V1\352\002!Google::Cloud::Sec" + - "urityCenter::V1b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_google_cloud_securitycenter_v1_Database_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_securitycenter_v1_Database_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_Database_descriptor, - new java.lang.String[] { "Name", "DisplayName", "UserName", "Query", "Grantees", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DeleteBigQueryExportRequest.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DeleteBigQueryExportRequest.java deleted file mode 100644 index 3f16b9ad4cef..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DeleteBigQueryExportRequest.java +++ /dev/null @@ -1,616 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Request message for deleting a big query export.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.DeleteBigQueryExportRequest} - */ -public final class DeleteBigQueryExportRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.DeleteBigQueryExportRequest) - DeleteBigQueryExportRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteBigQueryExportRequest.newBuilder() to construct. - private DeleteBigQueryExportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteBigQueryExportRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteBigQueryExportRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteBigQueryExportRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_DeleteBigQueryExportRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_DeleteBigQueryExportRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest.class, com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Name of the big query export to delete. Its format is
-   * organizations/{organization}/bigQueryExports/{export_id},
-   * folders/{folder}/bigQueryExports/{export_id}, or
-   * projects/{project}/bigQueryExports/{export_id}
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Name of the big query export to delete. Its format is
-   * organizations/{organization}/bigQueryExports/{export_id},
-   * folders/{folder}/bigQueryExports/{export_id}, or
-   * projects/{project}/bigQueryExports/{export_id}
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest other = (com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for deleting a big query export.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.DeleteBigQueryExportRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.DeleteBigQueryExportRequest) - com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_DeleteBigQueryExportRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_DeleteBigQueryExportRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest.class, com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_DeleteBigQueryExportRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest build() { - com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest buildPartial() { - com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest result = new com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest) { - return mergeFrom((com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest other) { - if (other == com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Name of the big query export to delete. Its format is
-     * organizations/{organization}/bigQueryExports/{export_id},
-     * folders/{folder}/bigQueryExports/{export_id}, or
-     * projects/{project}/bigQueryExports/{export_id}
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Name of the big query export to delete. Its format is
-     * organizations/{organization}/bigQueryExports/{export_id},
-     * folders/{folder}/bigQueryExports/{export_id}, or
-     * projects/{project}/bigQueryExports/{export_id}
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Name of the big query export to delete. Its format is
-     * organizations/{organization}/bigQueryExports/{export_id},
-     * folders/{folder}/bigQueryExports/{export_id}, or
-     * projects/{project}/bigQueryExports/{export_id}
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Name of the big query export to delete. Its format is
-     * organizations/{organization}/bigQueryExports/{export_id},
-     * folders/{folder}/bigQueryExports/{export_id}, or
-     * projects/{project}/bigQueryExports/{export_id}
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Name of the big query export to delete. Its format is
-     * organizations/{organization}/bigQueryExports/{export_id},
-     * folders/{folder}/bigQueryExports/{export_id}, or
-     * projects/{project}/bigQueryExports/{export_id}
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.DeleteBigQueryExportRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.DeleteBigQueryExportRequest) - private static final com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest(); - } - - public static com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteBigQueryExportRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteBigQueryExportRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DeleteBigQueryExportRequestOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DeleteBigQueryExportRequestOrBuilder.java deleted file mode 100644 index e462d0529caa..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DeleteBigQueryExportRequestOrBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -public interface DeleteBigQueryExportRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.DeleteBigQueryExportRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Name of the big query export to delete. Its format is
-   * organizations/{organization}/bigQueryExports/{export_id},
-   * folders/{folder}/bigQueryExports/{export_id}, or
-   * projects/{project}/bigQueryExports/{export_id}
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Name of the big query export to delete. Its format is
-   * organizations/{organization}/bigQueryExports/{export_id},
-   * folders/{folder}/bigQueryExports/{export_id}, or
-   * projects/{project}/bigQueryExports/{export_id}
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DeleteMuteConfigRequest.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DeleteMuteConfigRequest.java deleted file mode 100644 index 29b3c12f0208..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DeleteMuteConfigRequest.java +++ /dev/null @@ -1,616 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Request message for deleting a mute config.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.DeleteMuteConfigRequest} - */ -public final class DeleteMuteConfigRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.DeleteMuteConfigRequest) - DeleteMuteConfigRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteMuteConfigRequest.newBuilder() to construct. - private DeleteMuteConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteMuteConfigRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteMuteConfigRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteMuteConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_DeleteMuteConfigRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_DeleteMuteConfigRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest.class, com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Name of the mute config to delete. Its format is
-   * organizations/{organization}/muteConfigs/{config_id},
-   * folders/{folder}/muteConfigs/{config_id}, or
-   * projects/{project}/muteConfigs/{config_id}
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Name of the mute config to delete. Its format is
-   * organizations/{organization}/muteConfigs/{config_id},
-   * folders/{folder}/muteConfigs/{config_id}, or
-   * projects/{project}/muteConfigs/{config_id}
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest other = (com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for deleting a mute config.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.DeleteMuteConfigRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.DeleteMuteConfigRequest) - com.google.cloud.securitycenter.v1.DeleteMuteConfigRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_DeleteMuteConfigRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_DeleteMuteConfigRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest.class, com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_DeleteMuteConfigRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest build() { - com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest buildPartial() { - com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest result = new com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest) { - return mergeFrom((com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest other) { - if (other == com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Name of the mute config to delete. Its format is
-     * organizations/{organization}/muteConfigs/{config_id},
-     * folders/{folder}/muteConfigs/{config_id}, or
-     * projects/{project}/muteConfigs/{config_id}
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Name of the mute config to delete. Its format is
-     * organizations/{organization}/muteConfigs/{config_id},
-     * folders/{folder}/muteConfigs/{config_id}, or
-     * projects/{project}/muteConfigs/{config_id}
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Name of the mute config to delete. Its format is
-     * organizations/{organization}/muteConfigs/{config_id},
-     * folders/{folder}/muteConfigs/{config_id}, or
-     * projects/{project}/muteConfigs/{config_id}
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Name of the mute config to delete. Its format is
-     * organizations/{organization}/muteConfigs/{config_id},
-     * folders/{folder}/muteConfigs/{config_id}, or
-     * projects/{project}/muteConfigs/{config_id}
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Name of the mute config to delete. Its format is
-     * organizations/{organization}/muteConfigs/{config_id},
-     * folders/{folder}/muteConfigs/{config_id}, or
-     * projects/{project}/muteConfigs/{config_id}
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.DeleteMuteConfigRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.DeleteMuteConfigRequest) - private static final com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest(); - } - - public static com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteMuteConfigRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteMuteConfigRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.DeleteMuteConfigRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DeleteMuteConfigRequestOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DeleteMuteConfigRequestOrBuilder.java deleted file mode 100644 index aa3ea733016e..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DeleteMuteConfigRequestOrBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -public interface DeleteMuteConfigRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.DeleteMuteConfigRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Name of the mute config to delete. Its format is
-   * organizations/{organization}/muteConfigs/{config_id},
-   * folders/{folder}/muteConfigs/{config_id}, or
-   * projects/{project}/muteConfigs/{config_id}
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Name of the mute config to delete. Its format is
-   * organizations/{organization}/muteConfigs/{config_id},
-   * folders/{folder}/muteConfigs/{config_id}, or
-   * projects/{project}/muteConfigs/{config_id}
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DeleteNotificationConfigRequest.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DeleteNotificationConfigRequest.java deleted file mode 100644 index 7e2dda5333c8..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DeleteNotificationConfigRequest.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Request message for deleting a notification config.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.DeleteNotificationConfigRequest} - */ -public final class DeleteNotificationConfigRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.DeleteNotificationConfigRequest) - DeleteNotificationConfigRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteNotificationConfigRequest.newBuilder() to construct. - private DeleteNotificationConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteNotificationConfigRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteNotificationConfigRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteNotificationConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_DeleteNotificationConfigRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_DeleteNotificationConfigRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest.class, com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Name of the notification config to delete. Its format is
-   * "organizations/[organization_id]/notificationConfigs/[config_id]".
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Name of the notification config to delete. Its format is
-   * "organizations/[organization_id]/notificationConfigs/[config_id]".
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest other = (com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for deleting a notification config.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.DeleteNotificationConfigRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.DeleteNotificationConfigRequest) - com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_DeleteNotificationConfigRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_DeleteNotificationConfigRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest.class, com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_DeleteNotificationConfigRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest build() { - com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest buildPartial() { - com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest result = new com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest) { - return mergeFrom((com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest other) { - if (other == com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Name of the notification config to delete. Its format is
-     * "organizations/[organization_id]/notificationConfigs/[config_id]".
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Name of the notification config to delete. Its format is
-     * "organizations/[organization_id]/notificationConfigs/[config_id]".
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Name of the notification config to delete. Its format is
-     * "organizations/[organization_id]/notificationConfigs/[config_id]".
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Name of the notification config to delete. Its format is
-     * "organizations/[organization_id]/notificationConfigs/[config_id]".
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Name of the notification config to delete. Its format is
-     * "organizations/[organization_id]/notificationConfigs/[config_id]".
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.DeleteNotificationConfigRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.DeleteNotificationConfigRequest) - private static final com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest(); - } - - public static com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteNotificationConfigRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteNotificationConfigRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DeleteNotificationConfigRequestOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DeleteNotificationConfigRequestOrBuilder.java deleted file mode 100644 index e75642df29ef..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DeleteNotificationConfigRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -public interface DeleteNotificationConfigRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.DeleteNotificationConfigRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Name of the notification config to delete. Its format is
-   * "organizations/[organization_id]/notificationConfigs/[config_id]".
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Name of the notification config to delete. Its format is
-   * "organizations/[organization_id]/notificationConfigs/[config_id]".
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/EnvironmentVariable.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/EnvironmentVariable.java deleted file mode 100644 index dc2e897321df..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/EnvironmentVariable.java +++ /dev/null @@ -1,763 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/process.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * EnvironmentVariable is a name-value pair to store environment variables for
- * Process.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.EnvironmentVariable} - */ -public final class EnvironmentVariable extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.EnvironmentVariable) - EnvironmentVariableOrBuilder { -private static final long serialVersionUID = 0L; - // Use EnvironmentVariable.newBuilder() to construct. - private EnvironmentVariable(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private EnvironmentVariable() { - name_ = ""; - val_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new EnvironmentVariable(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private EnvironmentVariable( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - val_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.ProcessProto.internal_static_google_cloud_securitycenter_v1_EnvironmentVariable_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.ProcessProto.internal_static_google_cloud_securitycenter_v1_EnvironmentVariable_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.EnvironmentVariable.class, com.google.cloud.securitycenter.v1.EnvironmentVariable.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Environment variable name as a JSON encoded string.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Environment variable name as a JSON encoded string.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VAL_FIELD_NUMBER = 2; - private volatile java.lang.Object val_; - /** - *
-   * Environment variable value as a JSON encoded string.
-   * 
- * - * string val = 2; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - *
-   * Environment variable value as a JSON encoded string.
-   * 
- * - * string val = 2; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, val_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, val_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.EnvironmentVariable)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.EnvironmentVariable other = (com.google.cloud.securitycenter.v1.EnvironmentVariable) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getVal() - .equals(other.getVal())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.EnvironmentVariable parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.EnvironmentVariable parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.EnvironmentVariable parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.EnvironmentVariable parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.EnvironmentVariable parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.EnvironmentVariable parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.EnvironmentVariable parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.EnvironmentVariable parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.EnvironmentVariable parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.EnvironmentVariable parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.EnvironmentVariable parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.EnvironmentVariable parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.EnvironmentVariable prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * EnvironmentVariable is a name-value pair to store environment variables for
-   * Process.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.EnvironmentVariable} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.EnvironmentVariable) - com.google.cloud.securitycenter.v1.EnvironmentVariableOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.ProcessProto.internal_static_google_cloud_securitycenter_v1_EnvironmentVariable_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.ProcessProto.internal_static_google_cloud_securitycenter_v1_EnvironmentVariable_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.EnvironmentVariable.class, com.google.cloud.securitycenter.v1.EnvironmentVariable.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.EnvironmentVariable.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - val_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.ProcessProto.internal_static_google_cloud_securitycenter_v1_EnvironmentVariable_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.EnvironmentVariable getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.EnvironmentVariable.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.EnvironmentVariable build() { - com.google.cloud.securitycenter.v1.EnvironmentVariable result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.EnvironmentVariable buildPartial() { - com.google.cloud.securitycenter.v1.EnvironmentVariable result = new com.google.cloud.securitycenter.v1.EnvironmentVariable(this); - result.name_ = name_; - result.val_ = val_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.EnvironmentVariable) { - return mergeFrom((com.google.cloud.securitycenter.v1.EnvironmentVariable)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.EnvironmentVariable other) { - if (other == com.google.cloud.securitycenter.v1.EnvironmentVariable.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getVal().isEmpty()) { - val_ = other.val_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.EnvironmentVariable parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.EnvironmentVariable) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Environment variable name as a JSON encoded string.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Environment variable name as a JSON encoded string.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Environment variable name as a JSON encoded string.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Environment variable name as a JSON encoded string.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Environment variable name as a JSON encoded string.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object val_ = ""; - /** - *
-     * Environment variable value as a JSON encoded string.
-     * 
- * - * string val = 2; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Environment variable value as a JSON encoded string.
-     * 
- * - * string val = 2; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Environment variable value as a JSON encoded string.
-     * 
- * - * string val = 2; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - val_ = value; - onChanged(); - return this; - } - /** - *
-     * Environment variable value as a JSON encoded string.
-     * 
- * - * string val = 2; - * @return This builder for chaining. - */ - public Builder clearVal() { - - val_ = getDefaultInstance().getVal(); - onChanged(); - return this; - } - /** - *
-     * Environment variable value as a JSON encoded string.
-     * 
- * - * string val = 2; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - val_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.EnvironmentVariable) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.EnvironmentVariable) - private static final com.google.cloud.securitycenter.v1.EnvironmentVariable DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.EnvironmentVariable(); - } - - public static com.google.cloud.securitycenter.v1.EnvironmentVariable getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EnvironmentVariable parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new EnvironmentVariable(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.EnvironmentVariable getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/EnvironmentVariableOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/EnvironmentVariableOrBuilder.java deleted file mode 100644 index bcbbd35236f6..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/EnvironmentVariableOrBuilder.java +++ /dev/null @@ -1,49 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/process.proto - -package com.google.cloud.securitycenter.v1; - -public interface EnvironmentVariableOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.EnvironmentVariable) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Environment variable name as a JSON encoded string.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Environment variable name as a JSON encoded string.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Environment variable value as a JSON encoded string.
-   * 
- * - * string val = 2; - * @return The val. - */ - java.lang.String getVal(); - /** - *
-   * Environment variable value as a JSON encoded string.
-   * 
- * - * string val = 2; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExfilResource.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExfilResource.java deleted file mode 100644 index 840ff6c82aae..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExfilResource.java +++ /dev/null @@ -1,881 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/exfiltration.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Resource that has been exfiltrated or exfiltrated_to.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.ExfilResource} - */ -public final class ExfilResource extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.ExfilResource) - ExfilResourceOrBuilder { -private static final long serialVersionUID = 0L; - // Use ExfilResource.newBuilder() to construct. - private ExfilResource(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ExfilResource() { - name_ = ""; - components_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ExfilResource(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ExfilResource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - components_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - components_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - components_ = components_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.ExfiltrationProto.internal_static_google_cloud_securitycenter_v1_ExfilResource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.ExfiltrationProto.internal_static_google_cloud_securitycenter_v1_ExfilResource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.ExfilResource.class, com.google.cloud.securitycenter.v1.ExfilResource.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Resource's URI (https://google.aip.dev/122#full-resource-names)
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Resource's URI (https://google.aip.dev/122#full-resource-names)
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int COMPONENTS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList components_; - /** - *
-   * Subcomponents of the asset that is exfiltrated - these could be
-   * URIs used during exfiltration, table names, databases, filenames, etc.
-   * For example, multiple tables may be exfiltrated from the same CloudSQL
-   * instance, or multiple files from the same Cloud Storage bucket.
-   * 
- * - * repeated string components = 2; - * @return A list containing the components. - */ - public com.google.protobuf.ProtocolStringList - getComponentsList() { - return components_; - } - /** - *
-   * Subcomponents of the asset that is exfiltrated - these could be
-   * URIs used during exfiltration, table names, databases, filenames, etc.
-   * For example, multiple tables may be exfiltrated from the same CloudSQL
-   * instance, or multiple files from the same Cloud Storage bucket.
-   * 
- * - * repeated string components = 2; - * @return The count of components. - */ - public int getComponentsCount() { - return components_.size(); - } - /** - *
-   * Subcomponents of the asset that is exfiltrated - these could be
-   * URIs used during exfiltration, table names, databases, filenames, etc.
-   * For example, multiple tables may be exfiltrated from the same CloudSQL
-   * instance, or multiple files from the same Cloud Storage bucket.
-   * 
- * - * repeated string components = 2; - * @param index The index of the element to return. - * @return The components at the given index. - */ - public java.lang.String getComponents(int index) { - return components_.get(index); - } - /** - *
-   * Subcomponents of the asset that is exfiltrated - these could be
-   * URIs used during exfiltration, table names, databases, filenames, etc.
-   * For example, multiple tables may be exfiltrated from the same CloudSQL
-   * instance, or multiple files from the same Cloud Storage bucket.
-   * 
- * - * repeated string components = 2; - * @param index The index of the value to return. - * @return The bytes of the components at the given index. - */ - public com.google.protobuf.ByteString - getComponentsBytes(int index) { - return components_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - for (int i = 0; i < components_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, components_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - { - int dataSize = 0; - for (int i = 0; i < components_.size(); i++) { - dataSize += computeStringSizeNoTag(components_.getRaw(i)); - } - size += dataSize; - size += 1 * getComponentsList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.ExfilResource)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.ExfilResource other = (com.google.cloud.securitycenter.v1.ExfilResource) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getComponentsList() - .equals(other.getComponentsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (getComponentsCount() > 0) { - hash = (37 * hash) + COMPONENTS_FIELD_NUMBER; - hash = (53 * hash) + getComponentsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.ExfilResource parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.ExfilResource parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.ExfilResource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.ExfilResource parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.ExfilResource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.ExfilResource parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.ExfilResource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.ExfilResource parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.ExfilResource parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.ExfilResource parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.ExfilResource parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.ExfilResource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.ExfilResource prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Resource that has been exfiltrated or exfiltrated_to.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.ExfilResource} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.ExfilResource) - com.google.cloud.securitycenter.v1.ExfilResourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.ExfiltrationProto.internal_static_google_cloud_securitycenter_v1_ExfilResource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.ExfiltrationProto.internal_static_google_cloud_securitycenter_v1_ExfilResource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.ExfilResource.class, com.google.cloud.securitycenter.v1.ExfilResource.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.ExfilResource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - components_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.ExfiltrationProto.internal_static_google_cloud_securitycenter_v1_ExfilResource_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.ExfilResource getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.ExfilResource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.ExfilResource build() { - com.google.cloud.securitycenter.v1.ExfilResource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.ExfilResource buildPartial() { - com.google.cloud.securitycenter.v1.ExfilResource result = new com.google.cloud.securitycenter.v1.ExfilResource(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - if (((bitField0_ & 0x00000001) != 0)) { - components_ = components_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.components_ = components_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.ExfilResource) { - return mergeFrom((com.google.cloud.securitycenter.v1.ExfilResource)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.ExfilResource other) { - if (other == com.google.cloud.securitycenter.v1.ExfilResource.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.components_.isEmpty()) { - if (components_.isEmpty()) { - components_ = other.components_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureComponentsIsMutable(); - components_.addAll(other.components_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.ExfilResource parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.ExfilResource) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * Resource's URI (https://google.aip.dev/122#full-resource-names)
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Resource's URI (https://google.aip.dev/122#full-resource-names)
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Resource's URI (https://google.aip.dev/122#full-resource-names)
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Resource's URI (https://google.aip.dev/122#full-resource-names)
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Resource's URI (https://google.aip.dev/122#full-resource-names)
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList components_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureComponentsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - components_ = new com.google.protobuf.LazyStringArrayList(components_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * Subcomponents of the asset that is exfiltrated - these could be
-     * URIs used during exfiltration, table names, databases, filenames, etc.
-     * For example, multiple tables may be exfiltrated from the same CloudSQL
-     * instance, or multiple files from the same Cloud Storage bucket.
-     * 
- * - * repeated string components = 2; - * @return A list containing the components. - */ - public com.google.protobuf.ProtocolStringList - getComponentsList() { - return components_.getUnmodifiableView(); - } - /** - *
-     * Subcomponents of the asset that is exfiltrated - these could be
-     * URIs used during exfiltration, table names, databases, filenames, etc.
-     * For example, multiple tables may be exfiltrated from the same CloudSQL
-     * instance, or multiple files from the same Cloud Storage bucket.
-     * 
- * - * repeated string components = 2; - * @return The count of components. - */ - public int getComponentsCount() { - return components_.size(); - } - /** - *
-     * Subcomponents of the asset that is exfiltrated - these could be
-     * URIs used during exfiltration, table names, databases, filenames, etc.
-     * For example, multiple tables may be exfiltrated from the same CloudSQL
-     * instance, or multiple files from the same Cloud Storage bucket.
-     * 
- * - * repeated string components = 2; - * @param index The index of the element to return. - * @return The components at the given index. - */ - public java.lang.String getComponents(int index) { - return components_.get(index); - } - /** - *
-     * Subcomponents of the asset that is exfiltrated - these could be
-     * URIs used during exfiltration, table names, databases, filenames, etc.
-     * For example, multiple tables may be exfiltrated from the same CloudSQL
-     * instance, or multiple files from the same Cloud Storage bucket.
-     * 
- * - * repeated string components = 2; - * @param index The index of the value to return. - * @return The bytes of the components at the given index. - */ - public com.google.protobuf.ByteString - getComponentsBytes(int index) { - return components_.getByteString(index); - } - /** - *
-     * Subcomponents of the asset that is exfiltrated - these could be
-     * URIs used during exfiltration, table names, databases, filenames, etc.
-     * For example, multiple tables may be exfiltrated from the same CloudSQL
-     * instance, or multiple files from the same Cloud Storage bucket.
-     * 
- * - * repeated string components = 2; - * @param index The index to set the value at. - * @param value The components to set. - * @return This builder for chaining. - */ - public Builder setComponents( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureComponentsIsMutable(); - components_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Subcomponents of the asset that is exfiltrated - these could be
-     * URIs used during exfiltration, table names, databases, filenames, etc.
-     * For example, multiple tables may be exfiltrated from the same CloudSQL
-     * instance, or multiple files from the same Cloud Storage bucket.
-     * 
- * - * repeated string components = 2; - * @param value The components to add. - * @return This builder for chaining. - */ - public Builder addComponents( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureComponentsIsMutable(); - components_.add(value); - onChanged(); - return this; - } - /** - *
-     * Subcomponents of the asset that is exfiltrated - these could be
-     * URIs used during exfiltration, table names, databases, filenames, etc.
-     * For example, multiple tables may be exfiltrated from the same CloudSQL
-     * instance, or multiple files from the same Cloud Storage bucket.
-     * 
- * - * repeated string components = 2; - * @param values The components to add. - * @return This builder for chaining. - */ - public Builder addAllComponents( - java.lang.Iterable values) { - ensureComponentsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, components_); - onChanged(); - return this; - } - /** - *
-     * Subcomponents of the asset that is exfiltrated - these could be
-     * URIs used during exfiltration, table names, databases, filenames, etc.
-     * For example, multiple tables may be exfiltrated from the same CloudSQL
-     * instance, or multiple files from the same Cloud Storage bucket.
-     * 
- * - * repeated string components = 2; - * @return This builder for chaining. - */ - public Builder clearComponents() { - components_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Subcomponents of the asset that is exfiltrated - these could be
-     * URIs used during exfiltration, table names, databases, filenames, etc.
-     * For example, multiple tables may be exfiltrated from the same CloudSQL
-     * instance, or multiple files from the same Cloud Storage bucket.
-     * 
- * - * repeated string components = 2; - * @param value The bytes of the components to add. - * @return This builder for chaining. - */ - public Builder addComponentsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureComponentsIsMutable(); - components_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.ExfilResource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.ExfilResource) - private static final com.google.cloud.securitycenter.v1.ExfilResource DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.ExfilResource(); - } - - public static com.google.cloud.securitycenter.v1.ExfilResource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExfilResource parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ExfilResource(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.ExfilResource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExfilResourceOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExfilResourceOrBuilder.java deleted file mode 100644 index 544908750e02..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExfilResourceOrBuilder.java +++ /dev/null @@ -1,82 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/exfiltration.proto - -package com.google.cloud.securitycenter.v1; - -public interface ExfilResourceOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.ExfilResource) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Resource's URI (https://google.aip.dev/122#full-resource-names)
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Resource's URI (https://google.aip.dev/122#full-resource-names)
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Subcomponents of the asset that is exfiltrated - these could be
-   * URIs used during exfiltration, table names, databases, filenames, etc.
-   * For example, multiple tables may be exfiltrated from the same CloudSQL
-   * instance, or multiple files from the same Cloud Storage bucket.
-   * 
- * - * repeated string components = 2; - * @return A list containing the components. - */ - java.util.List - getComponentsList(); - /** - *
-   * Subcomponents of the asset that is exfiltrated - these could be
-   * URIs used during exfiltration, table names, databases, filenames, etc.
-   * For example, multiple tables may be exfiltrated from the same CloudSQL
-   * instance, or multiple files from the same Cloud Storage bucket.
-   * 
- * - * repeated string components = 2; - * @return The count of components. - */ - int getComponentsCount(); - /** - *
-   * Subcomponents of the asset that is exfiltrated - these could be
-   * URIs used during exfiltration, table names, databases, filenames, etc.
-   * For example, multiple tables may be exfiltrated from the same CloudSQL
-   * instance, or multiple files from the same Cloud Storage bucket.
-   * 
- * - * repeated string components = 2; - * @param index The index of the element to return. - * @return The components at the given index. - */ - java.lang.String getComponents(int index); - /** - *
-   * Subcomponents of the asset that is exfiltrated - these could be
-   * URIs used during exfiltration, table names, databases, filenames, etc.
-   * For example, multiple tables may be exfiltrated from the same CloudSQL
-   * instance, or multiple files from the same Cloud Storage bucket.
-   * 
- * - * repeated string components = 2; - * @param index The index of the value to return. - * @return The bytes of the components at the given index. - */ - com.google.protobuf.ByteString - getComponentsBytes(int index); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Exfiltration.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Exfiltration.java deleted file mode 100644 index e39c44786cd6..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Exfiltration.java +++ /dev/null @@ -1,1387 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/exfiltration.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Exfiltration represents a data exfiltration attempt of one or more
- * sources to one or more targets.  Sources represent the source
- * of data that is exfiltrated, and Targets represents the destination the
- * data was copied to.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Exfiltration} - */ -public final class Exfiltration extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Exfiltration) - ExfiltrationOrBuilder { -private static final long serialVersionUID = 0L; - // Use Exfiltration.newBuilder() to construct. - private Exfiltration(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Exfiltration() { - sources_ = java.util.Collections.emptyList(); - targets_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Exfiltration(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Exfiltration( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - sources_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - sources_.add( - input.readMessage(com.google.cloud.securitycenter.v1.ExfilResource.parser(), extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - targets_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - targets_.add( - input.readMessage(com.google.cloud.securitycenter.v1.ExfilResource.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - sources_ = java.util.Collections.unmodifiableList(sources_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - targets_ = java.util.Collections.unmodifiableList(targets_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.ExfiltrationProto.internal_static_google_cloud_securitycenter_v1_Exfiltration_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.ExfiltrationProto.internal_static_google_cloud_securitycenter_v1_Exfiltration_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Exfiltration.class, com.google.cloud.securitycenter.v1.Exfiltration.Builder.class); - } - - public static final int SOURCES_FIELD_NUMBER = 1; - private java.util.List sources_; - /** - *
-   * If there are multiple sources, then the data is considered "joined" between
-   * them. For instance, BigQuery can join multiple tables, and each
-   * table would be considered a source.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; - */ - @java.lang.Override - public java.util.List getSourcesList() { - return sources_; - } - /** - *
-   * If there are multiple sources, then the data is considered "joined" between
-   * them. For instance, BigQuery can join multiple tables, and each
-   * table would be considered a source.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; - */ - @java.lang.Override - public java.util.List - getSourcesOrBuilderList() { - return sources_; - } - /** - *
-   * If there are multiple sources, then the data is considered "joined" between
-   * them. For instance, BigQuery can join multiple tables, and each
-   * table would be considered a source.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; - */ - @java.lang.Override - public int getSourcesCount() { - return sources_.size(); - } - /** - *
-   * If there are multiple sources, then the data is considered "joined" between
-   * them. For instance, BigQuery can join multiple tables, and each
-   * table would be considered a source.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.ExfilResource getSources(int index) { - return sources_.get(index); - } - /** - *
-   * If there are multiple sources, then the data is considered "joined" between
-   * them. For instance, BigQuery can join multiple tables, and each
-   * table would be considered a source.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.ExfilResourceOrBuilder getSourcesOrBuilder( - int index) { - return sources_.get(index); - } - - public static final int TARGETS_FIELD_NUMBER = 2; - private java.util.List targets_; - /** - *
-   * If there are multiple targets, each target would get a complete copy of the
-   * "joined" source data.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; - */ - @java.lang.Override - public java.util.List getTargetsList() { - return targets_; - } - /** - *
-   * If there are multiple targets, each target would get a complete copy of the
-   * "joined" source data.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; - */ - @java.lang.Override - public java.util.List - getTargetsOrBuilderList() { - return targets_; - } - /** - *
-   * If there are multiple targets, each target would get a complete copy of the
-   * "joined" source data.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; - */ - @java.lang.Override - public int getTargetsCount() { - return targets_.size(); - } - /** - *
-   * If there are multiple targets, each target would get a complete copy of the
-   * "joined" source data.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.ExfilResource getTargets(int index) { - return targets_.get(index); - } - /** - *
-   * If there are multiple targets, each target would get a complete copy of the
-   * "joined" source data.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.ExfilResourceOrBuilder getTargetsOrBuilder( - int index) { - return targets_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < sources_.size(); i++) { - output.writeMessage(1, sources_.get(i)); - } - for (int i = 0; i < targets_.size(); i++) { - output.writeMessage(2, targets_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < sources_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, sources_.get(i)); - } - for (int i = 0; i < targets_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, targets_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.Exfiltration)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.Exfiltration other = (com.google.cloud.securitycenter.v1.Exfiltration) obj; - - if (!getSourcesList() - .equals(other.getSourcesList())) return false; - if (!getTargetsList() - .equals(other.getTargetsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getSourcesCount() > 0) { - hash = (37 * hash) + SOURCES_FIELD_NUMBER; - hash = (53 * hash) + getSourcesList().hashCode(); - } - if (getTargetsCount() > 0) { - hash = (37 * hash) + TARGETS_FIELD_NUMBER; - hash = (53 * hash) + getTargetsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.Exfiltration parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Exfiltration parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Exfiltration parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Exfiltration parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Exfiltration parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Exfiltration parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Exfiltration parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Exfiltration parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Exfiltration parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Exfiltration parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Exfiltration parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Exfiltration parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.Exfiltration prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Exfiltration represents a data exfiltration attempt of one or more
-   * sources to one or more targets.  Sources represent the source
-   * of data that is exfiltrated, and Targets represents the destination the
-   * data was copied to.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Exfiltration} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Exfiltration) - com.google.cloud.securitycenter.v1.ExfiltrationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.ExfiltrationProto.internal_static_google_cloud_securitycenter_v1_Exfiltration_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.ExfiltrationProto.internal_static_google_cloud_securitycenter_v1_Exfiltration_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Exfiltration.class, com.google.cloud.securitycenter.v1.Exfiltration.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.Exfiltration.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSourcesFieldBuilder(); - getTargetsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (sourcesBuilder_ == null) { - sources_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - sourcesBuilder_.clear(); - } - if (targetsBuilder_ == null) { - targets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - targetsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.ExfiltrationProto.internal_static_google_cloud_securitycenter_v1_Exfiltration_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Exfiltration getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.Exfiltration.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Exfiltration build() { - com.google.cloud.securitycenter.v1.Exfiltration result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Exfiltration buildPartial() { - com.google.cloud.securitycenter.v1.Exfiltration result = new com.google.cloud.securitycenter.v1.Exfiltration(this); - int from_bitField0_ = bitField0_; - if (sourcesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - sources_ = java.util.Collections.unmodifiableList(sources_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.sources_ = sources_; - } else { - result.sources_ = sourcesBuilder_.build(); - } - if (targetsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - targets_ = java.util.Collections.unmodifiableList(targets_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.targets_ = targets_; - } else { - result.targets_ = targetsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.Exfiltration) { - return mergeFrom((com.google.cloud.securitycenter.v1.Exfiltration)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.Exfiltration other) { - if (other == com.google.cloud.securitycenter.v1.Exfiltration.getDefaultInstance()) return this; - if (sourcesBuilder_ == null) { - if (!other.sources_.isEmpty()) { - if (sources_.isEmpty()) { - sources_ = other.sources_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSourcesIsMutable(); - sources_.addAll(other.sources_); - } - onChanged(); - } - } else { - if (!other.sources_.isEmpty()) { - if (sourcesBuilder_.isEmpty()) { - sourcesBuilder_.dispose(); - sourcesBuilder_ = null; - sources_ = other.sources_; - bitField0_ = (bitField0_ & ~0x00000001); - sourcesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSourcesFieldBuilder() : null; - } else { - sourcesBuilder_.addAllMessages(other.sources_); - } - } - } - if (targetsBuilder_ == null) { - if (!other.targets_.isEmpty()) { - if (targets_.isEmpty()) { - targets_ = other.targets_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureTargetsIsMutable(); - targets_.addAll(other.targets_); - } - onChanged(); - } - } else { - if (!other.targets_.isEmpty()) { - if (targetsBuilder_.isEmpty()) { - targetsBuilder_.dispose(); - targetsBuilder_ = null; - targets_ = other.targets_; - bitField0_ = (bitField0_ & ~0x00000002); - targetsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getTargetsFieldBuilder() : null; - } else { - targetsBuilder_.addAllMessages(other.targets_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.Exfiltration parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.Exfiltration) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List sources_ = - java.util.Collections.emptyList(); - private void ensureSourcesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - sources_ = new java.util.ArrayList(sources_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.ExfilResource, com.google.cloud.securitycenter.v1.ExfilResource.Builder, com.google.cloud.securitycenter.v1.ExfilResourceOrBuilder> sourcesBuilder_; - - /** - *
-     * If there are multiple sources, then the data is considered "joined" between
-     * them. For instance, BigQuery can join multiple tables, and each
-     * table would be considered a source.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; - */ - public java.util.List getSourcesList() { - if (sourcesBuilder_ == null) { - return java.util.Collections.unmodifiableList(sources_); - } else { - return sourcesBuilder_.getMessageList(); - } - } - /** - *
-     * If there are multiple sources, then the data is considered "joined" between
-     * them. For instance, BigQuery can join multiple tables, and each
-     * table would be considered a source.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; - */ - public int getSourcesCount() { - if (sourcesBuilder_ == null) { - return sources_.size(); - } else { - return sourcesBuilder_.getCount(); - } - } - /** - *
-     * If there are multiple sources, then the data is considered "joined" between
-     * them. For instance, BigQuery can join multiple tables, and each
-     * table would be considered a source.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; - */ - public com.google.cloud.securitycenter.v1.ExfilResource getSources(int index) { - if (sourcesBuilder_ == null) { - return sources_.get(index); - } else { - return sourcesBuilder_.getMessage(index); - } - } - /** - *
-     * If there are multiple sources, then the data is considered "joined" between
-     * them. For instance, BigQuery can join multiple tables, and each
-     * table would be considered a source.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; - */ - public Builder setSources( - int index, com.google.cloud.securitycenter.v1.ExfilResource value) { - if (sourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSourcesIsMutable(); - sources_.set(index, value); - onChanged(); - } else { - sourcesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If there are multiple sources, then the data is considered "joined" between
-     * them. For instance, BigQuery can join multiple tables, and each
-     * table would be considered a source.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; - */ - public Builder setSources( - int index, com.google.cloud.securitycenter.v1.ExfilResource.Builder builderForValue) { - if (sourcesBuilder_ == null) { - ensureSourcesIsMutable(); - sources_.set(index, builderForValue.build()); - onChanged(); - } else { - sourcesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If there are multiple sources, then the data is considered "joined" between
-     * them. For instance, BigQuery can join multiple tables, and each
-     * table would be considered a source.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; - */ - public Builder addSources(com.google.cloud.securitycenter.v1.ExfilResource value) { - if (sourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSourcesIsMutable(); - sources_.add(value); - onChanged(); - } else { - sourcesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If there are multiple sources, then the data is considered "joined" between
-     * them. For instance, BigQuery can join multiple tables, and each
-     * table would be considered a source.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; - */ - public Builder addSources( - int index, com.google.cloud.securitycenter.v1.ExfilResource value) { - if (sourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSourcesIsMutable(); - sources_.add(index, value); - onChanged(); - } else { - sourcesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If there are multiple sources, then the data is considered "joined" between
-     * them. For instance, BigQuery can join multiple tables, and each
-     * table would be considered a source.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; - */ - public Builder addSources( - com.google.cloud.securitycenter.v1.ExfilResource.Builder builderForValue) { - if (sourcesBuilder_ == null) { - ensureSourcesIsMutable(); - sources_.add(builderForValue.build()); - onChanged(); - } else { - sourcesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If there are multiple sources, then the data is considered "joined" between
-     * them. For instance, BigQuery can join multiple tables, and each
-     * table would be considered a source.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; - */ - public Builder addSources( - int index, com.google.cloud.securitycenter.v1.ExfilResource.Builder builderForValue) { - if (sourcesBuilder_ == null) { - ensureSourcesIsMutable(); - sources_.add(index, builderForValue.build()); - onChanged(); - } else { - sourcesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If there are multiple sources, then the data is considered "joined" between
-     * them. For instance, BigQuery can join multiple tables, and each
-     * table would be considered a source.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; - */ - public Builder addAllSources( - java.lang.Iterable values) { - if (sourcesBuilder_ == null) { - ensureSourcesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, sources_); - onChanged(); - } else { - sourcesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If there are multiple sources, then the data is considered "joined" between
-     * them. For instance, BigQuery can join multiple tables, and each
-     * table would be considered a source.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; - */ - public Builder clearSources() { - if (sourcesBuilder_ == null) { - sources_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - sourcesBuilder_.clear(); - } - return this; - } - /** - *
-     * If there are multiple sources, then the data is considered "joined" between
-     * them. For instance, BigQuery can join multiple tables, and each
-     * table would be considered a source.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; - */ - public Builder removeSources(int index) { - if (sourcesBuilder_ == null) { - ensureSourcesIsMutable(); - sources_.remove(index); - onChanged(); - } else { - sourcesBuilder_.remove(index); - } - return this; - } - /** - *
-     * If there are multiple sources, then the data is considered "joined" between
-     * them. For instance, BigQuery can join multiple tables, and each
-     * table would be considered a source.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; - */ - public com.google.cloud.securitycenter.v1.ExfilResource.Builder getSourcesBuilder( - int index) { - return getSourcesFieldBuilder().getBuilder(index); - } - /** - *
-     * If there are multiple sources, then the data is considered "joined" between
-     * them. For instance, BigQuery can join multiple tables, and each
-     * table would be considered a source.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; - */ - public com.google.cloud.securitycenter.v1.ExfilResourceOrBuilder getSourcesOrBuilder( - int index) { - if (sourcesBuilder_ == null) { - return sources_.get(index); } else { - return sourcesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If there are multiple sources, then the data is considered "joined" between
-     * them. For instance, BigQuery can join multiple tables, and each
-     * table would be considered a source.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; - */ - public java.util.List - getSourcesOrBuilderList() { - if (sourcesBuilder_ != null) { - return sourcesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(sources_); - } - } - /** - *
-     * If there are multiple sources, then the data is considered "joined" between
-     * them. For instance, BigQuery can join multiple tables, and each
-     * table would be considered a source.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; - */ - public com.google.cloud.securitycenter.v1.ExfilResource.Builder addSourcesBuilder() { - return getSourcesFieldBuilder().addBuilder( - com.google.cloud.securitycenter.v1.ExfilResource.getDefaultInstance()); - } - /** - *
-     * If there are multiple sources, then the data is considered "joined" between
-     * them. For instance, BigQuery can join multiple tables, and each
-     * table would be considered a source.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; - */ - public com.google.cloud.securitycenter.v1.ExfilResource.Builder addSourcesBuilder( - int index) { - return getSourcesFieldBuilder().addBuilder( - index, com.google.cloud.securitycenter.v1.ExfilResource.getDefaultInstance()); - } - /** - *
-     * If there are multiple sources, then the data is considered "joined" between
-     * them. For instance, BigQuery can join multiple tables, and each
-     * table would be considered a source.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; - */ - public java.util.List - getSourcesBuilderList() { - return getSourcesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.ExfilResource, com.google.cloud.securitycenter.v1.ExfilResource.Builder, com.google.cloud.securitycenter.v1.ExfilResourceOrBuilder> - getSourcesFieldBuilder() { - if (sourcesBuilder_ == null) { - sourcesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.ExfilResource, com.google.cloud.securitycenter.v1.ExfilResource.Builder, com.google.cloud.securitycenter.v1.ExfilResourceOrBuilder>( - sources_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - sources_ = null; - } - return sourcesBuilder_; - } - - private java.util.List targets_ = - java.util.Collections.emptyList(); - private void ensureTargetsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - targets_ = new java.util.ArrayList(targets_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.ExfilResource, com.google.cloud.securitycenter.v1.ExfilResource.Builder, com.google.cloud.securitycenter.v1.ExfilResourceOrBuilder> targetsBuilder_; - - /** - *
-     * If there are multiple targets, each target would get a complete copy of the
-     * "joined" source data.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; - */ - public java.util.List getTargetsList() { - if (targetsBuilder_ == null) { - return java.util.Collections.unmodifiableList(targets_); - } else { - return targetsBuilder_.getMessageList(); - } - } - /** - *
-     * If there are multiple targets, each target would get a complete copy of the
-     * "joined" source data.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; - */ - public int getTargetsCount() { - if (targetsBuilder_ == null) { - return targets_.size(); - } else { - return targetsBuilder_.getCount(); - } - } - /** - *
-     * If there are multiple targets, each target would get a complete copy of the
-     * "joined" source data.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; - */ - public com.google.cloud.securitycenter.v1.ExfilResource getTargets(int index) { - if (targetsBuilder_ == null) { - return targets_.get(index); - } else { - return targetsBuilder_.getMessage(index); - } - } - /** - *
-     * If there are multiple targets, each target would get a complete copy of the
-     * "joined" source data.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; - */ - public Builder setTargets( - int index, com.google.cloud.securitycenter.v1.ExfilResource value) { - if (targetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTargetsIsMutable(); - targets_.set(index, value); - onChanged(); - } else { - targetsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If there are multiple targets, each target would get a complete copy of the
-     * "joined" source data.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; - */ - public Builder setTargets( - int index, com.google.cloud.securitycenter.v1.ExfilResource.Builder builderForValue) { - if (targetsBuilder_ == null) { - ensureTargetsIsMutable(); - targets_.set(index, builderForValue.build()); - onChanged(); - } else { - targetsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If there are multiple targets, each target would get a complete copy of the
-     * "joined" source data.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; - */ - public Builder addTargets(com.google.cloud.securitycenter.v1.ExfilResource value) { - if (targetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTargetsIsMutable(); - targets_.add(value); - onChanged(); - } else { - targetsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If there are multiple targets, each target would get a complete copy of the
-     * "joined" source data.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; - */ - public Builder addTargets( - int index, com.google.cloud.securitycenter.v1.ExfilResource value) { - if (targetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTargetsIsMutable(); - targets_.add(index, value); - onChanged(); - } else { - targetsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If there are multiple targets, each target would get a complete copy of the
-     * "joined" source data.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; - */ - public Builder addTargets( - com.google.cloud.securitycenter.v1.ExfilResource.Builder builderForValue) { - if (targetsBuilder_ == null) { - ensureTargetsIsMutable(); - targets_.add(builderForValue.build()); - onChanged(); - } else { - targetsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If there are multiple targets, each target would get a complete copy of the
-     * "joined" source data.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; - */ - public Builder addTargets( - int index, com.google.cloud.securitycenter.v1.ExfilResource.Builder builderForValue) { - if (targetsBuilder_ == null) { - ensureTargetsIsMutable(); - targets_.add(index, builderForValue.build()); - onChanged(); - } else { - targetsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If there are multiple targets, each target would get a complete copy of the
-     * "joined" source data.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; - */ - public Builder addAllTargets( - java.lang.Iterable values) { - if (targetsBuilder_ == null) { - ensureTargetsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, targets_); - onChanged(); - } else { - targetsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If there are multiple targets, each target would get a complete copy of the
-     * "joined" source data.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; - */ - public Builder clearTargets() { - if (targetsBuilder_ == null) { - targets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - targetsBuilder_.clear(); - } - return this; - } - /** - *
-     * If there are multiple targets, each target would get a complete copy of the
-     * "joined" source data.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; - */ - public Builder removeTargets(int index) { - if (targetsBuilder_ == null) { - ensureTargetsIsMutable(); - targets_.remove(index); - onChanged(); - } else { - targetsBuilder_.remove(index); - } - return this; - } - /** - *
-     * If there are multiple targets, each target would get a complete copy of the
-     * "joined" source data.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; - */ - public com.google.cloud.securitycenter.v1.ExfilResource.Builder getTargetsBuilder( - int index) { - return getTargetsFieldBuilder().getBuilder(index); - } - /** - *
-     * If there are multiple targets, each target would get a complete copy of the
-     * "joined" source data.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; - */ - public com.google.cloud.securitycenter.v1.ExfilResourceOrBuilder getTargetsOrBuilder( - int index) { - if (targetsBuilder_ == null) { - return targets_.get(index); } else { - return targetsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If there are multiple targets, each target would get a complete copy of the
-     * "joined" source data.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; - */ - public java.util.List - getTargetsOrBuilderList() { - if (targetsBuilder_ != null) { - return targetsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(targets_); - } - } - /** - *
-     * If there are multiple targets, each target would get a complete copy of the
-     * "joined" source data.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; - */ - public com.google.cloud.securitycenter.v1.ExfilResource.Builder addTargetsBuilder() { - return getTargetsFieldBuilder().addBuilder( - com.google.cloud.securitycenter.v1.ExfilResource.getDefaultInstance()); - } - /** - *
-     * If there are multiple targets, each target would get a complete copy of the
-     * "joined" source data.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; - */ - public com.google.cloud.securitycenter.v1.ExfilResource.Builder addTargetsBuilder( - int index) { - return getTargetsFieldBuilder().addBuilder( - index, com.google.cloud.securitycenter.v1.ExfilResource.getDefaultInstance()); - } - /** - *
-     * If there are multiple targets, each target would get a complete copy of the
-     * "joined" source data.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; - */ - public java.util.List - getTargetsBuilderList() { - return getTargetsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.ExfilResource, com.google.cloud.securitycenter.v1.ExfilResource.Builder, com.google.cloud.securitycenter.v1.ExfilResourceOrBuilder> - getTargetsFieldBuilder() { - if (targetsBuilder_ == null) { - targetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.ExfilResource, com.google.cloud.securitycenter.v1.ExfilResource.Builder, com.google.cloud.securitycenter.v1.ExfilResourceOrBuilder>( - targets_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - targets_ = null; - } - return targetsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Exfiltration) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Exfiltration) - private static final com.google.cloud.securitycenter.v1.Exfiltration DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Exfiltration(); - } - - public static com.google.cloud.securitycenter.v1.Exfiltration getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Exfiltration parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Exfiltration(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Exfiltration getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExfiltrationOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExfiltrationOrBuilder.java deleted file mode 100644 index 5167c57ad8b8..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExfiltrationOrBuilder.java +++ /dev/null @@ -1,112 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/exfiltration.proto - -package com.google.cloud.securitycenter.v1; - -public interface ExfiltrationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Exfiltration) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * If there are multiple sources, then the data is considered "joined" between
-   * them. For instance, BigQuery can join multiple tables, and each
-   * table would be considered a source.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; - */ - java.util.List - getSourcesList(); - /** - *
-   * If there are multiple sources, then the data is considered "joined" between
-   * them. For instance, BigQuery can join multiple tables, and each
-   * table would be considered a source.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; - */ - com.google.cloud.securitycenter.v1.ExfilResource getSources(int index); - /** - *
-   * If there are multiple sources, then the data is considered "joined" between
-   * them. For instance, BigQuery can join multiple tables, and each
-   * table would be considered a source.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; - */ - int getSourcesCount(); - /** - *
-   * If there are multiple sources, then the data is considered "joined" between
-   * them. For instance, BigQuery can join multiple tables, and each
-   * table would be considered a source.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; - */ - java.util.List - getSourcesOrBuilderList(); - /** - *
-   * If there are multiple sources, then the data is considered "joined" between
-   * them. For instance, BigQuery can join multiple tables, and each
-   * table would be considered a source.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; - */ - com.google.cloud.securitycenter.v1.ExfilResourceOrBuilder getSourcesOrBuilder( - int index); - - /** - *
-   * If there are multiple targets, each target would get a complete copy of the
-   * "joined" source data.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; - */ - java.util.List - getTargetsList(); - /** - *
-   * If there are multiple targets, each target would get a complete copy of the
-   * "joined" source data.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; - */ - com.google.cloud.securitycenter.v1.ExfilResource getTargets(int index); - /** - *
-   * If there are multiple targets, each target would get a complete copy of the
-   * "joined" source data.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; - */ - int getTargetsCount(); - /** - *
-   * If there are multiple targets, each target would get a complete copy of the
-   * "joined" source data.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; - */ - java.util.List - getTargetsOrBuilderList(); - /** - *
-   * If there are multiple targets, each target would get a complete copy of the
-   * "joined" source data.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; - */ - com.google.cloud.securitycenter.v1.ExfilResourceOrBuilder getTargetsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExfiltrationProto.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExfiltrationProto.java deleted file mode 100644 index d524306b317b..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExfiltrationProto.java +++ /dev/null @@ -1,70 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/exfiltration.proto - -package com.google.cloud.securitycenter.v1; - -public final class ExfiltrationProto { - private ExfiltrationProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_Exfiltration_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_Exfiltration_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_ExfilResource_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_ExfilResource_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n1google/cloud/securitycenter/v1/exfiltr" + - "ation.proto\022\036google.cloud.securitycenter" + - ".v1\"\216\001\n\014Exfiltration\022>\n\007sources\030\001 \003(\0132-." + - "google.cloud.securitycenter.v1.ExfilReso" + - "urce\022>\n\007targets\030\002 \003(\0132-.google.cloud.sec" + - "uritycenter.v1.ExfilResource\"1\n\rExfilRes" + - "ource\022\014\n\004name\030\001 \001(\t\022\022\n\ncomponents\030\002 \003(\tB" + - "\355\001\n\"com.google.cloud.securitycenter.v1B\021" + - "ExfiltrationProtoP\001ZLgoogle.golang.org/g" + - "enproto/googleapis/cloud/securitycenter/" + - "v1;securitycenter\252\002\036Google.Cloud.Securit" + - "yCenter.V1\312\002\036Google\\Cloud\\SecurityCenter" + - "\\V1\352\002!Google::Cloud::SecurityCenter::V1b" + - "\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_google_cloud_securitycenter_v1_Exfiltration_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_securitycenter_v1_Exfiltration_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_Exfiltration_descriptor, - new java.lang.String[] { "Sources", "Targets", }); - internal_static_google_cloud_securitycenter_v1_ExfilResource_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_securitycenter_v1_ExfilResource_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_ExfilResource_descriptor, - new java.lang.String[] { "Name", "Components", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExternalSystem.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExternalSystem.java deleted file mode 100644 index 0ea1bcb0e784..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExternalSystem.java +++ /dev/null @@ -1,1457 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/external_system.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Representation of third party SIEM/SOAR fields within SCC.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.ExternalSystem} - */ -public final class ExternalSystem extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.ExternalSystem) - ExternalSystemOrBuilder { -private static final long serialVersionUID = 0L; - // Use ExternalSystem.newBuilder() to construct. - private ExternalSystem(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ExternalSystem() { - name_ = ""; - assignees_ = com.google.protobuf.LazyStringArrayList.EMPTY; - externalUid_ = ""; - status_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ExternalSystem(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ExternalSystem( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - assignees_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assignees_.add(s); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - externalUid_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - status_ = s; - break; - } - case 42: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (externalSystemUpdateTime_ != null) { - subBuilder = externalSystemUpdateTime_.toBuilder(); - } - externalSystemUpdateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(externalSystemUpdateTime_); - externalSystemUpdateTime_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - assignees_ = assignees_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.ExternalSystemProto.internal_static_google_cloud_securitycenter_v1_ExternalSystem_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.ExternalSystemProto.internal_static_google_cloud_securitycenter_v1_ExternalSystem_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.ExternalSystem.class, com.google.cloud.securitycenter.v1.ExternalSystem.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * External System Name e.g. jira, demisto, etc.
-   *  e.g.:
-   *  `organizations/1234/sources/5678/findings/123456/externalSystems/jira`
-   * `folders/1234/sources/5678/findings/123456/externalSystems/jira`
-   * `projects/1234/sources/5678/findings/123456/externalSystems/jira`
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * External System Name e.g. jira, demisto, etc.
-   *  e.g.:
-   *  `organizations/1234/sources/5678/findings/123456/externalSystems/jira`
-   * `folders/1234/sources/5678/findings/123456/externalSystems/jira`
-   * `projects/1234/sources/5678/findings/123456/externalSystems/jira`
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ASSIGNEES_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList assignees_; - /** - *
-   * References primary/secondary etc assignees in the external system.
-   * 
- * - * repeated string assignees = 2; - * @return A list containing the assignees. - */ - public com.google.protobuf.ProtocolStringList - getAssigneesList() { - return assignees_; - } - /** - *
-   * References primary/secondary etc assignees in the external system.
-   * 
- * - * repeated string assignees = 2; - * @return The count of assignees. - */ - public int getAssigneesCount() { - return assignees_.size(); - } - /** - *
-   * References primary/secondary etc assignees in the external system.
-   * 
- * - * repeated string assignees = 2; - * @param index The index of the element to return. - * @return The assignees at the given index. - */ - public java.lang.String getAssignees(int index) { - return assignees_.get(index); - } - /** - *
-   * References primary/secondary etc assignees in the external system.
-   * 
- * - * repeated string assignees = 2; - * @param index The index of the value to return. - * @return The bytes of the assignees at the given index. - */ - public com.google.protobuf.ByteString - getAssigneesBytes(int index) { - return assignees_.getByteString(index); - } - - public static final int EXTERNAL_UID_FIELD_NUMBER = 3; - private volatile java.lang.Object externalUid_; - /** - *
-   * Identifier that's used to track the given finding in the external system.
-   * 
- * - * string external_uid = 3; - * @return The externalUid. - */ - @java.lang.Override - public java.lang.String getExternalUid() { - java.lang.Object ref = externalUid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - externalUid_ = s; - return s; - } - } - /** - *
-   * Identifier that's used to track the given finding in the external system.
-   * 
- * - * string external_uid = 3; - * @return The bytes for externalUid. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getExternalUidBytes() { - java.lang.Object ref = externalUid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - externalUid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STATUS_FIELD_NUMBER = 4; - private volatile java.lang.Object status_; - /** - *
-   * Most recent status of the corresponding finding's ticket/tracker in the
-   * external system.
-   * 
- * - * string status = 4; - * @return The status. - */ - @java.lang.Override - public java.lang.String getStatus() { - java.lang.Object ref = status_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - status_ = s; - return s; - } - } - /** - *
-   * Most recent status of the corresponding finding's ticket/tracker in the
-   * external system.
-   * 
- * - * string status = 4; - * @return The bytes for status. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getStatusBytes() { - java.lang.Object ref = status_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - status_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EXTERNAL_SYSTEM_UPDATE_TIME_FIELD_NUMBER = 5; - private com.google.protobuf.Timestamp externalSystemUpdateTime_; - /** - *
-   * The most recent time when the corresponding finding's ticket/tracker was
-   * updated in the external system.
-   * 
- * - * .google.protobuf.Timestamp external_system_update_time = 5; - * @return Whether the externalSystemUpdateTime field is set. - */ - @java.lang.Override - public boolean hasExternalSystemUpdateTime() { - return externalSystemUpdateTime_ != null; - } - /** - *
-   * The most recent time when the corresponding finding's ticket/tracker was
-   * updated in the external system.
-   * 
- * - * .google.protobuf.Timestamp external_system_update_time = 5; - * @return The externalSystemUpdateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getExternalSystemUpdateTime() { - return externalSystemUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : externalSystemUpdateTime_; - } - /** - *
-   * The most recent time when the corresponding finding's ticket/tracker was
-   * updated in the external system.
-   * 
- * - * .google.protobuf.Timestamp external_system_update_time = 5; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getExternalSystemUpdateTimeOrBuilder() { - return getExternalSystemUpdateTime(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - for (int i = 0; i < assignees_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assignees_.getRaw(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalUid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, externalUid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(status_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, status_); - } - if (externalSystemUpdateTime_ != null) { - output.writeMessage(5, getExternalSystemUpdateTime()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - { - int dataSize = 0; - for (int i = 0; i < assignees_.size(); i++) { - dataSize += computeStringSizeNoTag(assignees_.getRaw(i)); - } - size += dataSize; - size += 1 * getAssigneesList().size(); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalUid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, externalUid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(status_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, status_); - } - if (externalSystemUpdateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getExternalSystemUpdateTime()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.ExternalSystem)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.ExternalSystem other = (com.google.cloud.securitycenter.v1.ExternalSystem) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getAssigneesList() - .equals(other.getAssigneesList())) return false; - if (!getExternalUid() - .equals(other.getExternalUid())) return false; - if (!getStatus() - .equals(other.getStatus())) return false; - if (hasExternalSystemUpdateTime() != other.hasExternalSystemUpdateTime()) return false; - if (hasExternalSystemUpdateTime()) { - if (!getExternalSystemUpdateTime() - .equals(other.getExternalSystemUpdateTime())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (getAssigneesCount() > 0) { - hash = (37 * hash) + ASSIGNEES_FIELD_NUMBER; - hash = (53 * hash) + getAssigneesList().hashCode(); - } - hash = (37 * hash) + EXTERNAL_UID_FIELD_NUMBER; - hash = (53 * hash) + getExternalUid().hashCode(); - hash = (37 * hash) + STATUS_FIELD_NUMBER; - hash = (53 * hash) + getStatus().hashCode(); - if (hasExternalSystemUpdateTime()) { - hash = (37 * hash) + EXTERNAL_SYSTEM_UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getExternalSystemUpdateTime().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.ExternalSystem parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.ExternalSystem parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.ExternalSystem parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.ExternalSystem parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.ExternalSystem parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.ExternalSystem parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.ExternalSystem parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.ExternalSystem parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.ExternalSystem parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.ExternalSystem parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.ExternalSystem parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.ExternalSystem parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.ExternalSystem prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Representation of third party SIEM/SOAR fields within SCC.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.ExternalSystem} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.ExternalSystem) - com.google.cloud.securitycenter.v1.ExternalSystemOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.ExternalSystemProto.internal_static_google_cloud_securitycenter_v1_ExternalSystem_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.ExternalSystemProto.internal_static_google_cloud_securitycenter_v1_ExternalSystem_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.ExternalSystem.class, com.google.cloud.securitycenter.v1.ExternalSystem.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.ExternalSystem.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - assignees_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - externalUid_ = ""; - - status_ = ""; - - if (externalSystemUpdateTimeBuilder_ == null) { - externalSystemUpdateTime_ = null; - } else { - externalSystemUpdateTime_ = null; - externalSystemUpdateTimeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.ExternalSystemProto.internal_static_google_cloud_securitycenter_v1_ExternalSystem_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.ExternalSystem getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.ExternalSystem.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.ExternalSystem build() { - com.google.cloud.securitycenter.v1.ExternalSystem result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.ExternalSystem buildPartial() { - com.google.cloud.securitycenter.v1.ExternalSystem result = new com.google.cloud.securitycenter.v1.ExternalSystem(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - if (((bitField0_ & 0x00000001) != 0)) { - assignees_ = assignees_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.assignees_ = assignees_; - result.externalUid_ = externalUid_; - result.status_ = status_; - if (externalSystemUpdateTimeBuilder_ == null) { - result.externalSystemUpdateTime_ = externalSystemUpdateTime_; - } else { - result.externalSystemUpdateTime_ = externalSystemUpdateTimeBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.ExternalSystem) { - return mergeFrom((com.google.cloud.securitycenter.v1.ExternalSystem)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.ExternalSystem other) { - if (other == com.google.cloud.securitycenter.v1.ExternalSystem.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.assignees_.isEmpty()) { - if (assignees_.isEmpty()) { - assignees_ = other.assignees_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAssigneesIsMutable(); - assignees_.addAll(other.assignees_); - } - onChanged(); - } - if (!other.getExternalUid().isEmpty()) { - externalUid_ = other.externalUid_; - onChanged(); - } - if (!other.getStatus().isEmpty()) { - status_ = other.status_; - onChanged(); - } - if (other.hasExternalSystemUpdateTime()) { - mergeExternalSystemUpdateTime(other.getExternalSystemUpdateTime()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.ExternalSystem parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.ExternalSystem) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * External System Name e.g. jira, demisto, etc.
-     *  e.g.:
-     *  `organizations/1234/sources/5678/findings/123456/externalSystems/jira`
-     * `folders/1234/sources/5678/findings/123456/externalSystems/jira`
-     * `projects/1234/sources/5678/findings/123456/externalSystems/jira`
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * External System Name e.g. jira, demisto, etc.
-     *  e.g.:
-     *  `organizations/1234/sources/5678/findings/123456/externalSystems/jira`
-     * `folders/1234/sources/5678/findings/123456/externalSystems/jira`
-     * `projects/1234/sources/5678/findings/123456/externalSystems/jira`
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * External System Name e.g. jira, demisto, etc.
-     *  e.g.:
-     *  `organizations/1234/sources/5678/findings/123456/externalSystems/jira`
-     * `folders/1234/sources/5678/findings/123456/externalSystems/jira`
-     * `projects/1234/sources/5678/findings/123456/externalSystems/jira`
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * External System Name e.g. jira, demisto, etc.
-     *  e.g.:
-     *  `organizations/1234/sources/5678/findings/123456/externalSystems/jira`
-     * `folders/1234/sources/5678/findings/123456/externalSystems/jira`
-     * `projects/1234/sources/5678/findings/123456/externalSystems/jira`
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * External System Name e.g. jira, demisto, etc.
-     *  e.g.:
-     *  `organizations/1234/sources/5678/findings/123456/externalSystems/jira`
-     * `folders/1234/sources/5678/findings/123456/externalSystems/jira`
-     * `projects/1234/sources/5678/findings/123456/externalSystems/jira`
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList assignees_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureAssigneesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - assignees_ = new com.google.protobuf.LazyStringArrayList(assignees_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * References primary/secondary etc assignees in the external system.
-     * 
- * - * repeated string assignees = 2; - * @return A list containing the assignees. - */ - public com.google.protobuf.ProtocolStringList - getAssigneesList() { - return assignees_.getUnmodifiableView(); - } - /** - *
-     * References primary/secondary etc assignees in the external system.
-     * 
- * - * repeated string assignees = 2; - * @return The count of assignees. - */ - public int getAssigneesCount() { - return assignees_.size(); - } - /** - *
-     * References primary/secondary etc assignees in the external system.
-     * 
- * - * repeated string assignees = 2; - * @param index The index of the element to return. - * @return The assignees at the given index. - */ - public java.lang.String getAssignees(int index) { - return assignees_.get(index); - } - /** - *
-     * References primary/secondary etc assignees in the external system.
-     * 
- * - * repeated string assignees = 2; - * @param index The index of the value to return. - * @return The bytes of the assignees at the given index. - */ - public com.google.protobuf.ByteString - getAssigneesBytes(int index) { - return assignees_.getByteString(index); - } - /** - *
-     * References primary/secondary etc assignees in the external system.
-     * 
- * - * repeated string assignees = 2; - * @param index The index to set the value at. - * @param value The assignees to set. - * @return This builder for chaining. - */ - public Builder setAssignees( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssigneesIsMutable(); - assignees_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * References primary/secondary etc assignees in the external system.
-     * 
- * - * repeated string assignees = 2; - * @param value The assignees to add. - * @return This builder for chaining. - */ - public Builder addAssignees( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssigneesIsMutable(); - assignees_.add(value); - onChanged(); - return this; - } - /** - *
-     * References primary/secondary etc assignees in the external system.
-     * 
- * - * repeated string assignees = 2; - * @param values The assignees to add. - * @return This builder for chaining. - */ - public Builder addAllAssignees( - java.lang.Iterable values) { - ensureAssigneesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, assignees_); - onChanged(); - return this; - } - /** - *
-     * References primary/secondary etc assignees in the external system.
-     * 
- * - * repeated string assignees = 2; - * @return This builder for chaining. - */ - public Builder clearAssignees() { - assignees_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * References primary/secondary etc assignees in the external system.
-     * 
- * - * repeated string assignees = 2; - * @param value The bytes of the assignees to add. - * @return This builder for chaining. - */ - public Builder addAssigneesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAssigneesIsMutable(); - assignees_.add(value); - onChanged(); - return this; - } - - private java.lang.Object externalUid_ = ""; - /** - *
-     * Identifier that's used to track the given finding in the external system.
-     * 
- * - * string external_uid = 3; - * @return The externalUid. - */ - public java.lang.String getExternalUid() { - java.lang.Object ref = externalUid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - externalUid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Identifier that's used to track the given finding in the external system.
-     * 
- * - * string external_uid = 3; - * @return The bytes for externalUid. - */ - public com.google.protobuf.ByteString - getExternalUidBytes() { - java.lang.Object ref = externalUid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - externalUid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Identifier that's used to track the given finding in the external system.
-     * 
- * - * string external_uid = 3; - * @param value The externalUid to set. - * @return This builder for chaining. - */ - public Builder setExternalUid( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - externalUid_ = value; - onChanged(); - return this; - } - /** - *
-     * Identifier that's used to track the given finding in the external system.
-     * 
- * - * string external_uid = 3; - * @return This builder for chaining. - */ - public Builder clearExternalUid() { - - externalUid_ = getDefaultInstance().getExternalUid(); - onChanged(); - return this; - } - /** - *
-     * Identifier that's used to track the given finding in the external system.
-     * 
- * - * string external_uid = 3; - * @param value The bytes for externalUid to set. - * @return This builder for chaining. - */ - public Builder setExternalUidBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - externalUid_ = value; - onChanged(); - return this; - } - - private java.lang.Object status_ = ""; - /** - *
-     * Most recent status of the corresponding finding's ticket/tracker in the
-     * external system.
-     * 
- * - * string status = 4; - * @return The status. - */ - public java.lang.String getStatus() { - java.lang.Object ref = status_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - status_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Most recent status of the corresponding finding's ticket/tracker in the
-     * external system.
-     * 
- * - * string status = 4; - * @return The bytes for status. - */ - public com.google.protobuf.ByteString - getStatusBytes() { - java.lang.Object ref = status_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - status_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Most recent status of the corresponding finding's ticket/tracker in the
-     * external system.
-     * 
- * - * string status = 4; - * @param value The status to set. - * @return This builder for chaining. - */ - public Builder setStatus( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - status_ = value; - onChanged(); - return this; - } - /** - *
-     * Most recent status of the corresponding finding's ticket/tracker in the
-     * external system.
-     * 
- * - * string status = 4; - * @return This builder for chaining. - */ - public Builder clearStatus() { - - status_ = getDefaultInstance().getStatus(); - onChanged(); - return this; - } - /** - *
-     * Most recent status of the corresponding finding's ticket/tracker in the
-     * external system.
-     * 
- * - * string status = 4; - * @param value The bytes for status to set. - * @return This builder for chaining. - */ - public Builder setStatusBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - status_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp externalSystemUpdateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> externalSystemUpdateTimeBuilder_; - /** - *
-     * The most recent time when the corresponding finding's ticket/tracker was
-     * updated in the external system.
-     * 
- * - * .google.protobuf.Timestamp external_system_update_time = 5; - * @return Whether the externalSystemUpdateTime field is set. - */ - public boolean hasExternalSystemUpdateTime() { - return externalSystemUpdateTimeBuilder_ != null || externalSystemUpdateTime_ != null; - } - /** - *
-     * The most recent time when the corresponding finding's ticket/tracker was
-     * updated in the external system.
-     * 
- * - * .google.protobuf.Timestamp external_system_update_time = 5; - * @return The externalSystemUpdateTime. - */ - public com.google.protobuf.Timestamp getExternalSystemUpdateTime() { - if (externalSystemUpdateTimeBuilder_ == null) { - return externalSystemUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : externalSystemUpdateTime_; - } else { - return externalSystemUpdateTimeBuilder_.getMessage(); - } - } - /** - *
-     * The most recent time when the corresponding finding's ticket/tracker was
-     * updated in the external system.
-     * 
- * - * .google.protobuf.Timestamp external_system_update_time = 5; - */ - public Builder setExternalSystemUpdateTime(com.google.protobuf.Timestamp value) { - if (externalSystemUpdateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - externalSystemUpdateTime_ = value; - onChanged(); - } else { - externalSystemUpdateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The most recent time when the corresponding finding's ticket/tracker was
-     * updated in the external system.
-     * 
- * - * .google.protobuf.Timestamp external_system_update_time = 5; - */ - public Builder setExternalSystemUpdateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (externalSystemUpdateTimeBuilder_ == null) { - externalSystemUpdateTime_ = builderForValue.build(); - onChanged(); - } else { - externalSystemUpdateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The most recent time when the corresponding finding's ticket/tracker was
-     * updated in the external system.
-     * 
- * - * .google.protobuf.Timestamp external_system_update_time = 5; - */ - public Builder mergeExternalSystemUpdateTime(com.google.protobuf.Timestamp value) { - if (externalSystemUpdateTimeBuilder_ == null) { - if (externalSystemUpdateTime_ != null) { - externalSystemUpdateTime_ = - com.google.protobuf.Timestamp.newBuilder(externalSystemUpdateTime_).mergeFrom(value).buildPartial(); - } else { - externalSystemUpdateTime_ = value; - } - onChanged(); - } else { - externalSystemUpdateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The most recent time when the corresponding finding's ticket/tracker was
-     * updated in the external system.
-     * 
- * - * .google.protobuf.Timestamp external_system_update_time = 5; - */ - public Builder clearExternalSystemUpdateTime() { - if (externalSystemUpdateTimeBuilder_ == null) { - externalSystemUpdateTime_ = null; - onChanged(); - } else { - externalSystemUpdateTime_ = null; - externalSystemUpdateTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * The most recent time when the corresponding finding's ticket/tracker was
-     * updated in the external system.
-     * 
- * - * .google.protobuf.Timestamp external_system_update_time = 5; - */ - public com.google.protobuf.Timestamp.Builder getExternalSystemUpdateTimeBuilder() { - - onChanged(); - return getExternalSystemUpdateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The most recent time when the corresponding finding's ticket/tracker was
-     * updated in the external system.
-     * 
- * - * .google.protobuf.Timestamp external_system_update_time = 5; - */ - public com.google.protobuf.TimestampOrBuilder getExternalSystemUpdateTimeOrBuilder() { - if (externalSystemUpdateTimeBuilder_ != null) { - return externalSystemUpdateTimeBuilder_.getMessageOrBuilder(); - } else { - return externalSystemUpdateTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : externalSystemUpdateTime_; - } - } - /** - *
-     * The most recent time when the corresponding finding's ticket/tracker was
-     * updated in the external system.
-     * 
- * - * .google.protobuf.Timestamp external_system_update_time = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getExternalSystemUpdateTimeFieldBuilder() { - if (externalSystemUpdateTimeBuilder_ == null) { - externalSystemUpdateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getExternalSystemUpdateTime(), - getParentForChildren(), - isClean()); - externalSystemUpdateTime_ = null; - } - return externalSystemUpdateTimeBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.ExternalSystem) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.ExternalSystem) - private static final com.google.cloud.securitycenter.v1.ExternalSystem DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.ExternalSystem(); - } - - public static com.google.cloud.securitycenter.v1.ExternalSystem getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExternalSystem parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ExternalSystem(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.ExternalSystem getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExternalSystemOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExternalSystemOrBuilder.java deleted file mode 100644 index 2f83a97f8f8f..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExternalSystemOrBuilder.java +++ /dev/null @@ -1,150 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/external_system.proto - -package com.google.cloud.securitycenter.v1; - -public interface ExternalSystemOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.ExternalSystem) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * External System Name e.g. jira, demisto, etc.
-   *  e.g.:
-   *  `organizations/1234/sources/5678/findings/123456/externalSystems/jira`
-   * `folders/1234/sources/5678/findings/123456/externalSystems/jira`
-   * `projects/1234/sources/5678/findings/123456/externalSystems/jira`
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * External System Name e.g. jira, demisto, etc.
-   *  e.g.:
-   *  `organizations/1234/sources/5678/findings/123456/externalSystems/jira`
-   * `folders/1234/sources/5678/findings/123456/externalSystems/jira`
-   * `projects/1234/sources/5678/findings/123456/externalSystems/jira`
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * References primary/secondary etc assignees in the external system.
-   * 
- * - * repeated string assignees = 2; - * @return A list containing the assignees. - */ - java.util.List - getAssigneesList(); - /** - *
-   * References primary/secondary etc assignees in the external system.
-   * 
- * - * repeated string assignees = 2; - * @return The count of assignees. - */ - int getAssigneesCount(); - /** - *
-   * References primary/secondary etc assignees in the external system.
-   * 
- * - * repeated string assignees = 2; - * @param index The index of the element to return. - * @return The assignees at the given index. - */ - java.lang.String getAssignees(int index); - /** - *
-   * References primary/secondary etc assignees in the external system.
-   * 
- * - * repeated string assignees = 2; - * @param index The index of the value to return. - * @return The bytes of the assignees at the given index. - */ - com.google.protobuf.ByteString - getAssigneesBytes(int index); - - /** - *
-   * Identifier that's used to track the given finding in the external system.
-   * 
- * - * string external_uid = 3; - * @return The externalUid. - */ - java.lang.String getExternalUid(); - /** - *
-   * Identifier that's used to track the given finding in the external system.
-   * 
- * - * string external_uid = 3; - * @return The bytes for externalUid. - */ - com.google.protobuf.ByteString - getExternalUidBytes(); - - /** - *
-   * Most recent status of the corresponding finding's ticket/tracker in the
-   * external system.
-   * 
- * - * string status = 4; - * @return The status. - */ - java.lang.String getStatus(); - /** - *
-   * Most recent status of the corresponding finding's ticket/tracker in the
-   * external system.
-   * 
- * - * string status = 4; - * @return The bytes for status. - */ - com.google.protobuf.ByteString - getStatusBytes(); - - /** - *
-   * The most recent time when the corresponding finding's ticket/tracker was
-   * updated in the external system.
-   * 
- * - * .google.protobuf.Timestamp external_system_update_time = 5; - * @return Whether the externalSystemUpdateTime field is set. - */ - boolean hasExternalSystemUpdateTime(); - /** - *
-   * The most recent time when the corresponding finding's ticket/tracker was
-   * updated in the external system.
-   * 
- * - * .google.protobuf.Timestamp external_system_update_time = 5; - * @return The externalSystemUpdateTime. - */ - com.google.protobuf.Timestamp getExternalSystemUpdateTime(); - /** - *
-   * The most recent time when the corresponding finding's ticket/tracker was
-   * updated in the external system.
-   * 
- * - * .google.protobuf.Timestamp external_system_update_time = 5; - */ - com.google.protobuf.TimestampOrBuilder getExternalSystemUpdateTimeOrBuilder(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExternalSystemProto.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExternalSystemProto.java deleted file mode 100644 index 8d9028c66600..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ExternalSystemProto.java +++ /dev/null @@ -1,76 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/external_system.proto - -package com.google.cloud.securitycenter.v1; - -public final class ExternalSystemProto { - private ExternalSystemProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_ExternalSystem_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_ExternalSystem_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n4google/cloud/securitycenter/v1/externa" + - "l_system.proto\022\036google.cloud.securitycen" + - "ter.v1\032\031google/api/resource.proto\032\037googl" + - "e/protobuf/timestamp.proto\"\340\003\n\016ExternalS" + - "ystem\022\014\n\004name\030\001 \001(\t\022\021\n\tassignees\030\002 \003(\t\022\024" + - "\n\014external_uid\030\003 \001(\t\022\016\n\006status\030\004 \001(\t\022?\n\033" + - "external_system_update_time\030\005 \001(\0132\032.goog" + - "le.protobuf.Timestamp:\305\002\352A\301\002\n,securityce" + - "nter.googleapis.com/ExternalSystem\022aorga" + - "nizations/{organization}/sources/{source" + - "}/findings/{finding}/externalSystems/{ex" + - "ternalsystem}\022Ufolders/{folder}/sources/" + - "{source}/findings/{finding}/externalSyst" + - "ems/{externalsystem}\022Wprojects/{project}" + - "/sources/{source}/findings/{finding}/ext" + - "ernalSystems/{externalsystem}B\357\001\n\"com.go" + - "ogle.cloud.securitycenter.v1B\023ExternalSy" + - "stemProtoP\001ZLgoogle.golang.org/genproto/" + - "googleapis/cloud/securitycenter/v1;secur" + - "itycenter\252\002\036Google.Cloud.SecurityCenter." + - "V1\312\002\036Google\\Cloud\\SecurityCenter\\V1\352\002!Go" + - "ogle::Cloud::SecurityCenter::V1b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.ResourceProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_securitycenter_v1_ExternalSystem_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_securitycenter_v1_ExternalSystem_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_ExternalSystem_descriptor, - new java.lang.String[] { "Name", "Assignees", "ExternalUid", "Status", "ExternalSystemUpdateTime", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ResourceProto.resource); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.ResourceProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/File.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/File.java deleted file mode 100644 index fc0355e536dc..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/File.java +++ /dev/null @@ -1,1201 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/file.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * File information about the related binary/library used by an executable, or
- * the script used by a script interpreter
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.File} - */ -public final class File extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.File) - FileOrBuilder { -private static final long serialVersionUID = 0L; - // Use File.newBuilder() to construct. - private File(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private File() { - path_ = ""; - sha256_ = ""; - contents_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new File(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private File( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - path_ = s; - break; - } - case 16: { - - size_ = input.readInt64(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - sha256_ = s; - break; - } - case 32: { - - hashedSize_ = input.readInt64(); - break; - } - case 40: { - - partiallyHashed_ = input.readBool(); - break; - } - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - - contents_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.FileProto.internal_static_google_cloud_securitycenter_v1_File_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.FileProto.internal_static_google_cloud_securitycenter_v1_File_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.File.class, com.google.cloud.securitycenter.v1.File.Builder.class); - } - - public static final int PATH_FIELD_NUMBER = 1; - private volatile java.lang.Object path_; - /** - *
-   * Absolute path of the file as a JSON encoded string.
-   * 
- * - * string path = 1; - * @return The path. - */ - @java.lang.Override - public java.lang.String getPath() { - java.lang.Object ref = path_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - path_ = s; - return s; - } - } - /** - *
-   * Absolute path of the file as a JSON encoded string.
-   * 
- * - * string path = 1; - * @return The bytes for path. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPathBytes() { - java.lang.Object ref = path_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - path_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SIZE_FIELD_NUMBER = 2; - private long size_; - /** - *
-   * Size of the file in bytes.
-   * 
- * - * int64 size = 2; - * @return The size. - */ - @java.lang.Override - public long getSize() { - return size_; - } - - public static final int SHA256_FIELD_NUMBER = 3; - private volatile java.lang.Object sha256_; - /** - *
-   * SHA256 hash of the first hashed_size bytes of the file encoded as a
-   * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
-   * of the entire file.
-   * 
- * - * string sha256 = 3; - * @return The sha256. - */ - @java.lang.Override - public java.lang.String getSha256() { - java.lang.Object ref = sha256_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sha256_ = s; - return s; - } - } - /** - *
-   * SHA256 hash of the first hashed_size bytes of the file encoded as a
-   * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
-   * of the entire file.
-   * 
- * - * string sha256 = 3; - * @return The bytes for sha256. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSha256Bytes() { - java.lang.Object ref = sha256_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sha256_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int HASHED_SIZE_FIELD_NUMBER = 4; - private long hashedSize_; - /** - *
-   * The length in bytes of the file prefix that was hashed.  If
-   * hashed_size == size, any hashes reported represent the entire
-   * file.
-   * 
- * - * int64 hashed_size = 4; - * @return The hashedSize. - */ - @java.lang.Override - public long getHashedSize() { - return hashedSize_; - } - - public static final int PARTIALLY_HASHED_FIELD_NUMBER = 5; - private boolean partiallyHashed_; - /** - *
-   * True when the hash covers only a prefix of the file.
-   * 
- * - * bool partially_hashed = 5; - * @return The partiallyHashed. - */ - @java.lang.Override - public boolean getPartiallyHashed() { - return partiallyHashed_; - } - - public static final int CONTENTS_FIELD_NUMBER = 6; - private volatile java.lang.Object contents_; - /** - *
-   * Prefix of the file contents as a JSON encoded string.
-   * (Currently only populated for Malicious Script Executed findings.)
-   * 
- * - * string contents = 6; - * @return The contents. - */ - @java.lang.Override - public java.lang.String getContents() { - java.lang.Object ref = contents_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - contents_ = s; - return s; - } - } - /** - *
-   * Prefix of the file contents as a JSON encoded string.
-   * (Currently only populated for Malicious Script Executed findings.)
-   * 
- * - * string contents = 6; - * @return The bytes for contents. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getContentsBytes() { - java.lang.Object ref = contents_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - contents_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, path_); - } - if (size_ != 0L) { - output.writeInt64(2, size_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sha256_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sha256_); - } - if (hashedSize_ != 0L) { - output.writeInt64(4, hashedSize_); - } - if (partiallyHashed_ != false) { - output.writeBool(5, partiallyHashed_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contents_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, contents_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, path_); - } - if (size_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, size_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sha256_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sha256_); - } - if (hashedSize_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(4, hashedSize_); - } - if (partiallyHashed_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(5, partiallyHashed_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contents_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, contents_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.File)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.File other = (com.google.cloud.securitycenter.v1.File) obj; - - if (!getPath() - .equals(other.getPath())) return false; - if (getSize() - != other.getSize()) return false; - if (!getSha256() - .equals(other.getSha256())) return false; - if (getHashedSize() - != other.getHashedSize()) return false; - if (getPartiallyHashed() - != other.getPartiallyHashed()) return false; - if (!getContents() - .equals(other.getContents())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PATH_FIELD_NUMBER; - hash = (53 * hash) + getPath().hashCode(); - hash = (37 * hash) + SIZE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getSize()); - hash = (37 * hash) + SHA256_FIELD_NUMBER; - hash = (53 * hash) + getSha256().hashCode(); - hash = (37 * hash) + HASHED_SIZE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getHashedSize()); - hash = (37 * hash) + PARTIALLY_HASHED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getPartiallyHashed()); - hash = (37 * hash) + CONTENTS_FIELD_NUMBER; - hash = (53 * hash) + getContents().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.File parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.File parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.File parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.File parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.File parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.File parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.File parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.File parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.File parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.File parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.File parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.File parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.File prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * File information about the related binary/library used by an executable, or
-   * the script used by a script interpreter
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.File} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.File) - com.google.cloud.securitycenter.v1.FileOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.FileProto.internal_static_google_cloud_securitycenter_v1_File_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.FileProto.internal_static_google_cloud_securitycenter_v1_File_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.File.class, com.google.cloud.securitycenter.v1.File.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.File.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - path_ = ""; - - size_ = 0L; - - sha256_ = ""; - - hashedSize_ = 0L; - - partiallyHashed_ = false; - - contents_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.FileProto.internal_static_google_cloud_securitycenter_v1_File_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.File getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.File.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.File build() { - com.google.cloud.securitycenter.v1.File result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.File buildPartial() { - com.google.cloud.securitycenter.v1.File result = new com.google.cloud.securitycenter.v1.File(this); - result.path_ = path_; - result.size_ = size_; - result.sha256_ = sha256_; - result.hashedSize_ = hashedSize_; - result.partiallyHashed_ = partiallyHashed_; - result.contents_ = contents_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.File) { - return mergeFrom((com.google.cloud.securitycenter.v1.File)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.File other) { - if (other == com.google.cloud.securitycenter.v1.File.getDefaultInstance()) return this; - if (!other.getPath().isEmpty()) { - path_ = other.path_; - onChanged(); - } - if (other.getSize() != 0L) { - setSize(other.getSize()); - } - if (!other.getSha256().isEmpty()) { - sha256_ = other.sha256_; - onChanged(); - } - if (other.getHashedSize() != 0L) { - setHashedSize(other.getHashedSize()); - } - if (other.getPartiallyHashed() != false) { - setPartiallyHashed(other.getPartiallyHashed()); - } - if (!other.getContents().isEmpty()) { - contents_ = other.contents_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.File parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.File) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object path_ = ""; - /** - *
-     * Absolute path of the file as a JSON encoded string.
-     * 
- * - * string path = 1; - * @return The path. - */ - public java.lang.String getPath() { - java.lang.Object ref = path_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - path_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Absolute path of the file as a JSON encoded string.
-     * 
- * - * string path = 1; - * @return The bytes for path. - */ - public com.google.protobuf.ByteString - getPathBytes() { - java.lang.Object ref = path_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - path_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Absolute path of the file as a JSON encoded string.
-     * 
- * - * string path = 1; - * @param value The path to set. - * @return This builder for chaining. - */ - public Builder setPath( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - path_ = value; - onChanged(); - return this; - } - /** - *
-     * Absolute path of the file as a JSON encoded string.
-     * 
- * - * string path = 1; - * @return This builder for chaining. - */ - public Builder clearPath() { - - path_ = getDefaultInstance().getPath(); - onChanged(); - return this; - } - /** - *
-     * Absolute path of the file as a JSON encoded string.
-     * 
- * - * string path = 1; - * @param value The bytes for path to set. - * @return This builder for chaining. - */ - public Builder setPathBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - path_ = value; - onChanged(); - return this; - } - - private long size_ ; - /** - *
-     * Size of the file in bytes.
-     * 
- * - * int64 size = 2; - * @return The size. - */ - @java.lang.Override - public long getSize() { - return size_; - } - /** - *
-     * Size of the file in bytes.
-     * 
- * - * int64 size = 2; - * @param value The size to set. - * @return This builder for chaining. - */ - public Builder setSize(long value) { - - size_ = value; - onChanged(); - return this; - } - /** - *
-     * Size of the file in bytes.
-     * 
- * - * int64 size = 2; - * @return This builder for chaining. - */ - public Builder clearSize() { - - size_ = 0L; - onChanged(); - return this; - } - - private java.lang.Object sha256_ = ""; - /** - *
-     * SHA256 hash of the first hashed_size bytes of the file encoded as a
-     * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
-     * of the entire file.
-     * 
- * - * string sha256 = 3; - * @return The sha256. - */ - public java.lang.String getSha256() { - java.lang.Object ref = sha256_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sha256_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * SHA256 hash of the first hashed_size bytes of the file encoded as a
-     * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
-     * of the entire file.
-     * 
- * - * string sha256 = 3; - * @return The bytes for sha256. - */ - public com.google.protobuf.ByteString - getSha256Bytes() { - java.lang.Object ref = sha256_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sha256_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * SHA256 hash of the first hashed_size bytes of the file encoded as a
-     * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
-     * of the entire file.
-     * 
- * - * string sha256 = 3; - * @param value The sha256 to set. - * @return This builder for chaining. - */ - public Builder setSha256( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - sha256_ = value; - onChanged(); - return this; - } - /** - *
-     * SHA256 hash of the first hashed_size bytes of the file encoded as a
-     * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
-     * of the entire file.
-     * 
- * - * string sha256 = 3; - * @return This builder for chaining. - */ - public Builder clearSha256() { - - sha256_ = getDefaultInstance().getSha256(); - onChanged(); - return this; - } - /** - *
-     * SHA256 hash of the first hashed_size bytes of the file encoded as a
-     * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
-     * of the entire file.
-     * 
- * - * string sha256 = 3; - * @param value The bytes for sha256 to set. - * @return This builder for chaining. - */ - public Builder setSha256Bytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - sha256_ = value; - onChanged(); - return this; - } - - private long hashedSize_ ; - /** - *
-     * The length in bytes of the file prefix that was hashed.  If
-     * hashed_size == size, any hashes reported represent the entire
-     * file.
-     * 
- * - * int64 hashed_size = 4; - * @return The hashedSize. - */ - @java.lang.Override - public long getHashedSize() { - return hashedSize_; - } - /** - *
-     * The length in bytes of the file prefix that was hashed.  If
-     * hashed_size == size, any hashes reported represent the entire
-     * file.
-     * 
- * - * int64 hashed_size = 4; - * @param value The hashedSize to set. - * @return This builder for chaining. - */ - public Builder setHashedSize(long value) { - - hashedSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The length in bytes of the file prefix that was hashed.  If
-     * hashed_size == size, any hashes reported represent the entire
-     * file.
-     * 
- * - * int64 hashed_size = 4; - * @return This builder for chaining. - */ - public Builder clearHashedSize() { - - hashedSize_ = 0L; - onChanged(); - return this; - } - - private boolean partiallyHashed_ ; - /** - *
-     * True when the hash covers only a prefix of the file.
-     * 
- * - * bool partially_hashed = 5; - * @return The partiallyHashed. - */ - @java.lang.Override - public boolean getPartiallyHashed() { - return partiallyHashed_; - } - /** - *
-     * True when the hash covers only a prefix of the file.
-     * 
- * - * bool partially_hashed = 5; - * @param value The partiallyHashed to set. - * @return This builder for chaining. - */ - public Builder setPartiallyHashed(boolean value) { - - partiallyHashed_ = value; - onChanged(); - return this; - } - /** - *
-     * True when the hash covers only a prefix of the file.
-     * 
- * - * bool partially_hashed = 5; - * @return This builder for chaining. - */ - public Builder clearPartiallyHashed() { - - partiallyHashed_ = false; - onChanged(); - return this; - } - - private java.lang.Object contents_ = ""; - /** - *
-     * Prefix of the file contents as a JSON encoded string.
-     * (Currently only populated for Malicious Script Executed findings.)
-     * 
- * - * string contents = 6; - * @return The contents. - */ - public java.lang.String getContents() { - java.lang.Object ref = contents_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - contents_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Prefix of the file contents as a JSON encoded string.
-     * (Currently only populated for Malicious Script Executed findings.)
-     * 
- * - * string contents = 6; - * @return The bytes for contents. - */ - public com.google.protobuf.ByteString - getContentsBytes() { - java.lang.Object ref = contents_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - contents_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Prefix of the file contents as a JSON encoded string.
-     * (Currently only populated for Malicious Script Executed findings.)
-     * 
- * - * string contents = 6; - * @param value The contents to set. - * @return This builder for chaining. - */ - public Builder setContents( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - contents_ = value; - onChanged(); - return this; - } - /** - *
-     * Prefix of the file contents as a JSON encoded string.
-     * (Currently only populated for Malicious Script Executed findings.)
-     * 
- * - * string contents = 6; - * @return This builder for chaining. - */ - public Builder clearContents() { - - contents_ = getDefaultInstance().getContents(); - onChanged(); - return this; - } - /** - *
-     * Prefix of the file contents as a JSON encoded string.
-     * (Currently only populated for Malicious Script Executed findings.)
-     * 
- * - * string contents = 6; - * @param value The bytes for contents to set. - * @return This builder for chaining. - */ - public Builder setContentsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - contents_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.File) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.File) - private static final com.google.cloud.securitycenter.v1.File DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.File(); - } - - public static com.google.cloud.securitycenter.v1.File getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public File parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new File(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.File getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FileOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FileOrBuilder.java deleted file mode 100644 index 04a82d41e09b..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FileOrBuilder.java +++ /dev/null @@ -1,107 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/file.proto - -package com.google.cloud.securitycenter.v1; - -public interface FileOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.File) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Absolute path of the file as a JSON encoded string.
-   * 
- * - * string path = 1; - * @return The path. - */ - java.lang.String getPath(); - /** - *
-   * Absolute path of the file as a JSON encoded string.
-   * 
- * - * string path = 1; - * @return The bytes for path. - */ - com.google.protobuf.ByteString - getPathBytes(); - - /** - *
-   * Size of the file in bytes.
-   * 
- * - * int64 size = 2; - * @return The size. - */ - long getSize(); - - /** - *
-   * SHA256 hash of the first hashed_size bytes of the file encoded as a
-   * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
-   * of the entire file.
-   * 
- * - * string sha256 = 3; - * @return The sha256. - */ - java.lang.String getSha256(); - /** - *
-   * SHA256 hash of the first hashed_size bytes of the file encoded as a
-   * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
-   * of the entire file.
-   * 
- * - * string sha256 = 3; - * @return The bytes for sha256. - */ - com.google.protobuf.ByteString - getSha256Bytes(); - - /** - *
-   * The length in bytes of the file prefix that was hashed.  If
-   * hashed_size == size, any hashes reported represent the entire
-   * file.
-   * 
- * - * int64 hashed_size = 4; - * @return The hashedSize. - */ - long getHashedSize(); - - /** - *
-   * True when the hash covers only a prefix of the file.
-   * 
- * - * bool partially_hashed = 5; - * @return The partiallyHashed. - */ - boolean getPartiallyHashed(); - - /** - *
-   * Prefix of the file contents as a JSON encoded string.
-   * (Currently only populated for Malicious Script Executed findings.)
-   * 
- * - * string contents = 6; - * @return The contents. - */ - java.lang.String getContents(); - /** - *
-   * Prefix of the file contents as a JSON encoded string.
-   * (Currently only populated for Malicious Script Executed findings.)
-   * 
- * - * string contents = 6; - * @return The bytes for contents. - */ - com.google.protobuf.ByteString - getContentsBytes(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FileProto.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FileProto.java deleted file mode 100644 index 1ac1d8dbf2f7..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FileProto.java +++ /dev/null @@ -1,56 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/file.proto - -package com.google.cloud.securitycenter.v1; - -public final class FileProto { - private FileProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_File_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_File_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n)google/cloud/securitycenter/v1/file.pr" + - "oto\022\036google.cloud.securitycenter.v1\"s\n\004F" + - "ile\022\014\n\004path\030\001 \001(\t\022\014\n\004size\030\002 \001(\003\022\016\n\006sha25" + - "6\030\003 \001(\t\022\023\n\013hashed_size\030\004 \001(\003\022\030\n\020partiall" + - "y_hashed\030\005 \001(\010\022\020\n\010contents\030\006 \001(\tB\345\001\n\"com" + - ".google.cloud.securitycenter.v1B\tFilePro" + - "toP\001ZLgoogle.golang.org/genproto/googlea" + - "pis/cloud/securitycenter/v1;securitycent" + - "er\252\002\036Google.Cloud.SecurityCenter.V1\312\002\036Go" + - "ogle\\Cloud\\SecurityCenter\\V1\352\002!Google::C" + - "loud::SecurityCenter::V1b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_google_cloud_securitycenter_v1_File_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_securitycenter_v1_File_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_File_descriptor, - new java.lang.String[] { "Path", "Size", "Sha256", "HashedSize", "PartiallyHashed", "Contents", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Finding.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Finding.java deleted file mode 100644 index eb4cf38ce90c..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Finding.java +++ /dev/null @@ -1,9560 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/finding.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Security Command Center finding.
- * A finding is a record of assessment data like security, risk, health, or
- * privacy, that is ingested into Security Command Center for presentation,
- * notification, analysis, policy testing, and enforcement. For example, a
- * cross-site scripting (XSS) vulnerability in an App Engine application is a
- * finding.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Finding} - */ -public final class Finding extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Finding) - FindingOrBuilder { -private static final long serialVersionUID = 0L; - // Use Finding.newBuilder() to construct. - private Finding(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Finding() { - name_ = ""; - parent_ = ""; - resourceName_ = ""; - state_ = 0; - category_ = ""; - externalUri_ = ""; - severity_ = 0; - canonicalName_ = ""; - mute_ = 0; - findingClass_ = 0; - connections_ = java.util.Collections.emptyList(); - muteInitiator_ = ""; - processes_ = java.util.Collections.emptyList(); - compliances_ = java.util.Collections.emptyList(); - description_ = ""; - iamBindings_ = java.util.Collections.emptyList(); - nextSteps_ = ""; - containers_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Finding(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Finding( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - resourceName_ = s; - break; - } - case 32: { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - category_ = s; - break; - } - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - - externalUri_ = s; - break; - } - case 58: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - sourceProperties_ = com.google.protobuf.MapField.newMapField( - SourcePropertiesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - sourceProperties__ = input.readMessage( - SourcePropertiesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - sourceProperties_.getMutableMap().put( - sourceProperties__.getKey(), sourceProperties__.getValue()); - break; - } - case 66: { - com.google.cloud.securitycenter.v1.SecurityMarks.Builder subBuilder = null; - if (securityMarks_ != null) { - subBuilder = securityMarks_.toBuilder(); - } - securityMarks_ = input.readMessage(com.google.cloud.securitycenter.v1.SecurityMarks.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(securityMarks_); - securityMarks_ = subBuilder.buildPartial(); - } - - break; - } - case 74: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (eventTime_ != null) { - subBuilder = eventTime_.toBuilder(); - } - eventTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(eventTime_); - eventTime_ = subBuilder.buildPartial(); - } - - break; - } - case 82: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 96: { - int rawValue = input.readEnum(); - - severity_ = rawValue; - break; - } - case 114: { - java.lang.String s = input.readStringRequireUtf8(); - - canonicalName_ = s; - break; - } - case 120: { - int rawValue = input.readEnum(); - - mute_ = rawValue; - break; - } - case 136: { - int rawValue = input.readEnum(); - - findingClass_ = rawValue; - break; - } - case 146: { - com.google.cloud.securitycenter.v1.Indicator.Builder subBuilder = null; - if (indicator_ != null) { - subBuilder = indicator_.toBuilder(); - } - indicator_ = input.readMessage(com.google.cloud.securitycenter.v1.Indicator.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(indicator_); - indicator_ = subBuilder.buildPartial(); - } - - break; - } - case 162: { - com.google.cloud.securitycenter.v1.Vulnerability.Builder subBuilder = null; - if (vulnerability_ != null) { - subBuilder = vulnerability_.toBuilder(); - } - vulnerability_ = input.readMessage(com.google.cloud.securitycenter.v1.Vulnerability.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(vulnerability_); - vulnerability_ = subBuilder.buildPartial(); - } - - break; - } - case 170: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (muteUpdateTime_ != null) { - subBuilder = muteUpdateTime_.toBuilder(); - } - muteUpdateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(muteUpdateTime_); - muteUpdateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 178: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - externalSystems_ = com.google.protobuf.MapField.newMapField( - ExternalSystemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry - externalSystems__ = input.readMessage( - ExternalSystemsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - externalSystems_.getMutableMap().put( - externalSystems__.getKey(), externalSystems__.getValue()); - break; - } - case 202: { - com.google.cloud.securitycenter.v1.MitreAttack.Builder subBuilder = null; - if (mitreAttack_ != null) { - subBuilder = mitreAttack_.toBuilder(); - } - mitreAttack_ = input.readMessage(com.google.cloud.securitycenter.v1.MitreAttack.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(mitreAttack_); - mitreAttack_ = subBuilder.buildPartial(); - } - - break; - } - case 210: { - com.google.cloud.securitycenter.v1.Access.Builder subBuilder = null; - if (access_ != null) { - subBuilder = access_.toBuilder(); - } - access_ = input.readMessage(com.google.cloud.securitycenter.v1.Access.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(access_); - access_ = subBuilder.buildPartial(); - } - - break; - } - case 226: { - java.lang.String s = input.readStringRequireUtf8(); - - muteInitiator_ = s; - break; - } - case 242: { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - processes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - processes_.add( - input.readMessage(com.google.cloud.securitycenter.v1.Process.parser(), extensionRegistry)); - break; - } - case 250: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - connections_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - connections_.add( - input.readMessage(com.google.cloud.securitycenter.v1.Connection.parser(), extensionRegistry)); - break; - } - case 266: { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - contacts_ = com.google.protobuf.MapField.newMapField( - ContactsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000010; - } - com.google.protobuf.MapEntry - contacts__ = input.readMessage( - ContactsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - contacts_.getMutableMap().put( - contacts__.getKey(), contacts__.getValue()); - break; - } - case 274: { - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - compliances_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - compliances_.add( - input.readMessage(com.google.cloud.securitycenter.v1.Compliance.parser(), extensionRegistry)); - break; - } - case 298: { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 306: { - com.google.cloud.securitycenter.v1.Exfiltration.Builder subBuilder = null; - if (exfiltration_ != null) { - subBuilder = exfiltration_.toBuilder(); - } - exfiltration_ = input.readMessage(com.google.cloud.securitycenter.v1.Exfiltration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(exfiltration_); - exfiltration_ = subBuilder.buildPartial(); - } - - break; - } - case 314: { - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - iamBindings_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; - } - iamBindings_.add( - input.readMessage(com.google.cloud.securitycenter.v1.IamBinding.parser(), extensionRegistry)); - break; - } - case 322: { - java.lang.String s = input.readStringRequireUtf8(); - - nextSteps_ = s; - break; - } - case 338: { - if (!((mutable_bitField0_ & 0x00000080) != 0)) { - containers_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000080; - } - containers_.add( - input.readMessage(com.google.cloud.securitycenter.v1.Container.parser(), extensionRegistry)); - break; - } - case 346: { - com.google.cloud.securitycenter.v1.Kubernetes.Builder subBuilder = null; - if (kubernetes_ != null) { - subBuilder = kubernetes_.toBuilder(); - } - kubernetes_ = input.readMessage(com.google.cloud.securitycenter.v1.Kubernetes.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kubernetes_); - kubernetes_ = subBuilder.buildPartial(); - } - - break; - } - case 354: { - com.google.cloud.securitycenter.v1.Database.Builder subBuilder = null; - if (database_ != null) { - subBuilder = database_.toBuilder(); - } - database_ = input.readMessage(com.google.cloud.securitycenter.v1.Database.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(database_); - database_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000008) != 0)) { - processes_ = java.util.Collections.unmodifiableList(processes_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - connections_ = java.util.Collections.unmodifiableList(connections_); - } - if (((mutable_bitField0_ & 0x00000020) != 0)) { - compliances_ = java.util.Collections.unmodifiableList(compliances_); - } - if (((mutable_bitField0_ & 0x00000040) != 0)) { - iamBindings_ = java.util.Collections.unmodifiableList(iamBindings_); - } - if (((mutable_bitField0_ & 0x00000080) != 0)) { - containers_ = java.util.Collections.unmodifiableList(containers_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.FindingOuterClass.internal_static_google_cloud_securitycenter_v1_Finding_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 7: - return internalGetSourceProperties(); - case 22: - return internalGetExternalSystems(); - case 33: - return internalGetContacts(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.FindingOuterClass.internal_static_google_cloud_securitycenter_v1_Finding_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Finding.class, com.google.cloud.securitycenter.v1.Finding.Builder.class); - } - - /** - *
-   * The state of the finding.
-   * 
- * - * Protobuf enum {@code google.cloud.securitycenter.v1.Finding.State} - */ - public enum State - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unspecified state.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - *
-     * The finding requires attention and has not been addressed yet.
-     * 
- * - * ACTIVE = 1; - */ - ACTIVE(1), - /** - *
-     * The finding has been fixed, triaged as a non-issue or otherwise addressed
-     * and is no longer active.
-     * 
- * - * INACTIVE = 2; - */ - INACTIVE(2), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unspecified state.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - *
-     * The finding requires attention and has not been addressed yet.
-     * 
- * - * ACTIVE = 1; - */ - public static final int ACTIVE_VALUE = 1; - /** - *
-     * The finding has been fixed, triaged as a non-issue or otherwise addressed
-     * and is no longer active.
-     * 
- * - * INACTIVE = 2; - */ - public static final int INACTIVE_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: return STATE_UNSPECIFIED; - case 1: return ACTIVE; - case 2: return INACTIVE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - State> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.Finding.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v1.Finding.State) - } - - /** - *
-   * The severity of the finding.
-   * 
- * - * Protobuf enum {@code google.cloud.securitycenter.v1.Finding.Severity} - */ - public enum Severity - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * This value is used for findings when a source doesn't write a severity
-     * value.
-     * 
- * - * SEVERITY_UNSPECIFIED = 0; - */ - SEVERITY_UNSPECIFIED(0), - /** - *
-     * Vulnerability:
-     * A critical vulnerability is easily discoverable by an external actor,
-     * exploitable, and results in the direct ability to execute arbitrary code,
-     * exfiltrate data, and otherwise gain additional access and privileges to
-     * cloud resources and workloads. Examples include publicly accessible
-     * unprotected user data, public SSH access with weak or no passwords, etc.
-     * Threat:
-     * Indicates a threat that is able to access, modify, or delete data or
-     * execute unauthorized code within existing resources.
-     * 
- * - * CRITICAL = 1; - */ - CRITICAL(1), - /** - *
-     * Vulnerability:
-     * A high risk vulnerability can be easily discovered and exploited in
-     * combination with other vulnerabilities in order to gain direct access and
-     * the ability to execute arbitrary code, exfiltrate data, and otherwise
-     * gain additional access and privileges to cloud resources and workloads.
-     * An example is a database with weak or no passwords that is only
-     * accessible internally. This database could easily be compromised by an
-     * actor that had access to the internal network.
-     * Threat:
-     * Indicates a threat that is able to create new computational resources in
-     * an environment but not able to access data or execute code in existing
-     * resources.
-     * 
- * - * HIGH = 2; - */ - HIGH(2), - /** - *
-     * Vulnerability:
-     * A medium risk vulnerability could be used by an actor to gain access to
-     * resources or privileges that enable them to eventually (through multiple
-     * steps or a complex exploit) gain access and the ability to execute
-     * arbitrary code or exfiltrate data. An example is a service account with
-     * access to more projects than it should have. If an actor gains access to
-     * the service account, they could potentially use that access to manipulate
-     * a project the service account was not intended to.
-     * Threat:
-     * Indicates a threat that is able to cause operational impact but may not
-     * access data or execute unauthorized code.
-     * 
- * - * MEDIUM = 3; - */ - MEDIUM(3), - /** - *
-     * Vulnerability:
-     * A low risk vulnerability hampers a security organization's ability to
-     * detect vulnerabilities or active threats in their deployment, or prevents
-     * the root cause investigation of security issues. An example is monitoring
-     * and logs being disabled for resource configurations and access.
-     * Threat:
-     * Indicates a threat that has obtained minimal access to an environment but
-     * is not able to access data, execute code, or create resources.
-     * 
- * - * LOW = 4; - */ - LOW(4), - UNRECOGNIZED(-1), - ; - - /** - *
-     * This value is used for findings when a source doesn't write a severity
-     * value.
-     * 
- * - * SEVERITY_UNSPECIFIED = 0; - */ - public static final int SEVERITY_UNSPECIFIED_VALUE = 0; - /** - *
-     * Vulnerability:
-     * A critical vulnerability is easily discoverable by an external actor,
-     * exploitable, and results in the direct ability to execute arbitrary code,
-     * exfiltrate data, and otherwise gain additional access and privileges to
-     * cloud resources and workloads. Examples include publicly accessible
-     * unprotected user data, public SSH access with weak or no passwords, etc.
-     * Threat:
-     * Indicates a threat that is able to access, modify, or delete data or
-     * execute unauthorized code within existing resources.
-     * 
- * - * CRITICAL = 1; - */ - public static final int CRITICAL_VALUE = 1; - /** - *
-     * Vulnerability:
-     * A high risk vulnerability can be easily discovered and exploited in
-     * combination with other vulnerabilities in order to gain direct access and
-     * the ability to execute arbitrary code, exfiltrate data, and otherwise
-     * gain additional access and privileges to cloud resources and workloads.
-     * An example is a database with weak or no passwords that is only
-     * accessible internally. This database could easily be compromised by an
-     * actor that had access to the internal network.
-     * Threat:
-     * Indicates a threat that is able to create new computational resources in
-     * an environment but not able to access data or execute code in existing
-     * resources.
-     * 
- * - * HIGH = 2; - */ - public static final int HIGH_VALUE = 2; - /** - *
-     * Vulnerability:
-     * A medium risk vulnerability could be used by an actor to gain access to
-     * resources or privileges that enable them to eventually (through multiple
-     * steps or a complex exploit) gain access and the ability to execute
-     * arbitrary code or exfiltrate data. An example is a service account with
-     * access to more projects than it should have. If an actor gains access to
-     * the service account, they could potentially use that access to manipulate
-     * a project the service account was not intended to.
-     * Threat:
-     * Indicates a threat that is able to cause operational impact but may not
-     * access data or execute unauthorized code.
-     * 
- * - * MEDIUM = 3; - */ - public static final int MEDIUM_VALUE = 3; - /** - *
-     * Vulnerability:
-     * A low risk vulnerability hampers a security organization's ability to
-     * detect vulnerabilities or active threats in their deployment, or prevents
-     * the root cause investigation of security issues. An example is monitoring
-     * and logs being disabled for resource configurations and access.
-     * Threat:
-     * Indicates a threat that has obtained minimal access to an environment but
-     * is not able to access data, execute code, or create resources.
-     * 
- * - * LOW = 4; - */ - public static final int LOW_VALUE = 4; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Severity valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Severity forNumber(int value) { - switch (value) { - case 0: return SEVERITY_UNSPECIFIED; - case 1: return CRITICAL; - case 2: return HIGH; - case 3: return MEDIUM; - case 4: return LOW; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Severity> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Severity findValueByNumber(int number) { - return Severity.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.Finding.getDescriptor().getEnumTypes().get(1); - } - - private static final Severity[] VALUES = values(); - - public static Severity valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Severity(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v1.Finding.Severity) - } - - /** - *
-   * Mute state a finding can be in.
-   * 
- * - * Protobuf enum {@code google.cloud.securitycenter.v1.Finding.Mute} - */ - public enum Mute - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unspecified.
-     * 
- * - * MUTE_UNSPECIFIED = 0; - */ - MUTE_UNSPECIFIED(0), - /** - *
-     * Finding has been muted.
-     * 
- * - * MUTED = 1; - */ - MUTED(1), - /** - *
-     * Finding has been unmuted.
-     * 
- * - * UNMUTED = 2; - */ - UNMUTED(2), - /** - *
-     * Finding has never been muted/unmuted.
-     * 
- * - * UNDEFINED = 4; - */ - UNDEFINED(4), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unspecified.
-     * 
- * - * MUTE_UNSPECIFIED = 0; - */ - public static final int MUTE_UNSPECIFIED_VALUE = 0; - /** - *
-     * Finding has been muted.
-     * 
- * - * MUTED = 1; - */ - public static final int MUTED_VALUE = 1; - /** - *
-     * Finding has been unmuted.
-     * 
- * - * UNMUTED = 2; - */ - public static final int UNMUTED_VALUE = 2; - /** - *
-     * Finding has never been muted/unmuted.
-     * 
- * - * UNDEFINED = 4; - */ - public static final int UNDEFINED_VALUE = 4; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Mute valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Mute forNumber(int value) { - switch (value) { - case 0: return MUTE_UNSPECIFIED; - case 1: return MUTED; - case 2: return UNMUTED; - case 4: return UNDEFINED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Mute> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Mute findValueByNumber(int number) { - return Mute.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.Finding.getDescriptor().getEnumTypes().get(2); - } - - private static final Mute[] VALUES = values(); - - public static Mute valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Mute(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v1.Finding.Mute) - } - - /** - *
-   * Represents what kind of Finding it is.
-   * 
- * - * Protobuf enum {@code google.cloud.securitycenter.v1.Finding.FindingClass} - */ - public enum FindingClass - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unspecified finding class.
-     * 
- * - * FINDING_CLASS_UNSPECIFIED = 0; - */ - FINDING_CLASS_UNSPECIFIED(0), - /** - *
-     * Describes unwanted or malicious activity.
-     * 
- * - * THREAT = 1; - */ - THREAT(1), - /** - *
-     * Describes a potential weakness in software that increases risk to
-     * Confidentiality & Integrity & Availability.
-     * 
- * - * VULNERABILITY = 2; - */ - VULNERABILITY(2), - /** - *
-     * Describes a potential weakness in cloud resource/asset configuration that
-     * increases risk.
-     * 
- * - * MISCONFIGURATION = 3; - */ - MISCONFIGURATION(3), - /** - *
-     * Describes a security observation that is for informational purposes.
-     * 
- * - * OBSERVATION = 4; - */ - OBSERVATION(4), - /** - *
-     * Describes an error that prevents some SCC functionality.
-     * 
- * - * SCC_ERROR = 5; - */ - SCC_ERROR(5), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unspecified finding class.
-     * 
- * - * FINDING_CLASS_UNSPECIFIED = 0; - */ - public static final int FINDING_CLASS_UNSPECIFIED_VALUE = 0; - /** - *
-     * Describes unwanted or malicious activity.
-     * 
- * - * THREAT = 1; - */ - public static final int THREAT_VALUE = 1; - /** - *
-     * Describes a potential weakness in software that increases risk to
-     * Confidentiality & Integrity & Availability.
-     * 
- * - * VULNERABILITY = 2; - */ - public static final int VULNERABILITY_VALUE = 2; - /** - *
-     * Describes a potential weakness in cloud resource/asset configuration that
-     * increases risk.
-     * 
- * - * MISCONFIGURATION = 3; - */ - public static final int MISCONFIGURATION_VALUE = 3; - /** - *
-     * Describes a security observation that is for informational purposes.
-     * 
- * - * OBSERVATION = 4; - */ - public static final int OBSERVATION_VALUE = 4; - /** - *
-     * Describes an error that prevents some SCC functionality.
-     * 
- * - * SCC_ERROR = 5; - */ - public static final int SCC_ERROR_VALUE = 5; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static FindingClass valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static FindingClass forNumber(int value) { - switch (value) { - case 0: return FINDING_CLASS_UNSPECIFIED; - case 1: return THREAT; - case 2: return VULNERABILITY; - case 3: return MISCONFIGURATION; - case 4: return OBSERVATION; - case 5: return SCC_ERROR; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - FindingClass> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public FindingClass findValueByNumber(int number) { - return FindingClass.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.Finding.getDescriptor().getEnumTypes().get(3); - } - - private static final FindingClass[] VALUES = values(); - - public static FindingClass valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private FindingClass(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v1.Finding.FindingClass) - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * The relative resource name of this finding. See:
-   * https://cloud.google.com/apis/design/resource_names#relative_resource_name
-   * Example:
-   * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}"
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The relative resource name of this finding. See:
-   * https://cloud.google.com/apis/design/resource_names#relative_resource_name
-   * Example:
-   * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}"
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PARENT_FIELD_NUMBER = 2; - private volatile java.lang.Object parent_; - /** - *
-   * The relative resource name of the source the finding belongs to. See:
-   * https://cloud.google.com/apis/design/resource_names#relative_resource_name
-   * This field is immutable after creation time.
-   * For example:
-   * "organizations/{organization_id}/sources/{source_id}"
-   * 
- * - * string parent = 2; - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * The relative resource name of the source the finding belongs to. See:
-   * https://cloud.google.com/apis/design/resource_names#relative_resource_name
-   * This field is immutable after creation time.
-   * For example:
-   * "organizations/{organization_id}/sources/{source_id}"
-   * 
- * - * string parent = 2; - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESOURCE_NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object resourceName_; - /** - *
-   * For findings on Google Cloud resources, the full resource
-   * name of the Google Cloud resource this finding is for. See:
-   * https://cloud.google.com/apis/design/resource_names#full_resource_name
-   * When the finding is for a non-Google Cloud resource, the resourceName can
-   * be a customer or partner defined string. This field is immutable after
-   * creation time.
-   * 
- * - * string resource_name = 3; - * @return The resourceName. - */ - @java.lang.Override - public java.lang.String getResourceName() { - java.lang.Object ref = resourceName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceName_ = s; - return s; - } - } - /** - *
-   * For findings on Google Cloud resources, the full resource
-   * name of the Google Cloud resource this finding is for. See:
-   * https://cloud.google.com/apis/design/resource_names#full_resource_name
-   * When the finding is for a non-Google Cloud resource, the resourceName can
-   * be a customer or partner defined string. This field is immutable after
-   * creation time.
-   * 
- * - * string resource_name = 3; - * @return The bytes for resourceName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getResourceNameBytes() { - java.lang.Object ref = resourceName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STATE_FIELD_NUMBER = 4; - private int state_; - /** - *
-   * The state of the finding.
-   * 
- * - * .google.cloud.securitycenter.v1.Finding.State state = 4; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-   * The state of the finding.
-   * 
- * - * .google.cloud.securitycenter.v1.Finding.State state = 4; - * @return The state. - */ - @java.lang.Override public com.google.cloud.securitycenter.v1.Finding.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.Finding.State result = com.google.cloud.securitycenter.v1.Finding.State.valueOf(state_); - return result == null ? com.google.cloud.securitycenter.v1.Finding.State.UNRECOGNIZED : result; - } - - public static final int CATEGORY_FIELD_NUMBER = 5; - private volatile java.lang.Object category_; - /** - *
-   * The additional taxonomy group within findings from a given source.
-   * This field is immutable after creation time.
-   * Example: "XSS_FLASH_INJECTION"
-   * 
- * - * string category = 5; - * @return The category. - */ - @java.lang.Override - public java.lang.String getCategory() { - java.lang.Object ref = category_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - category_ = s; - return s; - } - } - /** - *
-   * The additional taxonomy group within findings from a given source.
-   * This field is immutable after creation time.
-   * Example: "XSS_FLASH_INJECTION"
-   * 
- * - * string category = 5; - * @return The bytes for category. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCategoryBytes() { - java.lang.Object ref = category_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - category_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EXTERNAL_URI_FIELD_NUMBER = 6; - private volatile java.lang.Object externalUri_; - /** - *
-   * The URI that, if available, points to a web page outside of Security
-   * Command Center where additional information about the finding can be found.
-   * This field is guaranteed to be either empty or a well formed URL.
-   * 
- * - * string external_uri = 6; - * @return The externalUri. - */ - @java.lang.Override - public java.lang.String getExternalUri() { - java.lang.Object ref = externalUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - externalUri_ = s; - return s; - } - } - /** - *
-   * The URI that, if available, points to a web page outside of Security
-   * Command Center where additional information about the finding can be found.
-   * This field is guaranteed to be either empty or a well formed URL.
-   * 
- * - * string external_uri = 6; - * @return The bytes for externalUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getExternalUriBytes() { - java.lang.Object ref = externalUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - externalUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SOURCE_PROPERTIES_FIELD_NUMBER = 7; - private static final class SourcePropertiesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.protobuf.Value> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.securitycenter.v1.FindingOuterClass.internal_static_google_cloud_securitycenter_v1_Finding_SourcePropertiesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.protobuf.Value.getDefaultInstance()); - } - private com.google.protobuf.MapField< - java.lang.String, com.google.protobuf.Value> sourceProperties_; - private com.google.protobuf.MapField - internalGetSourceProperties() { - if (sourceProperties_ == null) { - return com.google.protobuf.MapField.emptyMapField( - SourcePropertiesDefaultEntryHolder.defaultEntry); - } - return sourceProperties_; - } - - public int getSourcePropertiesCount() { - return internalGetSourceProperties().getMap().size(); - } - /** - *
-   * Source specific properties. These properties are managed by the source
-   * that writes the finding. The key names in the source_properties map must be
-   * between 1 and 255 characters, and must start with a letter and contain
-   * alphanumeric characters or underscores only.
-   * 
- * - * map<string, .google.protobuf.Value> source_properties = 7; - */ - - @java.lang.Override - public boolean containsSourceProperties( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetSourceProperties().getMap().containsKey(key); - } - /** - * Use {@link #getSourcePropertiesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getSourceProperties() { - return getSourcePropertiesMap(); - } - /** - *
-   * Source specific properties. These properties are managed by the source
-   * that writes the finding. The key names in the source_properties map must be
-   * between 1 and 255 characters, and must start with a letter and contain
-   * alphanumeric characters or underscores only.
-   * 
- * - * map<string, .google.protobuf.Value> source_properties = 7; - */ - @java.lang.Override - - public java.util.Map getSourcePropertiesMap() { - return internalGetSourceProperties().getMap(); - } - /** - *
-   * Source specific properties. These properties are managed by the source
-   * that writes the finding. The key names in the source_properties map must be
-   * between 1 and 255 characters, and must start with a letter and contain
-   * alphanumeric characters or underscores only.
-   * 
- * - * map<string, .google.protobuf.Value> source_properties = 7; - */ - @java.lang.Override - - public com.google.protobuf.Value getSourcePropertiesOrDefault( - java.lang.String key, - com.google.protobuf.Value defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetSourceProperties().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Source specific properties. These properties are managed by the source
-   * that writes the finding. The key names in the source_properties map must be
-   * between 1 and 255 characters, and must start with a letter and contain
-   * alphanumeric characters or underscores only.
-   * 
- * - * map<string, .google.protobuf.Value> source_properties = 7; - */ - @java.lang.Override - - public com.google.protobuf.Value getSourcePropertiesOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetSourceProperties().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int SECURITY_MARKS_FIELD_NUMBER = 8; - private com.google.cloud.securitycenter.v1.SecurityMarks securityMarks_; - /** - *
-   * Output only. User specified security marks. These marks are entirely
-   * managed by the user and come from the SecurityMarks resource that belongs
-   * to the finding.
-   * 
- * - * .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the securityMarks field is set. - */ - @java.lang.Override - public boolean hasSecurityMarks() { - return securityMarks_ != null; - } - /** - *
-   * Output only. User specified security marks. These marks are entirely
-   * managed by the user and come from the SecurityMarks resource that belongs
-   * to the finding.
-   * 
- * - * .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The securityMarks. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.SecurityMarks getSecurityMarks() { - return securityMarks_ == null ? com.google.cloud.securitycenter.v1.SecurityMarks.getDefaultInstance() : securityMarks_; - } - /** - *
-   * Output only. User specified security marks. These marks are entirely
-   * managed by the user and come from the SecurityMarks resource that belongs
-   * to the finding.
-   * 
- * - * .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.SecurityMarksOrBuilder getSecurityMarksOrBuilder() { - return getSecurityMarks(); - } - - public static final int EVENT_TIME_FIELD_NUMBER = 9; - private com.google.protobuf.Timestamp eventTime_; - /** - *
-   * The time the finding was first detected. If an existing finding is updated,
-   * then this is the time the update occurred.
-   * For example, if the finding represents an open firewall, this property
-   * captures the time the detector believes the firewall became open. The
-   * accuracy is determined by the detector. If the finding is later resolved,
-   * then this time reflects when the finding was resolved. This must not
-   * be set to a value greater than the current timestamp.
-   * 
- * - * .google.protobuf.Timestamp event_time = 9; - * @return Whether the eventTime field is set. - */ - @java.lang.Override - public boolean hasEventTime() { - return eventTime_ != null; - } - /** - *
-   * The time the finding was first detected. If an existing finding is updated,
-   * then this is the time the update occurred.
-   * For example, if the finding represents an open firewall, this property
-   * captures the time the detector believes the firewall became open. The
-   * accuracy is determined by the detector. If the finding is later resolved,
-   * then this time reflects when the finding was resolved. This must not
-   * be set to a value greater than the current timestamp.
-   * 
- * - * .google.protobuf.Timestamp event_time = 9; - * @return The eventTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEventTime() { - return eventTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : eventTime_; - } - /** - *
-   * The time the finding was first detected. If an existing finding is updated,
-   * then this is the time the update occurred.
-   * For example, if the finding represents an open firewall, this property
-   * captures the time the detector believes the firewall became open. The
-   * accuracy is determined by the detector. If the finding is later resolved,
-   * then this time reflects when the finding was resolved. This must not
-   * be set to a value greater than the current timestamp.
-   * 
- * - * .google.protobuf.Timestamp event_time = 9; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEventTimeOrBuilder() { - return getEventTime(); - } - - public static final int CREATE_TIME_FIELD_NUMBER = 10; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * The time at which the finding was created in Security Command Center.
-   * 
- * - * .google.protobuf.Timestamp create_time = 10; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * The time at which the finding was created in Security Command Center.
-   * 
- * - * .google.protobuf.Timestamp create_time = 10; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * The time at which the finding was created in Security Command Center.
-   * 
- * - * .google.protobuf.Timestamp create_time = 10; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int SEVERITY_FIELD_NUMBER = 12; - private int severity_; - /** - *
-   * The severity of the finding. This field is managed by the source that
-   * writes the finding.
-   * 
- * - * .google.cloud.securitycenter.v1.Finding.Severity severity = 12; - * @return The enum numeric value on the wire for severity. - */ - @java.lang.Override public int getSeverityValue() { - return severity_; - } - /** - *
-   * The severity of the finding. This field is managed by the source that
-   * writes the finding.
-   * 
- * - * .google.cloud.securitycenter.v1.Finding.Severity severity = 12; - * @return The severity. - */ - @java.lang.Override public com.google.cloud.securitycenter.v1.Finding.Severity getSeverity() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.Finding.Severity result = com.google.cloud.securitycenter.v1.Finding.Severity.valueOf(severity_); - return result == null ? com.google.cloud.securitycenter.v1.Finding.Severity.UNRECOGNIZED : result; - } - - public static final int CANONICAL_NAME_FIELD_NUMBER = 14; - private volatile java.lang.Object canonicalName_; - /** - *
-   * The canonical name of the finding. It's either
-   * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}",
-   * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}" or
-   * "projects/{project_number}/sources/{source_id}/findings/{finding_id}",
-   * depending on the closest CRM ancestor of the resource associated with the
-   * finding.
-   * 
- * - * string canonical_name = 14; - * @return The canonicalName. - */ - @java.lang.Override - public java.lang.String getCanonicalName() { - java.lang.Object ref = canonicalName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - canonicalName_ = s; - return s; - } - } - /** - *
-   * The canonical name of the finding. It's either
-   * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}",
-   * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}" or
-   * "projects/{project_number}/sources/{source_id}/findings/{finding_id}",
-   * depending on the closest CRM ancestor of the resource associated with the
-   * finding.
-   * 
- * - * string canonical_name = 14; - * @return The bytes for canonicalName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCanonicalNameBytes() { - java.lang.Object ref = canonicalName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - canonicalName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MUTE_FIELD_NUMBER = 15; - private int mute_; - /** - *
-   * Indicates the mute state of a finding (either muted, unmuted
-   * or undefined). Unlike other attributes of a finding, a finding provider
-   * shouldn't set the value of mute.
-   * 
- * - * .google.cloud.securitycenter.v1.Finding.Mute mute = 15; - * @return The enum numeric value on the wire for mute. - */ - @java.lang.Override public int getMuteValue() { - return mute_; - } - /** - *
-   * Indicates the mute state of a finding (either muted, unmuted
-   * or undefined). Unlike other attributes of a finding, a finding provider
-   * shouldn't set the value of mute.
-   * 
- * - * .google.cloud.securitycenter.v1.Finding.Mute mute = 15; - * @return The mute. - */ - @java.lang.Override public com.google.cloud.securitycenter.v1.Finding.Mute getMute() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.Finding.Mute result = com.google.cloud.securitycenter.v1.Finding.Mute.valueOf(mute_); - return result == null ? com.google.cloud.securitycenter.v1.Finding.Mute.UNRECOGNIZED : result; - } - - public static final int FINDING_CLASS_FIELD_NUMBER = 17; - private int findingClass_; - /** - *
-   * The class of the finding.
-   * 
- * - * .google.cloud.securitycenter.v1.Finding.FindingClass finding_class = 17; - * @return The enum numeric value on the wire for findingClass. - */ - @java.lang.Override public int getFindingClassValue() { - return findingClass_; - } - /** - *
-   * The class of the finding.
-   * 
- * - * .google.cloud.securitycenter.v1.Finding.FindingClass finding_class = 17; - * @return The findingClass. - */ - @java.lang.Override public com.google.cloud.securitycenter.v1.Finding.FindingClass getFindingClass() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.Finding.FindingClass result = com.google.cloud.securitycenter.v1.Finding.FindingClass.valueOf(findingClass_); - return result == null ? com.google.cloud.securitycenter.v1.Finding.FindingClass.UNRECOGNIZED : result; - } - - public static final int INDICATOR_FIELD_NUMBER = 18; - private com.google.cloud.securitycenter.v1.Indicator indicator_; - /** - *
-   * Represents what's commonly known as an Indicator of compromise (IoC) in
-   * computer forensics. This is an artifact observed on a network or in an
-   * operating system that, with high confidence, indicates a computer
-   * intrusion.
-   * Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise
-   * 
- * - * .google.cloud.securitycenter.v1.Indicator indicator = 18; - * @return Whether the indicator field is set. - */ - @java.lang.Override - public boolean hasIndicator() { - return indicator_ != null; - } - /** - *
-   * Represents what's commonly known as an Indicator of compromise (IoC) in
-   * computer forensics. This is an artifact observed on a network or in an
-   * operating system that, with high confidence, indicates a computer
-   * intrusion.
-   * Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise
-   * 
- * - * .google.cloud.securitycenter.v1.Indicator indicator = 18; - * @return The indicator. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator getIndicator() { - return indicator_ == null ? com.google.cloud.securitycenter.v1.Indicator.getDefaultInstance() : indicator_; - } - /** - *
-   * Represents what's commonly known as an Indicator of compromise (IoC) in
-   * computer forensics. This is an artifact observed on a network or in an
-   * operating system that, with high confidence, indicates a computer
-   * intrusion.
-   * Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise
-   * 
- * - * .google.cloud.securitycenter.v1.Indicator indicator = 18; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.IndicatorOrBuilder getIndicatorOrBuilder() { - return getIndicator(); - } - - public static final int VULNERABILITY_FIELD_NUMBER = 20; - private com.google.cloud.securitycenter.v1.Vulnerability vulnerability_; - /** - *
-   * Represents vulnerability specific fields like cve, cvss scores etc.
-   * CVE stands for Common Vulnerabilities and Exposures
-   * (https://cve.mitre.org/about/)
-   * 
- * - * .google.cloud.securitycenter.v1.Vulnerability vulnerability = 20; - * @return Whether the vulnerability field is set. - */ - @java.lang.Override - public boolean hasVulnerability() { - return vulnerability_ != null; - } - /** - *
-   * Represents vulnerability specific fields like cve, cvss scores etc.
-   * CVE stands for Common Vulnerabilities and Exposures
-   * (https://cve.mitre.org/about/)
-   * 
- * - * .google.cloud.securitycenter.v1.Vulnerability vulnerability = 20; - * @return The vulnerability. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Vulnerability getVulnerability() { - return vulnerability_ == null ? com.google.cloud.securitycenter.v1.Vulnerability.getDefaultInstance() : vulnerability_; - } - /** - *
-   * Represents vulnerability specific fields like cve, cvss scores etc.
-   * CVE stands for Common Vulnerabilities and Exposures
-   * (https://cve.mitre.org/about/)
-   * 
- * - * .google.cloud.securitycenter.v1.Vulnerability vulnerability = 20; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.VulnerabilityOrBuilder getVulnerabilityOrBuilder() { - return getVulnerability(); - } - - public static final int MUTE_UPDATE_TIME_FIELD_NUMBER = 21; - private com.google.protobuf.Timestamp muteUpdateTime_; - /** - *
-   * Output only. The most recent time this finding was muted or unmuted.
-   * 
- * - * .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the muteUpdateTime field is set. - */ - @java.lang.Override - public boolean hasMuteUpdateTime() { - return muteUpdateTime_ != null; - } - /** - *
-   * Output only. The most recent time this finding was muted or unmuted.
-   * 
- * - * .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The muteUpdateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getMuteUpdateTime() { - return muteUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : muteUpdateTime_; - } - /** - *
-   * Output only. The most recent time this finding was muted or unmuted.
-   * 
- * - * .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getMuteUpdateTimeOrBuilder() { - return getMuteUpdateTime(); - } - - public static final int EXTERNAL_SYSTEMS_FIELD_NUMBER = 22; - private static final class ExternalSystemsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.securitycenter.v1.ExternalSystem> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.securitycenter.v1.FindingOuterClass.internal_static_google_cloud_securitycenter_v1_Finding_ExternalSystemsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.cloud.securitycenter.v1.ExternalSystem.getDefaultInstance()); - } - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.securitycenter.v1.ExternalSystem> externalSystems_; - private com.google.protobuf.MapField - internalGetExternalSystems() { - if (externalSystems_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ExternalSystemsDefaultEntryHolder.defaultEntry); - } - return externalSystems_; - } - - public int getExternalSystemsCount() { - return internalGetExternalSystems().getMap().size(); - } - /** - *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external
-   * system information and external system finding fields.
-   * 
- * - * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - - @java.lang.Override - public boolean containsExternalSystems( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetExternalSystems().getMap().containsKey(key); - } - /** - * Use {@link #getExternalSystemsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getExternalSystems() { - return getExternalSystemsMap(); - } - /** - *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external
-   * system information and external system finding fields.
-   * 
- * - * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - - public java.util.Map getExternalSystemsMap() { - return internalGetExternalSystems().getMap(); - } - /** - *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external
-   * system information and external system finding fields.
-   * 
- * - * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - - public com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrDefault( - java.lang.String key, - com.google.cloud.securitycenter.v1.ExternalSystem defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetExternalSystems().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external
-   * system information and external system finding fields.
-   * 
- * - * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - - public com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetExternalSystems().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int MITRE_ATTACK_FIELD_NUMBER = 25; - private com.google.cloud.securitycenter.v1.MitreAttack mitreAttack_; - /** - *
-   * MITRE ATT&CK tactics and techniques related to this finding.
-   * See: https://attack.mitre.org
-   * 
- * - * .google.cloud.securitycenter.v1.MitreAttack mitre_attack = 25; - * @return Whether the mitreAttack field is set. - */ - @java.lang.Override - public boolean hasMitreAttack() { - return mitreAttack_ != null; - } - /** - *
-   * MITRE ATT&CK tactics and techniques related to this finding.
-   * See: https://attack.mitre.org
-   * 
- * - * .google.cloud.securitycenter.v1.MitreAttack mitre_attack = 25; - * @return The mitreAttack. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.MitreAttack getMitreAttack() { - return mitreAttack_ == null ? com.google.cloud.securitycenter.v1.MitreAttack.getDefaultInstance() : mitreAttack_; - } - /** - *
-   * MITRE ATT&CK tactics and techniques related to this finding.
-   * See: https://attack.mitre.org
-   * 
- * - * .google.cloud.securitycenter.v1.MitreAttack mitre_attack = 25; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.MitreAttackOrBuilder getMitreAttackOrBuilder() { - return getMitreAttack(); - } - - public static final int ACCESS_FIELD_NUMBER = 26; - private com.google.cloud.securitycenter.v1.Access access_; - /** - *
-   * Access details associated to the Finding, such as more information on the
-   * caller, which method was accessed, from where, etc.
-   * 
- * - * .google.cloud.securitycenter.v1.Access access = 26; - * @return Whether the access field is set. - */ - @java.lang.Override - public boolean hasAccess() { - return access_ != null; - } - /** - *
-   * Access details associated to the Finding, such as more information on the
-   * caller, which method was accessed, from where, etc.
-   * 
- * - * .google.cloud.securitycenter.v1.Access access = 26; - * @return The access. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Access getAccess() { - return access_ == null ? com.google.cloud.securitycenter.v1.Access.getDefaultInstance() : access_; - } - /** - *
-   * Access details associated to the Finding, such as more information on the
-   * caller, which method was accessed, from where, etc.
-   * 
- * - * .google.cloud.securitycenter.v1.Access access = 26; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.AccessOrBuilder getAccessOrBuilder() { - return getAccess(); - } - - public static final int CONNECTIONS_FIELD_NUMBER = 31; - private java.util.List connections_; - /** - *
-   * Contains information about the IP connection associated with the finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Connection connections = 31; - */ - @java.lang.Override - public java.util.List getConnectionsList() { - return connections_; - } - /** - *
-   * Contains information about the IP connection associated with the finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Connection connections = 31; - */ - @java.lang.Override - public java.util.List - getConnectionsOrBuilderList() { - return connections_; - } - /** - *
-   * Contains information about the IP connection associated with the finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Connection connections = 31; - */ - @java.lang.Override - public int getConnectionsCount() { - return connections_.size(); - } - /** - *
-   * Contains information about the IP connection associated with the finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Connection connections = 31; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Connection getConnections(int index) { - return connections_.get(index); - } - /** - *
-   * Contains information about the IP connection associated with the finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Connection connections = 31; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.ConnectionOrBuilder getConnectionsOrBuilder( - int index) { - return connections_.get(index); - } - - public static final int MUTE_INITIATOR_FIELD_NUMBER = 28; - private volatile java.lang.Object muteInitiator_; - /** - *
-   * First known as mute_annotation. Records additional information about the
-   * mute operation e.g. mute config that muted the finding, user who muted the
-   * finding, etc. Unlike other attributes of a finding, a finding provider
-   * shouldn't set the value of mute.
-   * 
- * - * string mute_initiator = 28; - * @return The muteInitiator. - */ - @java.lang.Override - public java.lang.String getMuteInitiator() { - java.lang.Object ref = muteInitiator_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - muteInitiator_ = s; - return s; - } - } - /** - *
-   * First known as mute_annotation. Records additional information about the
-   * mute operation e.g. mute config that muted the finding, user who muted the
-   * finding, etc. Unlike other attributes of a finding, a finding provider
-   * shouldn't set the value of mute.
-   * 
- * - * string mute_initiator = 28; - * @return The bytes for muteInitiator. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMuteInitiatorBytes() { - java.lang.Object ref = muteInitiator_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - muteInitiator_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PROCESSES_FIELD_NUMBER = 30; - private java.util.List processes_; - /** - *
-   * Represents operating system processes associated with the Finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Process processes = 30; - */ - @java.lang.Override - public java.util.List getProcessesList() { - return processes_; - } - /** - *
-   * Represents operating system processes associated with the Finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Process processes = 30; - */ - @java.lang.Override - public java.util.List - getProcessesOrBuilderList() { - return processes_; - } - /** - *
-   * Represents operating system processes associated with the Finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Process processes = 30; - */ - @java.lang.Override - public int getProcessesCount() { - return processes_.size(); - } - /** - *
-   * Represents operating system processes associated with the Finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Process processes = 30; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Process getProcesses(int index) { - return processes_.get(index); - } - /** - *
-   * Represents operating system processes associated with the Finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Process processes = 30; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.ProcessOrBuilder getProcessesOrBuilder( - int index) { - return processes_.get(index); - } - - public static final int CONTACTS_FIELD_NUMBER = 33; - private static final class ContactsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.securitycenter.v1.ContactDetails> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.securitycenter.v1.FindingOuterClass.internal_static_google_cloud_securitycenter_v1_Finding_ContactsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.cloud.securitycenter.v1.ContactDetails.getDefaultInstance()); - } - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.securitycenter.v1.ContactDetails> contacts_; - private com.google.protobuf.MapField - internalGetContacts() { - if (contacts_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ContactsDefaultEntryHolder.defaultEntry); - } - return contacts_; - } - - public int getContactsCount() { - return internalGetContacts().getMap().size(); - } - /** - *
-   * Output only. Map containing the point of contacts for the given finding.
-   * The key represents the type of contact, while the value contains a list of
-   * all the contacts that pertain. Please refer to:
-   * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
-   *     {
-   *       "security": {
-   *         "contacts": [
-   *           {
-   *             "email": "person1@company.com"
-   *           },
-   *           {
-   *             "email": "person2@company.com"
-   *           }
-   *         ]
-   *       }
-   *     }
-   * 
- * - * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - - @java.lang.Override - public boolean containsContacts( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetContacts().getMap().containsKey(key); - } - /** - * Use {@link #getContactsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getContacts() { - return getContactsMap(); - } - /** - *
-   * Output only. Map containing the point of contacts for the given finding.
-   * The key represents the type of contact, while the value contains a list of
-   * all the contacts that pertain. Please refer to:
-   * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
-   *     {
-   *       "security": {
-   *         "contacts": [
-   *           {
-   *             "email": "person1@company.com"
-   *           },
-   *           {
-   *             "email": "person2@company.com"
-   *           }
-   *         ]
-   *       }
-   *     }
-   * 
- * - * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - - public java.util.Map getContactsMap() { - return internalGetContacts().getMap(); - } - /** - *
-   * Output only. Map containing the point of contacts for the given finding.
-   * The key represents the type of contact, while the value contains a list of
-   * all the contacts that pertain. Please refer to:
-   * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
-   *     {
-   *       "security": {
-   *         "contacts": [
-   *           {
-   *             "email": "person1@company.com"
-   *           },
-   *           {
-   *             "email": "person2@company.com"
-   *           }
-   *         ]
-   *       }
-   *     }
-   * 
- * - * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - - public com.google.cloud.securitycenter.v1.ContactDetails getContactsOrDefault( - java.lang.String key, - com.google.cloud.securitycenter.v1.ContactDetails defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetContacts().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Output only. Map containing the point of contacts for the given finding.
-   * The key represents the type of contact, while the value contains a list of
-   * all the contacts that pertain. Please refer to:
-   * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
-   *     {
-   *       "security": {
-   *         "contacts": [
-   *           {
-   *             "email": "person1@company.com"
-   *           },
-   *           {
-   *             "email": "person2@company.com"
-   *           }
-   *         ]
-   *       }
-   *     }
-   * 
- * - * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - - public com.google.cloud.securitycenter.v1.ContactDetails getContactsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetContacts().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int COMPLIANCES_FIELD_NUMBER = 34; - private java.util.List compliances_; - /** - *
-   * Contains compliance information for security standards associated to the
-   * finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; - */ - @java.lang.Override - public java.util.List getCompliancesList() { - return compliances_; - } - /** - *
-   * Contains compliance information for security standards associated to the
-   * finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; - */ - @java.lang.Override - public java.util.List - getCompliancesOrBuilderList() { - return compliances_; - } - /** - *
-   * Contains compliance information for security standards associated to the
-   * finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; - */ - @java.lang.Override - public int getCompliancesCount() { - return compliances_.size(); - } - /** - *
-   * Contains compliance information for security standards associated to the
-   * finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Compliance getCompliances(int index) { - return compliances_.get(index); - } - /** - *
-   * Contains compliance information for security standards associated to the
-   * finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.ComplianceOrBuilder getCompliancesOrBuilder( - int index) { - return compliances_.get(index); - } - - public static final int DESCRIPTION_FIELD_NUMBER = 37; - private volatile java.lang.Object description_; - /** - *
-   * Contains more detail about the finding.
-   * 
- * - * string description = 37; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * Contains more detail about the finding.
-   * 
- * - * string description = 37; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EXFILTRATION_FIELD_NUMBER = 38; - private com.google.cloud.securitycenter.v1.Exfiltration exfiltration_; - /** - *
-   * Represents exfiltration associated with the Finding.
-   * 
- * - * .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; - * @return Whether the exfiltration field is set. - */ - @java.lang.Override - public boolean hasExfiltration() { - return exfiltration_ != null; - } - /** - *
-   * Represents exfiltration associated with the Finding.
-   * 
- * - * .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; - * @return The exfiltration. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Exfiltration getExfiltration() { - return exfiltration_ == null ? com.google.cloud.securitycenter.v1.Exfiltration.getDefaultInstance() : exfiltration_; - } - /** - *
-   * Represents exfiltration associated with the Finding.
-   * 
- * - * .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.ExfiltrationOrBuilder getExfiltrationOrBuilder() { - return getExfiltration(); - } - - public static final int IAM_BINDINGS_FIELD_NUMBER = 39; - private java.util.List iamBindings_; - /** - *
-   * Represents IAM bindings associated with the Finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; - */ - @java.lang.Override - public java.util.List getIamBindingsList() { - return iamBindings_; - } - /** - *
-   * Represents IAM bindings associated with the Finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; - */ - @java.lang.Override - public java.util.List - getIamBindingsOrBuilderList() { - return iamBindings_; - } - /** - *
-   * Represents IAM bindings associated with the Finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; - */ - @java.lang.Override - public int getIamBindingsCount() { - return iamBindings_.size(); - } - /** - *
-   * Represents IAM bindings associated with the Finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.IamBinding getIamBindings(int index) { - return iamBindings_.get(index); - } - /** - *
-   * Represents IAM bindings associated with the Finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.IamBindingOrBuilder getIamBindingsOrBuilder( - int index) { - return iamBindings_.get(index); - } - - public static final int NEXT_STEPS_FIELD_NUMBER = 40; - private volatile java.lang.Object nextSteps_; - /** - *
-   * Next steps associate to the finding.
-   * 
- * - * string next_steps = 40; - * @return The nextSteps. - */ - @java.lang.Override - public java.lang.String getNextSteps() { - java.lang.Object ref = nextSteps_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextSteps_ = s; - return s; - } - } - /** - *
-   * Next steps associate to the finding.
-   * 
- * - * string next_steps = 40; - * @return The bytes for nextSteps. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextStepsBytes() { - java.lang.Object ref = nextSteps_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextSteps_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONTAINERS_FIELD_NUMBER = 42; - private java.util.List containers_; - /** - *
-   * Containers associated with the finding. containers provides information
-   * for both Kubernetes and non-Kubernetes containers.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 42; - */ - @java.lang.Override - public java.util.List getContainersList() { - return containers_; - } - /** - *
-   * Containers associated with the finding. containers provides information
-   * for both Kubernetes and non-Kubernetes containers.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 42; - */ - @java.lang.Override - public java.util.List - getContainersOrBuilderList() { - return containers_; - } - /** - *
-   * Containers associated with the finding. containers provides information
-   * for both Kubernetes and non-Kubernetes containers.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 42; - */ - @java.lang.Override - public int getContainersCount() { - return containers_.size(); - } - /** - *
-   * Containers associated with the finding. containers provides information
-   * for both Kubernetes and non-Kubernetes containers.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 42; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Container getContainers(int index) { - return containers_.get(index); - } - /** - *
-   * Containers associated with the finding. containers provides information
-   * for both Kubernetes and non-Kubernetes containers.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 42; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.ContainerOrBuilder getContainersOrBuilder( - int index) { - return containers_.get(index); - } - - public static final int KUBERNETES_FIELD_NUMBER = 43; - private com.google.cloud.securitycenter.v1.Kubernetes kubernetes_; - /** - *
-   * Kubernetes resources associated with the finding.
-   * 
- * - * .google.cloud.securitycenter.v1.Kubernetes kubernetes = 43; - * @return Whether the kubernetes field is set. - */ - @java.lang.Override - public boolean hasKubernetes() { - return kubernetes_ != null; - } - /** - *
-   * Kubernetes resources associated with the finding.
-   * 
- * - * .google.cloud.securitycenter.v1.Kubernetes kubernetes = 43; - * @return The kubernetes. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes getKubernetes() { - return kubernetes_ == null ? com.google.cloud.securitycenter.v1.Kubernetes.getDefaultInstance() : kubernetes_; - } - /** - *
-   * Kubernetes resources associated with the finding.
-   * 
- * - * .google.cloud.securitycenter.v1.Kubernetes kubernetes = 43; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.KubernetesOrBuilder getKubernetesOrBuilder() { - return getKubernetes(); - } - - public static final int DATABASE_FIELD_NUMBER = 44; - private com.google.cloud.securitycenter.v1.Database database_; - /** - *
-   * Database associated with the finding.
-   * 
- * - * .google.cloud.securitycenter.v1.Database database = 44; - * @return Whether the database field is set. - */ - @java.lang.Override - public boolean hasDatabase() { - return database_ != null; - } - /** - *
-   * Database associated with the finding.
-   * 
- * - * .google.cloud.securitycenter.v1.Database database = 44; - * @return The database. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Database getDatabase() { - return database_ == null ? com.google.cloud.securitycenter.v1.Database.getDefaultInstance() : database_; - } - /** - *
-   * Database associated with the finding.
-   * 
- * - * .google.cloud.securitycenter.v1.Database database = 44; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.DatabaseOrBuilder getDatabaseOrBuilder() { - return getDatabase(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, resourceName_); - } - if (state_ != com.google.cloud.securitycenter.v1.Finding.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(4, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(category_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, category_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, externalUri_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetSourceProperties(), - SourcePropertiesDefaultEntryHolder.defaultEntry, - 7); - if (securityMarks_ != null) { - output.writeMessage(8, getSecurityMarks()); - } - if (eventTime_ != null) { - output.writeMessage(9, getEventTime()); - } - if (createTime_ != null) { - output.writeMessage(10, getCreateTime()); - } - if (severity_ != com.google.cloud.securitycenter.v1.Finding.Severity.SEVERITY_UNSPECIFIED.getNumber()) { - output.writeEnum(12, severity_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(canonicalName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 14, canonicalName_); - } - if (mute_ != com.google.cloud.securitycenter.v1.Finding.Mute.MUTE_UNSPECIFIED.getNumber()) { - output.writeEnum(15, mute_); - } - if (findingClass_ != com.google.cloud.securitycenter.v1.Finding.FindingClass.FINDING_CLASS_UNSPECIFIED.getNumber()) { - output.writeEnum(17, findingClass_); - } - if (indicator_ != null) { - output.writeMessage(18, getIndicator()); - } - if (vulnerability_ != null) { - output.writeMessage(20, getVulnerability()); - } - if (muteUpdateTime_ != null) { - output.writeMessage(21, getMuteUpdateTime()); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetExternalSystems(), - ExternalSystemsDefaultEntryHolder.defaultEntry, - 22); - if (mitreAttack_ != null) { - output.writeMessage(25, getMitreAttack()); - } - if (access_ != null) { - output.writeMessage(26, getAccess()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(muteInitiator_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 28, muteInitiator_); - } - for (int i = 0; i < processes_.size(); i++) { - output.writeMessage(30, processes_.get(i)); - } - for (int i = 0; i < connections_.size(); i++) { - output.writeMessage(31, connections_.get(i)); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetContacts(), - ContactsDefaultEntryHolder.defaultEntry, - 33); - for (int i = 0; i < compliances_.size(); i++) { - output.writeMessage(34, compliances_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 37, description_); - } - if (exfiltration_ != null) { - output.writeMessage(38, getExfiltration()); - } - for (int i = 0; i < iamBindings_.size(); i++) { - output.writeMessage(39, iamBindings_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextSteps_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 40, nextSteps_); - } - for (int i = 0; i < containers_.size(); i++) { - output.writeMessage(42, containers_.get(i)); - } - if (kubernetes_ != null) { - output.writeMessage(43, getKubernetes()); - } - if (database_ != null) { - output.writeMessage(44, getDatabase()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, resourceName_); - } - if (state_ != com.google.cloud.securitycenter.v1.Finding.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(category_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, category_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, externalUri_); - } - for (java.util.Map.Entry entry - : internalGetSourceProperties().getMap().entrySet()) { - com.google.protobuf.MapEntry - sourceProperties__ = SourcePropertiesDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, sourceProperties__); - } - if (securityMarks_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, getSecurityMarks()); - } - if (eventTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, getEventTime()); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, getCreateTime()); - } - if (severity_ != com.google.cloud.securitycenter.v1.Finding.Severity.SEVERITY_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(12, severity_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(canonicalName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, canonicalName_); - } - if (mute_ != com.google.cloud.securitycenter.v1.Finding.Mute.MUTE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(15, mute_); - } - if (findingClass_ != com.google.cloud.securitycenter.v1.Finding.FindingClass.FINDING_CLASS_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(17, findingClass_); - } - if (indicator_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(18, getIndicator()); - } - if (vulnerability_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(20, getVulnerability()); - } - if (muteUpdateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(21, getMuteUpdateTime()); - } - for (java.util.Map.Entry entry - : internalGetExternalSystems().getMap().entrySet()) { - com.google.protobuf.MapEntry - externalSystems__ = ExternalSystemsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(22, externalSystems__); - } - if (mitreAttack_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(25, getMitreAttack()); - } - if (access_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(26, getAccess()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(muteInitiator_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(28, muteInitiator_); - } - for (int i = 0; i < processes_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(30, processes_.get(i)); - } - for (int i = 0; i < connections_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(31, connections_.get(i)); - } - for (java.util.Map.Entry entry - : internalGetContacts().getMap().entrySet()) { - com.google.protobuf.MapEntry - contacts__ = ContactsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(33, contacts__); - } - for (int i = 0; i < compliances_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(34, compliances_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(37, description_); - } - if (exfiltration_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(38, getExfiltration()); - } - for (int i = 0; i < iamBindings_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(39, iamBindings_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextSteps_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(40, nextSteps_); - } - for (int i = 0; i < containers_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(42, containers_.get(i)); - } - if (kubernetes_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(43, getKubernetes()); - } - if (database_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(44, getDatabase()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.Finding)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.Finding other = (com.google.cloud.securitycenter.v1.Finding) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getParent() - .equals(other.getParent())) return false; - if (!getResourceName() - .equals(other.getResourceName())) return false; - if (state_ != other.state_) return false; - if (!getCategory() - .equals(other.getCategory())) return false; - if (!getExternalUri() - .equals(other.getExternalUri())) return false; - if (!internalGetSourceProperties().equals( - other.internalGetSourceProperties())) return false; - if (hasSecurityMarks() != other.hasSecurityMarks()) return false; - if (hasSecurityMarks()) { - if (!getSecurityMarks() - .equals(other.getSecurityMarks())) return false; - } - if (hasEventTime() != other.hasEventTime()) return false; - if (hasEventTime()) { - if (!getEventTime() - .equals(other.getEventTime())) return false; - } - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (severity_ != other.severity_) return false; - if (!getCanonicalName() - .equals(other.getCanonicalName())) return false; - if (mute_ != other.mute_) return false; - if (findingClass_ != other.findingClass_) return false; - if (hasIndicator() != other.hasIndicator()) return false; - if (hasIndicator()) { - if (!getIndicator() - .equals(other.getIndicator())) return false; - } - if (hasVulnerability() != other.hasVulnerability()) return false; - if (hasVulnerability()) { - if (!getVulnerability() - .equals(other.getVulnerability())) return false; - } - if (hasMuteUpdateTime() != other.hasMuteUpdateTime()) return false; - if (hasMuteUpdateTime()) { - if (!getMuteUpdateTime() - .equals(other.getMuteUpdateTime())) return false; - } - if (!internalGetExternalSystems().equals( - other.internalGetExternalSystems())) return false; - if (hasMitreAttack() != other.hasMitreAttack()) return false; - if (hasMitreAttack()) { - if (!getMitreAttack() - .equals(other.getMitreAttack())) return false; - } - if (hasAccess() != other.hasAccess()) return false; - if (hasAccess()) { - if (!getAccess() - .equals(other.getAccess())) return false; - } - if (!getConnectionsList() - .equals(other.getConnectionsList())) return false; - if (!getMuteInitiator() - .equals(other.getMuteInitiator())) return false; - if (!getProcessesList() - .equals(other.getProcessesList())) return false; - if (!internalGetContacts().equals( - other.internalGetContacts())) return false; - if (!getCompliancesList() - .equals(other.getCompliancesList())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (hasExfiltration() != other.hasExfiltration()) return false; - if (hasExfiltration()) { - if (!getExfiltration() - .equals(other.getExfiltration())) return false; - } - if (!getIamBindingsList() - .equals(other.getIamBindingsList())) return false; - if (!getNextSteps() - .equals(other.getNextSteps())) return false; - if (!getContainersList() - .equals(other.getContainersList())) return false; - if (hasKubernetes() != other.hasKubernetes()) return false; - if (hasKubernetes()) { - if (!getKubernetes() - .equals(other.getKubernetes())) return false; - } - if (hasDatabase() != other.hasDatabase()) return false; - if (hasDatabase()) { - if (!getDatabase() - .equals(other.getDatabase())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + RESOURCE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getResourceName().hashCode(); - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + CATEGORY_FIELD_NUMBER; - hash = (53 * hash) + getCategory().hashCode(); - hash = (37 * hash) + EXTERNAL_URI_FIELD_NUMBER; - hash = (53 * hash) + getExternalUri().hashCode(); - if (!internalGetSourceProperties().getMap().isEmpty()) { - hash = (37 * hash) + SOURCE_PROPERTIES_FIELD_NUMBER; - hash = (53 * hash) + internalGetSourceProperties().hashCode(); - } - if (hasSecurityMarks()) { - hash = (37 * hash) + SECURITY_MARKS_FIELD_NUMBER; - hash = (53 * hash) + getSecurityMarks().hashCode(); - } - if (hasEventTime()) { - hash = (37 * hash) + EVENT_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEventTime().hashCode(); - } - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - hash = (37 * hash) + SEVERITY_FIELD_NUMBER; - hash = (53 * hash) + severity_; - hash = (37 * hash) + CANONICAL_NAME_FIELD_NUMBER; - hash = (53 * hash) + getCanonicalName().hashCode(); - hash = (37 * hash) + MUTE_FIELD_NUMBER; - hash = (53 * hash) + mute_; - hash = (37 * hash) + FINDING_CLASS_FIELD_NUMBER; - hash = (53 * hash) + findingClass_; - if (hasIndicator()) { - hash = (37 * hash) + INDICATOR_FIELD_NUMBER; - hash = (53 * hash) + getIndicator().hashCode(); - } - if (hasVulnerability()) { - hash = (37 * hash) + VULNERABILITY_FIELD_NUMBER; - hash = (53 * hash) + getVulnerability().hashCode(); - } - if (hasMuteUpdateTime()) { - hash = (37 * hash) + MUTE_UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getMuteUpdateTime().hashCode(); - } - if (!internalGetExternalSystems().getMap().isEmpty()) { - hash = (37 * hash) + EXTERNAL_SYSTEMS_FIELD_NUMBER; - hash = (53 * hash) + internalGetExternalSystems().hashCode(); - } - if (hasMitreAttack()) { - hash = (37 * hash) + MITRE_ATTACK_FIELD_NUMBER; - hash = (53 * hash) + getMitreAttack().hashCode(); - } - if (hasAccess()) { - hash = (37 * hash) + ACCESS_FIELD_NUMBER; - hash = (53 * hash) + getAccess().hashCode(); - } - if (getConnectionsCount() > 0) { - hash = (37 * hash) + CONNECTIONS_FIELD_NUMBER; - hash = (53 * hash) + getConnectionsList().hashCode(); - } - hash = (37 * hash) + MUTE_INITIATOR_FIELD_NUMBER; - hash = (53 * hash) + getMuteInitiator().hashCode(); - if (getProcessesCount() > 0) { - hash = (37 * hash) + PROCESSES_FIELD_NUMBER; - hash = (53 * hash) + getProcessesList().hashCode(); - } - if (!internalGetContacts().getMap().isEmpty()) { - hash = (37 * hash) + CONTACTS_FIELD_NUMBER; - hash = (53 * hash) + internalGetContacts().hashCode(); - } - if (getCompliancesCount() > 0) { - hash = (37 * hash) + COMPLIANCES_FIELD_NUMBER; - hash = (53 * hash) + getCompliancesList().hashCode(); - } - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (hasExfiltration()) { - hash = (37 * hash) + EXFILTRATION_FIELD_NUMBER; - hash = (53 * hash) + getExfiltration().hashCode(); - } - if (getIamBindingsCount() > 0) { - hash = (37 * hash) + IAM_BINDINGS_FIELD_NUMBER; - hash = (53 * hash) + getIamBindingsList().hashCode(); - } - hash = (37 * hash) + NEXT_STEPS_FIELD_NUMBER; - hash = (53 * hash) + getNextSteps().hashCode(); - if (getContainersCount() > 0) { - hash = (37 * hash) + CONTAINERS_FIELD_NUMBER; - hash = (53 * hash) + getContainersList().hashCode(); - } - if (hasKubernetes()) { - hash = (37 * hash) + KUBERNETES_FIELD_NUMBER; - hash = (53 * hash) + getKubernetes().hashCode(); - } - if (hasDatabase()) { - hash = (37 * hash) + DATABASE_FIELD_NUMBER; - hash = (53 * hash) + getDatabase().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.Finding parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Finding parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Finding parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Finding parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Finding parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Finding parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Finding parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Finding parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Finding parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Finding parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Finding parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Finding parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.Finding prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Security Command Center finding.
-   * A finding is a record of assessment data like security, risk, health, or
-   * privacy, that is ingested into Security Command Center for presentation,
-   * notification, analysis, policy testing, and enforcement. For example, a
-   * cross-site scripting (XSS) vulnerability in an App Engine application is a
-   * finding.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Finding} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Finding) - com.google.cloud.securitycenter.v1.FindingOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.FindingOuterClass.internal_static_google_cloud_securitycenter_v1_Finding_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 7: - return internalGetSourceProperties(); - case 22: - return internalGetExternalSystems(); - case 33: - return internalGetContacts(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 7: - return internalGetMutableSourceProperties(); - case 22: - return internalGetMutableExternalSystems(); - case 33: - return internalGetMutableContacts(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.FindingOuterClass.internal_static_google_cloud_securitycenter_v1_Finding_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Finding.class, com.google.cloud.securitycenter.v1.Finding.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.Finding.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getConnectionsFieldBuilder(); - getProcessesFieldBuilder(); - getCompliancesFieldBuilder(); - getIamBindingsFieldBuilder(); - getContainersFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - parent_ = ""; - - resourceName_ = ""; - - state_ = 0; - - category_ = ""; - - externalUri_ = ""; - - internalGetMutableSourceProperties().clear(); - if (securityMarksBuilder_ == null) { - securityMarks_ = null; - } else { - securityMarks_ = null; - securityMarksBuilder_ = null; - } - if (eventTimeBuilder_ == null) { - eventTime_ = null; - } else { - eventTime_ = null; - eventTimeBuilder_ = null; - } - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - severity_ = 0; - - canonicalName_ = ""; - - mute_ = 0; - - findingClass_ = 0; - - if (indicatorBuilder_ == null) { - indicator_ = null; - } else { - indicator_ = null; - indicatorBuilder_ = null; - } - if (vulnerabilityBuilder_ == null) { - vulnerability_ = null; - } else { - vulnerability_ = null; - vulnerabilityBuilder_ = null; - } - if (muteUpdateTimeBuilder_ == null) { - muteUpdateTime_ = null; - } else { - muteUpdateTime_ = null; - muteUpdateTimeBuilder_ = null; - } - internalGetMutableExternalSystems().clear(); - if (mitreAttackBuilder_ == null) { - mitreAttack_ = null; - } else { - mitreAttack_ = null; - mitreAttackBuilder_ = null; - } - if (accessBuilder_ == null) { - access_ = null; - } else { - access_ = null; - accessBuilder_ = null; - } - if (connectionsBuilder_ == null) { - connections_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - connectionsBuilder_.clear(); - } - muteInitiator_ = ""; - - if (processesBuilder_ == null) { - processes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - } else { - processesBuilder_.clear(); - } - internalGetMutableContacts().clear(); - if (compliancesBuilder_ == null) { - compliances_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - } else { - compliancesBuilder_.clear(); - } - description_ = ""; - - if (exfiltrationBuilder_ == null) { - exfiltration_ = null; - } else { - exfiltration_ = null; - exfiltrationBuilder_ = null; - } - if (iamBindingsBuilder_ == null) { - iamBindings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - } else { - iamBindingsBuilder_.clear(); - } - nextSteps_ = ""; - - if (containersBuilder_ == null) { - containers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); - } else { - containersBuilder_.clear(); - } - if (kubernetesBuilder_ == null) { - kubernetes_ = null; - } else { - kubernetes_ = null; - kubernetesBuilder_ = null; - } - if (databaseBuilder_ == null) { - database_ = null; - } else { - database_ = null; - databaseBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.FindingOuterClass.internal_static_google_cloud_securitycenter_v1_Finding_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Finding getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.Finding.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Finding build() { - com.google.cloud.securitycenter.v1.Finding result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Finding buildPartial() { - com.google.cloud.securitycenter.v1.Finding result = new com.google.cloud.securitycenter.v1.Finding(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.parent_ = parent_; - result.resourceName_ = resourceName_; - result.state_ = state_; - result.category_ = category_; - result.externalUri_ = externalUri_; - result.sourceProperties_ = internalGetSourceProperties(); - result.sourceProperties_.makeImmutable(); - if (securityMarksBuilder_ == null) { - result.securityMarks_ = securityMarks_; - } else { - result.securityMarks_ = securityMarksBuilder_.build(); - } - if (eventTimeBuilder_ == null) { - result.eventTime_ = eventTime_; - } else { - result.eventTime_ = eventTimeBuilder_.build(); - } - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - result.severity_ = severity_; - result.canonicalName_ = canonicalName_; - result.mute_ = mute_; - result.findingClass_ = findingClass_; - if (indicatorBuilder_ == null) { - result.indicator_ = indicator_; - } else { - result.indicator_ = indicatorBuilder_.build(); - } - if (vulnerabilityBuilder_ == null) { - result.vulnerability_ = vulnerability_; - } else { - result.vulnerability_ = vulnerabilityBuilder_.build(); - } - if (muteUpdateTimeBuilder_ == null) { - result.muteUpdateTime_ = muteUpdateTime_; - } else { - result.muteUpdateTime_ = muteUpdateTimeBuilder_.build(); - } - result.externalSystems_ = internalGetExternalSystems(); - result.externalSystems_.makeImmutable(); - if (mitreAttackBuilder_ == null) { - result.mitreAttack_ = mitreAttack_; - } else { - result.mitreAttack_ = mitreAttackBuilder_.build(); - } - if (accessBuilder_ == null) { - result.access_ = access_; - } else { - result.access_ = accessBuilder_.build(); - } - if (connectionsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - connections_ = java.util.Collections.unmodifiableList(connections_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.connections_ = connections_; - } else { - result.connections_ = connectionsBuilder_.build(); - } - result.muteInitiator_ = muteInitiator_; - if (processesBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - processes_ = java.util.Collections.unmodifiableList(processes_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.processes_ = processes_; - } else { - result.processes_ = processesBuilder_.build(); - } - result.contacts_ = internalGetContacts(); - result.contacts_.makeImmutable(); - if (compliancesBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0)) { - compliances_ = java.util.Collections.unmodifiableList(compliances_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.compliances_ = compliances_; - } else { - result.compliances_ = compliancesBuilder_.build(); - } - result.description_ = description_; - if (exfiltrationBuilder_ == null) { - result.exfiltration_ = exfiltration_; - } else { - result.exfiltration_ = exfiltrationBuilder_.build(); - } - if (iamBindingsBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0)) { - iamBindings_ = java.util.Collections.unmodifiableList(iamBindings_); - bitField0_ = (bitField0_ & ~0x00000040); - } - result.iamBindings_ = iamBindings_; - } else { - result.iamBindings_ = iamBindingsBuilder_.build(); - } - result.nextSteps_ = nextSteps_; - if (containersBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0)) { - containers_ = java.util.Collections.unmodifiableList(containers_); - bitField0_ = (bitField0_ & ~0x00000080); - } - result.containers_ = containers_; - } else { - result.containers_ = containersBuilder_.build(); - } - if (kubernetesBuilder_ == null) { - result.kubernetes_ = kubernetes_; - } else { - result.kubernetes_ = kubernetesBuilder_.build(); - } - if (databaseBuilder_ == null) { - result.database_ = database_; - } else { - result.database_ = databaseBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.Finding) { - return mergeFrom((com.google.cloud.securitycenter.v1.Finding)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.Finding other) { - if (other == com.google.cloud.securitycenter.v1.Finding.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (!other.getResourceName().isEmpty()) { - resourceName_ = other.resourceName_; - onChanged(); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (!other.getCategory().isEmpty()) { - category_ = other.category_; - onChanged(); - } - if (!other.getExternalUri().isEmpty()) { - externalUri_ = other.externalUri_; - onChanged(); - } - internalGetMutableSourceProperties().mergeFrom( - other.internalGetSourceProperties()); - if (other.hasSecurityMarks()) { - mergeSecurityMarks(other.getSecurityMarks()); - } - if (other.hasEventTime()) { - mergeEventTime(other.getEventTime()); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.severity_ != 0) { - setSeverityValue(other.getSeverityValue()); - } - if (!other.getCanonicalName().isEmpty()) { - canonicalName_ = other.canonicalName_; - onChanged(); - } - if (other.mute_ != 0) { - setMuteValue(other.getMuteValue()); - } - if (other.findingClass_ != 0) { - setFindingClassValue(other.getFindingClassValue()); - } - if (other.hasIndicator()) { - mergeIndicator(other.getIndicator()); - } - if (other.hasVulnerability()) { - mergeVulnerability(other.getVulnerability()); - } - if (other.hasMuteUpdateTime()) { - mergeMuteUpdateTime(other.getMuteUpdateTime()); - } - internalGetMutableExternalSystems().mergeFrom( - other.internalGetExternalSystems()); - if (other.hasMitreAttack()) { - mergeMitreAttack(other.getMitreAttack()); - } - if (other.hasAccess()) { - mergeAccess(other.getAccess()); - } - if (connectionsBuilder_ == null) { - if (!other.connections_.isEmpty()) { - if (connections_.isEmpty()) { - connections_ = other.connections_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureConnectionsIsMutable(); - connections_.addAll(other.connections_); - } - onChanged(); - } - } else { - if (!other.connections_.isEmpty()) { - if (connectionsBuilder_.isEmpty()) { - connectionsBuilder_.dispose(); - connectionsBuilder_ = null; - connections_ = other.connections_; - bitField0_ = (bitField0_ & ~0x00000004); - connectionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getConnectionsFieldBuilder() : null; - } else { - connectionsBuilder_.addAllMessages(other.connections_); - } - } - } - if (!other.getMuteInitiator().isEmpty()) { - muteInitiator_ = other.muteInitiator_; - onChanged(); - } - if (processesBuilder_ == null) { - if (!other.processes_.isEmpty()) { - if (processes_.isEmpty()) { - processes_ = other.processes_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureProcessesIsMutable(); - processes_.addAll(other.processes_); - } - onChanged(); - } - } else { - if (!other.processes_.isEmpty()) { - if (processesBuilder_.isEmpty()) { - processesBuilder_.dispose(); - processesBuilder_ = null; - processes_ = other.processes_; - bitField0_ = (bitField0_ & ~0x00000008); - processesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getProcessesFieldBuilder() : null; - } else { - processesBuilder_.addAllMessages(other.processes_); - } - } - } - internalGetMutableContacts().mergeFrom( - other.internalGetContacts()); - if (compliancesBuilder_ == null) { - if (!other.compliances_.isEmpty()) { - if (compliances_.isEmpty()) { - compliances_ = other.compliances_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureCompliancesIsMutable(); - compliances_.addAll(other.compliances_); - } - onChanged(); - } - } else { - if (!other.compliances_.isEmpty()) { - if (compliancesBuilder_.isEmpty()) { - compliancesBuilder_.dispose(); - compliancesBuilder_ = null; - compliances_ = other.compliances_; - bitField0_ = (bitField0_ & ~0x00000020); - compliancesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getCompliancesFieldBuilder() : null; - } else { - compliancesBuilder_.addAllMessages(other.compliances_); - } - } - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.hasExfiltration()) { - mergeExfiltration(other.getExfiltration()); - } - if (iamBindingsBuilder_ == null) { - if (!other.iamBindings_.isEmpty()) { - if (iamBindings_.isEmpty()) { - iamBindings_ = other.iamBindings_; - bitField0_ = (bitField0_ & ~0x00000040); - } else { - ensureIamBindingsIsMutable(); - iamBindings_.addAll(other.iamBindings_); - } - onChanged(); - } - } else { - if (!other.iamBindings_.isEmpty()) { - if (iamBindingsBuilder_.isEmpty()) { - iamBindingsBuilder_.dispose(); - iamBindingsBuilder_ = null; - iamBindings_ = other.iamBindings_; - bitField0_ = (bitField0_ & ~0x00000040); - iamBindingsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getIamBindingsFieldBuilder() : null; - } else { - iamBindingsBuilder_.addAllMessages(other.iamBindings_); - } - } - } - if (!other.getNextSteps().isEmpty()) { - nextSteps_ = other.nextSteps_; - onChanged(); - } - if (containersBuilder_ == null) { - if (!other.containers_.isEmpty()) { - if (containers_.isEmpty()) { - containers_ = other.containers_; - bitField0_ = (bitField0_ & ~0x00000080); - } else { - ensureContainersIsMutable(); - containers_.addAll(other.containers_); - } - onChanged(); - } - } else { - if (!other.containers_.isEmpty()) { - if (containersBuilder_.isEmpty()) { - containersBuilder_.dispose(); - containersBuilder_ = null; - containers_ = other.containers_; - bitField0_ = (bitField0_ & ~0x00000080); - containersBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getContainersFieldBuilder() : null; - } else { - containersBuilder_.addAllMessages(other.containers_); - } - } - } - if (other.hasKubernetes()) { - mergeKubernetes(other.getKubernetes()); - } - if (other.hasDatabase()) { - mergeDatabase(other.getDatabase()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.Finding parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.Finding) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The relative resource name of this finding. See:
-     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
-     * Example:
-     * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}"
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The relative resource name of this finding. See:
-     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
-     * Example:
-     * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}"
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The relative resource name of this finding. See:
-     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
-     * Example:
-     * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}"
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * The relative resource name of this finding. See:
-     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
-     * Example:
-     * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}"
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * The relative resource name of this finding. See:
-     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
-     * Example:
-     * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}"
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * The relative resource name of the source the finding belongs to. See:
-     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
-     * This field is immutable after creation time.
-     * For example:
-     * "organizations/{organization_id}/sources/{source_id}"
-     * 
- * - * string parent = 2; - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The relative resource name of the source the finding belongs to. See:
-     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
-     * This field is immutable after creation time.
-     * For example:
-     * "organizations/{organization_id}/sources/{source_id}"
-     * 
- * - * string parent = 2; - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The relative resource name of the source the finding belongs to. See:
-     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
-     * This field is immutable after creation time.
-     * For example:
-     * "organizations/{organization_id}/sources/{source_id}"
-     * 
- * - * string parent = 2; - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * The relative resource name of the source the finding belongs to. See:
-     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
-     * This field is immutable after creation time.
-     * For example:
-     * "organizations/{organization_id}/sources/{source_id}"
-     * 
- * - * string parent = 2; - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * The relative resource name of the source the finding belongs to. See:
-     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
-     * This field is immutable after creation time.
-     * For example:
-     * "organizations/{organization_id}/sources/{source_id}"
-     * 
- * - * string parent = 2; - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private java.lang.Object resourceName_ = ""; - /** - *
-     * For findings on Google Cloud resources, the full resource
-     * name of the Google Cloud resource this finding is for. See:
-     * https://cloud.google.com/apis/design/resource_names#full_resource_name
-     * When the finding is for a non-Google Cloud resource, the resourceName can
-     * be a customer or partner defined string. This field is immutable after
-     * creation time.
-     * 
- * - * string resource_name = 3; - * @return The resourceName. - */ - public java.lang.String getResourceName() { - java.lang.Object ref = resourceName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * For findings on Google Cloud resources, the full resource
-     * name of the Google Cloud resource this finding is for. See:
-     * https://cloud.google.com/apis/design/resource_names#full_resource_name
-     * When the finding is for a non-Google Cloud resource, the resourceName can
-     * be a customer or partner defined string. This field is immutable after
-     * creation time.
-     * 
- * - * string resource_name = 3; - * @return The bytes for resourceName. - */ - public com.google.protobuf.ByteString - getResourceNameBytes() { - java.lang.Object ref = resourceName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * For findings on Google Cloud resources, the full resource
-     * name of the Google Cloud resource this finding is for. See:
-     * https://cloud.google.com/apis/design/resource_names#full_resource_name
-     * When the finding is for a non-Google Cloud resource, the resourceName can
-     * be a customer or partner defined string. This field is immutable after
-     * creation time.
-     * 
- * - * string resource_name = 3; - * @param value The resourceName to set. - * @return This builder for chaining. - */ - public Builder setResourceName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceName_ = value; - onChanged(); - return this; - } - /** - *
-     * For findings on Google Cloud resources, the full resource
-     * name of the Google Cloud resource this finding is for. See:
-     * https://cloud.google.com/apis/design/resource_names#full_resource_name
-     * When the finding is for a non-Google Cloud resource, the resourceName can
-     * be a customer or partner defined string. This field is immutable after
-     * creation time.
-     * 
- * - * string resource_name = 3; - * @return This builder for chaining. - */ - public Builder clearResourceName() { - - resourceName_ = getDefaultInstance().getResourceName(); - onChanged(); - return this; - } - /** - *
-     * For findings on Google Cloud resources, the full resource
-     * name of the Google Cloud resource this finding is for. See:
-     * https://cloud.google.com/apis/design/resource_names#full_resource_name
-     * When the finding is for a non-Google Cloud resource, the resourceName can
-     * be a customer or partner defined string. This field is immutable after
-     * creation time.
-     * 
- * - * string resource_name = 3; - * @param value The bytes for resourceName to set. - * @return This builder for chaining. - */ - public Builder setResourceNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resourceName_ = value; - onChanged(); - return this; - } - - private int state_ = 0; - /** - *
-     * The state of the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Finding.State state = 4; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-     * The state of the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Finding.State state = 4; - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - - state_ = value; - onChanged(); - return this; - } - /** - *
-     * The state of the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Finding.State state = 4; - * @return The state. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Finding.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.Finding.State result = com.google.cloud.securitycenter.v1.Finding.State.valueOf(state_); - return result == null ? com.google.cloud.securitycenter.v1.Finding.State.UNRECOGNIZED : result; - } - /** - *
-     * The state of the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Finding.State state = 4; - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.securitycenter.v1.Finding.State value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The state of the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Finding.State state = 4; - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = 0; - onChanged(); - return this; - } - - private java.lang.Object category_ = ""; - /** - *
-     * The additional taxonomy group within findings from a given source.
-     * This field is immutable after creation time.
-     * Example: "XSS_FLASH_INJECTION"
-     * 
- * - * string category = 5; - * @return The category. - */ - public java.lang.String getCategory() { - java.lang.Object ref = category_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - category_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The additional taxonomy group within findings from a given source.
-     * This field is immutable after creation time.
-     * Example: "XSS_FLASH_INJECTION"
-     * 
- * - * string category = 5; - * @return The bytes for category. - */ - public com.google.protobuf.ByteString - getCategoryBytes() { - java.lang.Object ref = category_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - category_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The additional taxonomy group within findings from a given source.
-     * This field is immutable after creation time.
-     * Example: "XSS_FLASH_INJECTION"
-     * 
- * - * string category = 5; - * @param value The category to set. - * @return This builder for chaining. - */ - public Builder setCategory( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - category_ = value; - onChanged(); - return this; - } - /** - *
-     * The additional taxonomy group within findings from a given source.
-     * This field is immutable after creation time.
-     * Example: "XSS_FLASH_INJECTION"
-     * 
- * - * string category = 5; - * @return This builder for chaining. - */ - public Builder clearCategory() { - - category_ = getDefaultInstance().getCategory(); - onChanged(); - return this; - } - /** - *
-     * The additional taxonomy group within findings from a given source.
-     * This field is immutable after creation time.
-     * Example: "XSS_FLASH_INJECTION"
-     * 
- * - * string category = 5; - * @param value The bytes for category to set. - * @return This builder for chaining. - */ - public Builder setCategoryBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - category_ = value; - onChanged(); - return this; - } - - private java.lang.Object externalUri_ = ""; - /** - *
-     * The URI that, if available, points to a web page outside of Security
-     * Command Center where additional information about the finding can be found.
-     * This field is guaranteed to be either empty or a well formed URL.
-     * 
- * - * string external_uri = 6; - * @return The externalUri. - */ - public java.lang.String getExternalUri() { - java.lang.Object ref = externalUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - externalUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The URI that, if available, points to a web page outside of Security
-     * Command Center where additional information about the finding can be found.
-     * This field is guaranteed to be either empty or a well formed URL.
-     * 
- * - * string external_uri = 6; - * @return The bytes for externalUri. - */ - public com.google.protobuf.ByteString - getExternalUriBytes() { - java.lang.Object ref = externalUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - externalUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The URI that, if available, points to a web page outside of Security
-     * Command Center where additional information about the finding can be found.
-     * This field is guaranteed to be either empty or a well formed URL.
-     * 
- * - * string external_uri = 6; - * @param value The externalUri to set. - * @return This builder for chaining. - */ - public Builder setExternalUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - externalUri_ = value; - onChanged(); - return this; - } - /** - *
-     * The URI that, if available, points to a web page outside of Security
-     * Command Center where additional information about the finding can be found.
-     * This field is guaranteed to be either empty or a well formed URL.
-     * 
- * - * string external_uri = 6; - * @return This builder for chaining. - */ - public Builder clearExternalUri() { - - externalUri_ = getDefaultInstance().getExternalUri(); - onChanged(); - return this; - } - /** - *
-     * The URI that, if available, points to a web page outside of Security
-     * Command Center where additional information about the finding can be found.
-     * This field is guaranteed to be either empty or a well formed URL.
-     * 
- * - * string external_uri = 6; - * @param value The bytes for externalUri to set. - * @return This builder for chaining. - */ - public Builder setExternalUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - externalUri_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, com.google.protobuf.Value> sourceProperties_; - private com.google.protobuf.MapField - internalGetSourceProperties() { - if (sourceProperties_ == null) { - return com.google.protobuf.MapField.emptyMapField( - SourcePropertiesDefaultEntryHolder.defaultEntry); - } - return sourceProperties_; - } - private com.google.protobuf.MapField - internalGetMutableSourceProperties() { - onChanged();; - if (sourceProperties_ == null) { - sourceProperties_ = com.google.protobuf.MapField.newMapField( - SourcePropertiesDefaultEntryHolder.defaultEntry); - } - if (!sourceProperties_.isMutable()) { - sourceProperties_ = sourceProperties_.copy(); - } - return sourceProperties_; - } - - public int getSourcePropertiesCount() { - return internalGetSourceProperties().getMap().size(); - } - /** - *
-     * Source specific properties. These properties are managed by the source
-     * that writes the finding. The key names in the source_properties map must be
-     * between 1 and 255 characters, and must start with a letter and contain
-     * alphanumeric characters or underscores only.
-     * 
- * - * map<string, .google.protobuf.Value> source_properties = 7; - */ - - @java.lang.Override - public boolean containsSourceProperties( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetSourceProperties().getMap().containsKey(key); - } - /** - * Use {@link #getSourcePropertiesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getSourceProperties() { - return getSourcePropertiesMap(); - } - /** - *
-     * Source specific properties. These properties are managed by the source
-     * that writes the finding. The key names in the source_properties map must be
-     * between 1 and 255 characters, and must start with a letter and contain
-     * alphanumeric characters or underscores only.
-     * 
- * - * map<string, .google.protobuf.Value> source_properties = 7; - */ - @java.lang.Override - - public java.util.Map getSourcePropertiesMap() { - return internalGetSourceProperties().getMap(); - } - /** - *
-     * Source specific properties. These properties are managed by the source
-     * that writes the finding. The key names in the source_properties map must be
-     * between 1 and 255 characters, and must start with a letter and contain
-     * alphanumeric characters or underscores only.
-     * 
- * - * map<string, .google.protobuf.Value> source_properties = 7; - */ - @java.lang.Override - - public com.google.protobuf.Value getSourcePropertiesOrDefault( - java.lang.String key, - com.google.protobuf.Value defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetSourceProperties().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * Source specific properties. These properties are managed by the source
-     * that writes the finding. The key names in the source_properties map must be
-     * between 1 and 255 characters, and must start with a letter and contain
-     * alphanumeric characters or underscores only.
-     * 
- * - * map<string, .google.protobuf.Value> source_properties = 7; - */ - @java.lang.Override - - public com.google.protobuf.Value getSourcePropertiesOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetSourceProperties().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearSourceProperties() { - internalGetMutableSourceProperties().getMutableMap() - .clear(); - return this; - } - /** - *
-     * Source specific properties. These properties are managed by the source
-     * that writes the finding. The key names in the source_properties map must be
-     * between 1 and 255 characters, and must start with a letter and contain
-     * alphanumeric characters or underscores only.
-     * 
- * - * map<string, .google.protobuf.Value> source_properties = 7; - */ - - public Builder removeSourceProperties( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableSourceProperties().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableSourceProperties() { - return internalGetMutableSourceProperties().getMutableMap(); - } - /** - *
-     * Source specific properties. These properties are managed by the source
-     * that writes the finding. The key names in the source_properties map must be
-     * between 1 and 255 characters, and must start with a letter and contain
-     * alphanumeric characters or underscores only.
-     * 
- * - * map<string, .google.protobuf.Value> source_properties = 7; - */ - public Builder putSourceProperties( - java.lang.String key, - com.google.protobuf.Value value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { - throw new NullPointerException("map value"); -} - - internalGetMutableSourceProperties().getMutableMap() - .put(key, value); - return this; - } - /** - *
-     * Source specific properties. These properties are managed by the source
-     * that writes the finding. The key names in the source_properties map must be
-     * between 1 and 255 characters, and must start with a letter and contain
-     * alphanumeric characters or underscores only.
-     * 
- * - * map<string, .google.protobuf.Value> source_properties = 7; - */ - - public Builder putAllSourceProperties( - java.util.Map values) { - internalGetMutableSourceProperties().getMutableMap() - .putAll(values); - return this; - } - - private com.google.cloud.securitycenter.v1.SecurityMarks securityMarks_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.SecurityMarks, com.google.cloud.securitycenter.v1.SecurityMarks.Builder, com.google.cloud.securitycenter.v1.SecurityMarksOrBuilder> securityMarksBuilder_; - /** - *
-     * Output only. User specified security marks. These marks are entirely
-     * managed by the user and come from the SecurityMarks resource that belongs
-     * to the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the securityMarks field is set. - */ - public boolean hasSecurityMarks() { - return securityMarksBuilder_ != null || securityMarks_ != null; - } - /** - *
-     * Output only. User specified security marks. These marks are entirely
-     * managed by the user and come from the SecurityMarks resource that belongs
-     * to the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The securityMarks. - */ - public com.google.cloud.securitycenter.v1.SecurityMarks getSecurityMarks() { - if (securityMarksBuilder_ == null) { - return securityMarks_ == null ? com.google.cloud.securitycenter.v1.SecurityMarks.getDefaultInstance() : securityMarks_; - } else { - return securityMarksBuilder_.getMessage(); - } - } - /** - *
-     * Output only. User specified security marks. These marks are entirely
-     * managed by the user and come from the SecurityMarks resource that belongs
-     * to the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setSecurityMarks(com.google.cloud.securitycenter.v1.SecurityMarks value) { - if (securityMarksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - securityMarks_ = value; - onChanged(); - } else { - securityMarksBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. User specified security marks. These marks are entirely
-     * managed by the user and come from the SecurityMarks resource that belongs
-     * to the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setSecurityMarks( - com.google.cloud.securitycenter.v1.SecurityMarks.Builder builderForValue) { - if (securityMarksBuilder_ == null) { - securityMarks_ = builderForValue.build(); - onChanged(); - } else { - securityMarksBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. User specified security marks. These marks are entirely
-     * managed by the user and come from the SecurityMarks resource that belongs
-     * to the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeSecurityMarks(com.google.cloud.securitycenter.v1.SecurityMarks value) { - if (securityMarksBuilder_ == null) { - if (securityMarks_ != null) { - securityMarks_ = - com.google.cloud.securitycenter.v1.SecurityMarks.newBuilder(securityMarks_).mergeFrom(value).buildPartial(); - } else { - securityMarks_ = value; - } - onChanged(); - } else { - securityMarksBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. User specified security marks. These marks are entirely
-     * managed by the user and come from the SecurityMarks resource that belongs
-     * to the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearSecurityMarks() { - if (securityMarksBuilder_ == null) { - securityMarks_ = null; - onChanged(); - } else { - securityMarks_ = null; - securityMarksBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. User specified security marks. These marks are entirely
-     * managed by the user and come from the SecurityMarks resource that belongs
-     * to the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.cloud.securitycenter.v1.SecurityMarks.Builder getSecurityMarksBuilder() { - - onChanged(); - return getSecurityMarksFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. User specified security marks. These marks are entirely
-     * managed by the user and come from the SecurityMarks resource that belongs
-     * to the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.cloud.securitycenter.v1.SecurityMarksOrBuilder getSecurityMarksOrBuilder() { - if (securityMarksBuilder_ != null) { - return securityMarksBuilder_.getMessageOrBuilder(); - } else { - return securityMarks_ == null ? - com.google.cloud.securitycenter.v1.SecurityMarks.getDefaultInstance() : securityMarks_; - } - } - /** - *
-     * Output only. User specified security marks. These marks are entirely
-     * managed by the user and come from the SecurityMarks resource that belongs
-     * to the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.SecurityMarks, com.google.cloud.securitycenter.v1.SecurityMarks.Builder, com.google.cloud.securitycenter.v1.SecurityMarksOrBuilder> - getSecurityMarksFieldBuilder() { - if (securityMarksBuilder_ == null) { - securityMarksBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.SecurityMarks, com.google.cloud.securitycenter.v1.SecurityMarks.Builder, com.google.cloud.securitycenter.v1.SecurityMarksOrBuilder>( - getSecurityMarks(), - getParentForChildren(), - isClean()); - securityMarks_ = null; - } - return securityMarksBuilder_; - } - - private com.google.protobuf.Timestamp eventTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> eventTimeBuilder_; - /** - *
-     * The time the finding was first detected. If an existing finding is updated,
-     * then this is the time the update occurred.
-     * For example, if the finding represents an open firewall, this property
-     * captures the time the detector believes the firewall became open. The
-     * accuracy is determined by the detector. If the finding is later resolved,
-     * then this time reflects when the finding was resolved. This must not
-     * be set to a value greater than the current timestamp.
-     * 
- * - * .google.protobuf.Timestamp event_time = 9; - * @return Whether the eventTime field is set. - */ - public boolean hasEventTime() { - return eventTimeBuilder_ != null || eventTime_ != null; - } - /** - *
-     * The time the finding was first detected. If an existing finding is updated,
-     * then this is the time the update occurred.
-     * For example, if the finding represents an open firewall, this property
-     * captures the time the detector believes the firewall became open. The
-     * accuracy is determined by the detector. If the finding is later resolved,
-     * then this time reflects when the finding was resolved. This must not
-     * be set to a value greater than the current timestamp.
-     * 
- * - * .google.protobuf.Timestamp event_time = 9; - * @return The eventTime. - */ - public com.google.protobuf.Timestamp getEventTime() { - if (eventTimeBuilder_ == null) { - return eventTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : eventTime_; - } else { - return eventTimeBuilder_.getMessage(); - } - } - /** - *
-     * The time the finding was first detected. If an existing finding is updated,
-     * then this is the time the update occurred.
-     * For example, if the finding represents an open firewall, this property
-     * captures the time the detector believes the firewall became open. The
-     * accuracy is determined by the detector. If the finding is later resolved,
-     * then this time reflects when the finding was resolved. This must not
-     * be set to a value greater than the current timestamp.
-     * 
- * - * .google.protobuf.Timestamp event_time = 9; - */ - public Builder setEventTime(com.google.protobuf.Timestamp value) { - if (eventTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - eventTime_ = value; - onChanged(); - } else { - eventTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The time the finding was first detected. If an existing finding is updated,
-     * then this is the time the update occurred.
-     * For example, if the finding represents an open firewall, this property
-     * captures the time the detector believes the firewall became open. The
-     * accuracy is determined by the detector. If the finding is later resolved,
-     * then this time reflects when the finding was resolved. This must not
-     * be set to a value greater than the current timestamp.
-     * 
- * - * .google.protobuf.Timestamp event_time = 9; - */ - public Builder setEventTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (eventTimeBuilder_ == null) { - eventTime_ = builderForValue.build(); - onChanged(); - } else { - eventTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The time the finding was first detected. If an existing finding is updated,
-     * then this is the time the update occurred.
-     * For example, if the finding represents an open firewall, this property
-     * captures the time the detector believes the firewall became open. The
-     * accuracy is determined by the detector. If the finding is later resolved,
-     * then this time reflects when the finding was resolved. This must not
-     * be set to a value greater than the current timestamp.
-     * 
- * - * .google.protobuf.Timestamp event_time = 9; - */ - public Builder mergeEventTime(com.google.protobuf.Timestamp value) { - if (eventTimeBuilder_ == null) { - if (eventTime_ != null) { - eventTime_ = - com.google.protobuf.Timestamp.newBuilder(eventTime_).mergeFrom(value).buildPartial(); - } else { - eventTime_ = value; - } - onChanged(); - } else { - eventTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The time the finding was first detected. If an existing finding is updated,
-     * then this is the time the update occurred.
-     * For example, if the finding represents an open firewall, this property
-     * captures the time the detector believes the firewall became open. The
-     * accuracy is determined by the detector. If the finding is later resolved,
-     * then this time reflects when the finding was resolved. This must not
-     * be set to a value greater than the current timestamp.
-     * 
- * - * .google.protobuf.Timestamp event_time = 9; - */ - public Builder clearEventTime() { - if (eventTimeBuilder_ == null) { - eventTime_ = null; - onChanged(); - } else { - eventTime_ = null; - eventTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * The time the finding was first detected. If an existing finding is updated,
-     * then this is the time the update occurred.
-     * For example, if the finding represents an open firewall, this property
-     * captures the time the detector believes the firewall became open. The
-     * accuracy is determined by the detector. If the finding is later resolved,
-     * then this time reflects when the finding was resolved. This must not
-     * be set to a value greater than the current timestamp.
-     * 
- * - * .google.protobuf.Timestamp event_time = 9; - */ - public com.google.protobuf.Timestamp.Builder getEventTimeBuilder() { - - onChanged(); - return getEventTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The time the finding was first detected. If an existing finding is updated,
-     * then this is the time the update occurred.
-     * For example, if the finding represents an open firewall, this property
-     * captures the time the detector believes the firewall became open. The
-     * accuracy is determined by the detector. If the finding is later resolved,
-     * then this time reflects when the finding was resolved. This must not
-     * be set to a value greater than the current timestamp.
-     * 
- * - * .google.protobuf.Timestamp event_time = 9; - */ - public com.google.protobuf.TimestampOrBuilder getEventTimeOrBuilder() { - if (eventTimeBuilder_ != null) { - return eventTimeBuilder_.getMessageOrBuilder(); - } else { - return eventTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : eventTime_; - } - } - /** - *
-     * The time the finding was first detected. If an existing finding is updated,
-     * then this is the time the update occurred.
-     * For example, if the finding represents an open firewall, this property
-     * captures the time the detector believes the firewall became open. The
-     * accuracy is determined by the detector. If the finding is later resolved,
-     * then this time reflects when the finding was resolved. This must not
-     * be set to a value greater than the current timestamp.
-     * 
- * - * .google.protobuf.Timestamp event_time = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getEventTimeFieldBuilder() { - if (eventTimeBuilder_ == null) { - eventTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getEventTime(), - getParentForChildren(), - isClean()); - eventTime_ = null; - } - return eventTimeBuilder_; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; - /** - *
-     * The time at which the finding was created in Security Command Center.
-     * 
- * - * .google.protobuf.Timestamp create_time = 10; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * The time at which the finding was created in Security Command Center.
-     * 
- * - * .google.protobuf.Timestamp create_time = 10; - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - *
-     * The time at which the finding was created in Security Command Center.
-     * 
- * - * .google.protobuf.Timestamp create_time = 10; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The time at which the finding was created in Security Command Center.
-     * 
- * - * .google.protobuf.Timestamp create_time = 10; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The time at which the finding was created in Security Command Center.
-     * 
- * - * .google.protobuf.Timestamp create_time = 10; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The time at which the finding was created in Security Command Center.
-     * 
- * - * .google.protobuf.Timestamp create_time = 10; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * The time at which the finding was created in Security Command Center.
-     * 
- * - * .google.protobuf.Timestamp create_time = 10; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The time at which the finding was created in Security Command Center.
-     * 
- * - * .google.protobuf.Timestamp create_time = 10; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * The time at which the finding was created in Security Command Center.
-     * 
- * - * .google.protobuf.Timestamp create_time = 10; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), - getParentForChildren(), - isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private int severity_ = 0; - /** - *
-     * The severity of the finding. This field is managed by the source that
-     * writes the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Finding.Severity severity = 12; - * @return The enum numeric value on the wire for severity. - */ - @java.lang.Override public int getSeverityValue() { - return severity_; - } - /** - *
-     * The severity of the finding. This field is managed by the source that
-     * writes the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Finding.Severity severity = 12; - * @param value The enum numeric value on the wire for severity to set. - * @return This builder for chaining. - */ - public Builder setSeverityValue(int value) { - - severity_ = value; - onChanged(); - return this; - } - /** - *
-     * The severity of the finding. This field is managed by the source that
-     * writes the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Finding.Severity severity = 12; - * @return The severity. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Finding.Severity getSeverity() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.Finding.Severity result = com.google.cloud.securitycenter.v1.Finding.Severity.valueOf(severity_); - return result == null ? com.google.cloud.securitycenter.v1.Finding.Severity.UNRECOGNIZED : result; - } - /** - *
-     * The severity of the finding. This field is managed by the source that
-     * writes the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Finding.Severity severity = 12; - * @param value The severity to set. - * @return This builder for chaining. - */ - public Builder setSeverity(com.google.cloud.securitycenter.v1.Finding.Severity value) { - if (value == null) { - throw new NullPointerException(); - } - - severity_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The severity of the finding. This field is managed by the source that
-     * writes the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Finding.Severity severity = 12; - * @return This builder for chaining. - */ - public Builder clearSeverity() { - - severity_ = 0; - onChanged(); - return this; - } - - private java.lang.Object canonicalName_ = ""; - /** - *
-     * The canonical name of the finding. It's either
-     * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}",
-     * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}" or
-     * "projects/{project_number}/sources/{source_id}/findings/{finding_id}",
-     * depending on the closest CRM ancestor of the resource associated with the
-     * finding.
-     * 
- * - * string canonical_name = 14; - * @return The canonicalName. - */ - public java.lang.String getCanonicalName() { - java.lang.Object ref = canonicalName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - canonicalName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The canonical name of the finding. It's either
-     * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}",
-     * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}" or
-     * "projects/{project_number}/sources/{source_id}/findings/{finding_id}",
-     * depending on the closest CRM ancestor of the resource associated with the
-     * finding.
-     * 
- * - * string canonical_name = 14; - * @return The bytes for canonicalName. - */ - public com.google.protobuf.ByteString - getCanonicalNameBytes() { - java.lang.Object ref = canonicalName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - canonicalName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The canonical name of the finding. It's either
-     * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}",
-     * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}" or
-     * "projects/{project_number}/sources/{source_id}/findings/{finding_id}",
-     * depending on the closest CRM ancestor of the resource associated with the
-     * finding.
-     * 
- * - * string canonical_name = 14; - * @param value The canonicalName to set. - * @return This builder for chaining. - */ - public Builder setCanonicalName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - canonicalName_ = value; - onChanged(); - return this; - } - /** - *
-     * The canonical name of the finding. It's either
-     * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}",
-     * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}" or
-     * "projects/{project_number}/sources/{source_id}/findings/{finding_id}",
-     * depending on the closest CRM ancestor of the resource associated with the
-     * finding.
-     * 
- * - * string canonical_name = 14; - * @return This builder for chaining. - */ - public Builder clearCanonicalName() { - - canonicalName_ = getDefaultInstance().getCanonicalName(); - onChanged(); - return this; - } - /** - *
-     * The canonical name of the finding. It's either
-     * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}",
-     * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}" or
-     * "projects/{project_number}/sources/{source_id}/findings/{finding_id}",
-     * depending on the closest CRM ancestor of the resource associated with the
-     * finding.
-     * 
- * - * string canonical_name = 14; - * @param value The bytes for canonicalName to set. - * @return This builder for chaining. - */ - public Builder setCanonicalNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - canonicalName_ = value; - onChanged(); - return this; - } - - private int mute_ = 0; - /** - *
-     * Indicates the mute state of a finding (either muted, unmuted
-     * or undefined). Unlike other attributes of a finding, a finding provider
-     * shouldn't set the value of mute.
-     * 
- * - * .google.cloud.securitycenter.v1.Finding.Mute mute = 15; - * @return The enum numeric value on the wire for mute. - */ - @java.lang.Override public int getMuteValue() { - return mute_; - } - /** - *
-     * Indicates the mute state of a finding (either muted, unmuted
-     * or undefined). Unlike other attributes of a finding, a finding provider
-     * shouldn't set the value of mute.
-     * 
- * - * .google.cloud.securitycenter.v1.Finding.Mute mute = 15; - * @param value The enum numeric value on the wire for mute to set. - * @return This builder for chaining. - */ - public Builder setMuteValue(int value) { - - mute_ = value; - onChanged(); - return this; - } - /** - *
-     * Indicates the mute state of a finding (either muted, unmuted
-     * or undefined). Unlike other attributes of a finding, a finding provider
-     * shouldn't set the value of mute.
-     * 
- * - * .google.cloud.securitycenter.v1.Finding.Mute mute = 15; - * @return The mute. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Finding.Mute getMute() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.Finding.Mute result = com.google.cloud.securitycenter.v1.Finding.Mute.valueOf(mute_); - return result == null ? com.google.cloud.securitycenter.v1.Finding.Mute.UNRECOGNIZED : result; - } - /** - *
-     * Indicates the mute state of a finding (either muted, unmuted
-     * or undefined). Unlike other attributes of a finding, a finding provider
-     * shouldn't set the value of mute.
-     * 
- * - * .google.cloud.securitycenter.v1.Finding.Mute mute = 15; - * @param value The mute to set. - * @return This builder for chaining. - */ - public Builder setMute(com.google.cloud.securitycenter.v1.Finding.Mute value) { - if (value == null) { - throw new NullPointerException(); - } - - mute_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Indicates the mute state of a finding (either muted, unmuted
-     * or undefined). Unlike other attributes of a finding, a finding provider
-     * shouldn't set the value of mute.
-     * 
- * - * .google.cloud.securitycenter.v1.Finding.Mute mute = 15; - * @return This builder for chaining. - */ - public Builder clearMute() { - - mute_ = 0; - onChanged(); - return this; - } - - private int findingClass_ = 0; - /** - *
-     * The class of the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Finding.FindingClass finding_class = 17; - * @return The enum numeric value on the wire for findingClass. - */ - @java.lang.Override public int getFindingClassValue() { - return findingClass_; - } - /** - *
-     * The class of the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Finding.FindingClass finding_class = 17; - * @param value The enum numeric value on the wire for findingClass to set. - * @return This builder for chaining. - */ - public Builder setFindingClassValue(int value) { - - findingClass_ = value; - onChanged(); - return this; - } - /** - *
-     * The class of the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Finding.FindingClass finding_class = 17; - * @return The findingClass. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Finding.FindingClass getFindingClass() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.Finding.FindingClass result = com.google.cloud.securitycenter.v1.Finding.FindingClass.valueOf(findingClass_); - return result == null ? com.google.cloud.securitycenter.v1.Finding.FindingClass.UNRECOGNIZED : result; - } - /** - *
-     * The class of the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Finding.FindingClass finding_class = 17; - * @param value The findingClass to set. - * @return This builder for chaining. - */ - public Builder setFindingClass(com.google.cloud.securitycenter.v1.Finding.FindingClass value) { - if (value == null) { - throw new NullPointerException(); - } - - findingClass_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The class of the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Finding.FindingClass finding_class = 17; - * @return This builder for chaining. - */ - public Builder clearFindingClass() { - - findingClass_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.securitycenter.v1.Indicator indicator_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Indicator, com.google.cloud.securitycenter.v1.Indicator.Builder, com.google.cloud.securitycenter.v1.IndicatorOrBuilder> indicatorBuilder_; - /** - *
-     * Represents what's commonly known as an Indicator of compromise (IoC) in
-     * computer forensics. This is an artifact observed on a network or in an
-     * operating system that, with high confidence, indicates a computer
-     * intrusion.
-     * Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise
-     * 
- * - * .google.cloud.securitycenter.v1.Indicator indicator = 18; - * @return Whether the indicator field is set. - */ - public boolean hasIndicator() { - return indicatorBuilder_ != null || indicator_ != null; - } - /** - *
-     * Represents what's commonly known as an Indicator of compromise (IoC) in
-     * computer forensics. This is an artifact observed on a network or in an
-     * operating system that, with high confidence, indicates a computer
-     * intrusion.
-     * Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise
-     * 
- * - * .google.cloud.securitycenter.v1.Indicator indicator = 18; - * @return The indicator. - */ - public com.google.cloud.securitycenter.v1.Indicator getIndicator() { - if (indicatorBuilder_ == null) { - return indicator_ == null ? com.google.cloud.securitycenter.v1.Indicator.getDefaultInstance() : indicator_; - } else { - return indicatorBuilder_.getMessage(); - } - } - /** - *
-     * Represents what's commonly known as an Indicator of compromise (IoC) in
-     * computer forensics. This is an artifact observed on a network or in an
-     * operating system that, with high confidence, indicates a computer
-     * intrusion.
-     * Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise
-     * 
- * - * .google.cloud.securitycenter.v1.Indicator indicator = 18; - */ - public Builder setIndicator(com.google.cloud.securitycenter.v1.Indicator value) { - if (indicatorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - indicator_ = value; - onChanged(); - } else { - indicatorBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Represents what's commonly known as an Indicator of compromise (IoC) in
-     * computer forensics. This is an artifact observed on a network or in an
-     * operating system that, with high confidence, indicates a computer
-     * intrusion.
-     * Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise
-     * 
- * - * .google.cloud.securitycenter.v1.Indicator indicator = 18; - */ - public Builder setIndicator( - com.google.cloud.securitycenter.v1.Indicator.Builder builderForValue) { - if (indicatorBuilder_ == null) { - indicator_ = builderForValue.build(); - onChanged(); - } else { - indicatorBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Represents what's commonly known as an Indicator of compromise (IoC) in
-     * computer forensics. This is an artifact observed on a network or in an
-     * operating system that, with high confidence, indicates a computer
-     * intrusion.
-     * Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise
-     * 
- * - * .google.cloud.securitycenter.v1.Indicator indicator = 18; - */ - public Builder mergeIndicator(com.google.cloud.securitycenter.v1.Indicator value) { - if (indicatorBuilder_ == null) { - if (indicator_ != null) { - indicator_ = - com.google.cloud.securitycenter.v1.Indicator.newBuilder(indicator_).mergeFrom(value).buildPartial(); - } else { - indicator_ = value; - } - onChanged(); - } else { - indicatorBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Represents what's commonly known as an Indicator of compromise (IoC) in
-     * computer forensics. This is an artifact observed on a network or in an
-     * operating system that, with high confidence, indicates a computer
-     * intrusion.
-     * Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise
-     * 
- * - * .google.cloud.securitycenter.v1.Indicator indicator = 18; - */ - public Builder clearIndicator() { - if (indicatorBuilder_ == null) { - indicator_ = null; - onChanged(); - } else { - indicator_ = null; - indicatorBuilder_ = null; - } - - return this; - } - /** - *
-     * Represents what's commonly known as an Indicator of compromise (IoC) in
-     * computer forensics. This is an artifact observed on a network or in an
-     * operating system that, with high confidence, indicates a computer
-     * intrusion.
-     * Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise
-     * 
- * - * .google.cloud.securitycenter.v1.Indicator indicator = 18; - */ - public com.google.cloud.securitycenter.v1.Indicator.Builder getIndicatorBuilder() { - - onChanged(); - return getIndicatorFieldBuilder().getBuilder(); - } - /** - *
-     * Represents what's commonly known as an Indicator of compromise (IoC) in
-     * computer forensics. This is an artifact observed on a network or in an
-     * operating system that, with high confidence, indicates a computer
-     * intrusion.
-     * Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise
-     * 
- * - * .google.cloud.securitycenter.v1.Indicator indicator = 18; - */ - public com.google.cloud.securitycenter.v1.IndicatorOrBuilder getIndicatorOrBuilder() { - if (indicatorBuilder_ != null) { - return indicatorBuilder_.getMessageOrBuilder(); - } else { - return indicator_ == null ? - com.google.cloud.securitycenter.v1.Indicator.getDefaultInstance() : indicator_; - } - } - /** - *
-     * Represents what's commonly known as an Indicator of compromise (IoC) in
-     * computer forensics. This is an artifact observed on a network or in an
-     * operating system that, with high confidence, indicates a computer
-     * intrusion.
-     * Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise
-     * 
- * - * .google.cloud.securitycenter.v1.Indicator indicator = 18; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Indicator, com.google.cloud.securitycenter.v1.Indicator.Builder, com.google.cloud.securitycenter.v1.IndicatorOrBuilder> - getIndicatorFieldBuilder() { - if (indicatorBuilder_ == null) { - indicatorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Indicator, com.google.cloud.securitycenter.v1.Indicator.Builder, com.google.cloud.securitycenter.v1.IndicatorOrBuilder>( - getIndicator(), - getParentForChildren(), - isClean()); - indicator_ = null; - } - return indicatorBuilder_; - } - - private com.google.cloud.securitycenter.v1.Vulnerability vulnerability_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Vulnerability, com.google.cloud.securitycenter.v1.Vulnerability.Builder, com.google.cloud.securitycenter.v1.VulnerabilityOrBuilder> vulnerabilityBuilder_; - /** - *
-     * Represents vulnerability specific fields like cve, cvss scores etc.
-     * CVE stands for Common Vulnerabilities and Exposures
-     * (https://cve.mitre.org/about/)
-     * 
- * - * .google.cloud.securitycenter.v1.Vulnerability vulnerability = 20; - * @return Whether the vulnerability field is set. - */ - public boolean hasVulnerability() { - return vulnerabilityBuilder_ != null || vulnerability_ != null; - } - /** - *
-     * Represents vulnerability specific fields like cve, cvss scores etc.
-     * CVE stands for Common Vulnerabilities and Exposures
-     * (https://cve.mitre.org/about/)
-     * 
- * - * .google.cloud.securitycenter.v1.Vulnerability vulnerability = 20; - * @return The vulnerability. - */ - public com.google.cloud.securitycenter.v1.Vulnerability getVulnerability() { - if (vulnerabilityBuilder_ == null) { - return vulnerability_ == null ? com.google.cloud.securitycenter.v1.Vulnerability.getDefaultInstance() : vulnerability_; - } else { - return vulnerabilityBuilder_.getMessage(); - } - } - /** - *
-     * Represents vulnerability specific fields like cve, cvss scores etc.
-     * CVE stands for Common Vulnerabilities and Exposures
-     * (https://cve.mitre.org/about/)
-     * 
- * - * .google.cloud.securitycenter.v1.Vulnerability vulnerability = 20; - */ - public Builder setVulnerability(com.google.cloud.securitycenter.v1.Vulnerability value) { - if (vulnerabilityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - vulnerability_ = value; - onChanged(); - } else { - vulnerabilityBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Represents vulnerability specific fields like cve, cvss scores etc.
-     * CVE stands for Common Vulnerabilities and Exposures
-     * (https://cve.mitre.org/about/)
-     * 
- * - * .google.cloud.securitycenter.v1.Vulnerability vulnerability = 20; - */ - public Builder setVulnerability( - com.google.cloud.securitycenter.v1.Vulnerability.Builder builderForValue) { - if (vulnerabilityBuilder_ == null) { - vulnerability_ = builderForValue.build(); - onChanged(); - } else { - vulnerabilityBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Represents vulnerability specific fields like cve, cvss scores etc.
-     * CVE stands for Common Vulnerabilities and Exposures
-     * (https://cve.mitre.org/about/)
-     * 
- * - * .google.cloud.securitycenter.v1.Vulnerability vulnerability = 20; - */ - public Builder mergeVulnerability(com.google.cloud.securitycenter.v1.Vulnerability value) { - if (vulnerabilityBuilder_ == null) { - if (vulnerability_ != null) { - vulnerability_ = - com.google.cloud.securitycenter.v1.Vulnerability.newBuilder(vulnerability_).mergeFrom(value).buildPartial(); - } else { - vulnerability_ = value; - } - onChanged(); - } else { - vulnerabilityBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Represents vulnerability specific fields like cve, cvss scores etc.
-     * CVE stands for Common Vulnerabilities and Exposures
-     * (https://cve.mitre.org/about/)
-     * 
- * - * .google.cloud.securitycenter.v1.Vulnerability vulnerability = 20; - */ - public Builder clearVulnerability() { - if (vulnerabilityBuilder_ == null) { - vulnerability_ = null; - onChanged(); - } else { - vulnerability_ = null; - vulnerabilityBuilder_ = null; - } - - return this; - } - /** - *
-     * Represents vulnerability specific fields like cve, cvss scores etc.
-     * CVE stands for Common Vulnerabilities and Exposures
-     * (https://cve.mitre.org/about/)
-     * 
- * - * .google.cloud.securitycenter.v1.Vulnerability vulnerability = 20; - */ - public com.google.cloud.securitycenter.v1.Vulnerability.Builder getVulnerabilityBuilder() { - - onChanged(); - return getVulnerabilityFieldBuilder().getBuilder(); - } - /** - *
-     * Represents vulnerability specific fields like cve, cvss scores etc.
-     * CVE stands for Common Vulnerabilities and Exposures
-     * (https://cve.mitre.org/about/)
-     * 
- * - * .google.cloud.securitycenter.v1.Vulnerability vulnerability = 20; - */ - public com.google.cloud.securitycenter.v1.VulnerabilityOrBuilder getVulnerabilityOrBuilder() { - if (vulnerabilityBuilder_ != null) { - return vulnerabilityBuilder_.getMessageOrBuilder(); - } else { - return vulnerability_ == null ? - com.google.cloud.securitycenter.v1.Vulnerability.getDefaultInstance() : vulnerability_; - } - } - /** - *
-     * Represents vulnerability specific fields like cve, cvss scores etc.
-     * CVE stands for Common Vulnerabilities and Exposures
-     * (https://cve.mitre.org/about/)
-     * 
- * - * .google.cloud.securitycenter.v1.Vulnerability vulnerability = 20; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Vulnerability, com.google.cloud.securitycenter.v1.Vulnerability.Builder, com.google.cloud.securitycenter.v1.VulnerabilityOrBuilder> - getVulnerabilityFieldBuilder() { - if (vulnerabilityBuilder_ == null) { - vulnerabilityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Vulnerability, com.google.cloud.securitycenter.v1.Vulnerability.Builder, com.google.cloud.securitycenter.v1.VulnerabilityOrBuilder>( - getVulnerability(), - getParentForChildren(), - isClean()); - vulnerability_ = null; - } - return vulnerabilityBuilder_; - } - - private com.google.protobuf.Timestamp muteUpdateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> muteUpdateTimeBuilder_; - /** - *
-     * Output only. The most recent time this finding was muted or unmuted.
-     * 
- * - * .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the muteUpdateTime field is set. - */ - public boolean hasMuteUpdateTime() { - return muteUpdateTimeBuilder_ != null || muteUpdateTime_ != null; - } - /** - *
-     * Output only. The most recent time this finding was muted or unmuted.
-     * 
- * - * .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The muteUpdateTime. - */ - public com.google.protobuf.Timestamp getMuteUpdateTime() { - if (muteUpdateTimeBuilder_ == null) { - return muteUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : muteUpdateTime_; - } else { - return muteUpdateTimeBuilder_.getMessage(); - } - } - /** - *
-     * Output only. The most recent time this finding was muted or unmuted.
-     * 
- * - * .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setMuteUpdateTime(com.google.protobuf.Timestamp value) { - if (muteUpdateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - muteUpdateTime_ = value; - onChanged(); - } else { - muteUpdateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. The most recent time this finding was muted or unmuted.
-     * 
- * - * .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setMuteUpdateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (muteUpdateTimeBuilder_ == null) { - muteUpdateTime_ = builderForValue.build(); - onChanged(); - } else { - muteUpdateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. The most recent time this finding was muted or unmuted.
-     * 
- * - * .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeMuteUpdateTime(com.google.protobuf.Timestamp value) { - if (muteUpdateTimeBuilder_ == null) { - if (muteUpdateTime_ != null) { - muteUpdateTime_ = - com.google.protobuf.Timestamp.newBuilder(muteUpdateTime_).mergeFrom(value).buildPartial(); - } else { - muteUpdateTime_ = value; - } - onChanged(); - } else { - muteUpdateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. The most recent time this finding was muted or unmuted.
-     * 
- * - * .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearMuteUpdateTime() { - if (muteUpdateTimeBuilder_ == null) { - muteUpdateTime_ = null; - onChanged(); - } else { - muteUpdateTime_ = null; - muteUpdateTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. The most recent time this finding was muted or unmuted.
-     * 
- * - * .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getMuteUpdateTimeBuilder() { - - onChanged(); - return getMuteUpdateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The most recent time this finding was muted or unmuted.
-     * 
- * - * .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.TimestampOrBuilder getMuteUpdateTimeOrBuilder() { - if (muteUpdateTimeBuilder_ != null) { - return muteUpdateTimeBuilder_.getMessageOrBuilder(); - } else { - return muteUpdateTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : muteUpdateTime_; - } - } - /** - *
-     * Output only. The most recent time this finding was muted or unmuted.
-     * 
- * - * .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getMuteUpdateTimeFieldBuilder() { - if (muteUpdateTimeBuilder_ == null) { - muteUpdateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getMuteUpdateTime(), - getParentForChildren(), - isClean()); - muteUpdateTime_ = null; - } - return muteUpdateTimeBuilder_; - } - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.securitycenter.v1.ExternalSystem> externalSystems_; - private com.google.protobuf.MapField - internalGetExternalSystems() { - if (externalSystems_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ExternalSystemsDefaultEntryHolder.defaultEntry); - } - return externalSystems_; - } - private com.google.protobuf.MapField - internalGetMutableExternalSystems() { - onChanged();; - if (externalSystems_ == null) { - externalSystems_ = com.google.protobuf.MapField.newMapField( - ExternalSystemsDefaultEntryHolder.defaultEntry); - } - if (!externalSystems_.isMutable()) { - externalSystems_ = externalSystems_.copy(); - } - return externalSystems_; - } - - public int getExternalSystemsCount() { - return internalGetExternalSystems().getMap().size(); - } - /** - *
-     * Output only. Third party SIEM/SOAR fields within SCC, contains external
-     * system information and external system finding fields.
-     * 
- * - * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - - @java.lang.Override - public boolean containsExternalSystems( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetExternalSystems().getMap().containsKey(key); - } - /** - * Use {@link #getExternalSystemsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getExternalSystems() { - return getExternalSystemsMap(); - } - /** - *
-     * Output only. Third party SIEM/SOAR fields within SCC, contains external
-     * system information and external system finding fields.
-     * 
- * - * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - - public java.util.Map getExternalSystemsMap() { - return internalGetExternalSystems().getMap(); - } - /** - *
-     * Output only. Third party SIEM/SOAR fields within SCC, contains external
-     * system information and external system finding fields.
-     * 
- * - * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - - public com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrDefault( - java.lang.String key, - com.google.cloud.securitycenter.v1.ExternalSystem defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetExternalSystems().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * Output only. Third party SIEM/SOAR fields within SCC, contains external
-     * system information and external system finding fields.
-     * 
- * - * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - - public com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetExternalSystems().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearExternalSystems() { - internalGetMutableExternalSystems().getMutableMap() - .clear(); - return this; - } - /** - *
-     * Output only. Third party SIEM/SOAR fields within SCC, contains external
-     * system information and external system finding fields.
-     * 
- * - * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - - public Builder removeExternalSystems( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableExternalSystems().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableExternalSystems() { - return internalGetMutableExternalSystems().getMutableMap(); - } - /** - *
-     * Output only. Third party SIEM/SOAR fields within SCC, contains external
-     * system information and external system finding fields.
-     * 
- * - * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder putExternalSystems( - java.lang.String key, - com.google.cloud.securitycenter.v1.ExternalSystem value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { - throw new NullPointerException("map value"); -} - - internalGetMutableExternalSystems().getMutableMap() - .put(key, value); - return this; - } - /** - *
-     * Output only. Third party SIEM/SOAR fields within SCC, contains external
-     * system information and external system finding fields.
-     * 
- * - * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - - public Builder putAllExternalSystems( - java.util.Map values) { - internalGetMutableExternalSystems().getMutableMap() - .putAll(values); - return this; - } - - private com.google.cloud.securitycenter.v1.MitreAttack mitreAttack_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.MitreAttack, com.google.cloud.securitycenter.v1.MitreAttack.Builder, com.google.cloud.securitycenter.v1.MitreAttackOrBuilder> mitreAttackBuilder_; - /** - *
-     * MITRE ATT&CK tactics and techniques related to this finding.
-     * See: https://attack.mitre.org
-     * 
- * - * .google.cloud.securitycenter.v1.MitreAttack mitre_attack = 25; - * @return Whether the mitreAttack field is set. - */ - public boolean hasMitreAttack() { - return mitreAttackBuilder_ != null || mitreAttack_ != null; - } - /** - *
-     * MITRE ATT&CK tactics and techniques related to this finding.
-     * See: https://attack.mitre.org
-     * 
- * - * .google.cloud.securitycenter.v1.MitreAttack mitre_attack = 25; - * @return The mitreAttack. - */ - public com.google.cloud.securitycenter.v1.MitreAttack getMitreAttack() { - if (mitreAttackBuilder_ == null) { - return mitreAttack_ == null ? com.google.cloud.securitycenter.v1.MitreAttack.getDefaultInstance() : mitreAttack_; - } else { - return mitreAttackBuilder_.getMessage(); - } - } - /** - *
-     * MITRE ATT&CK tactics and techniques related to this finding.
-     * See: https://attack.mitre.org
-     * 
- * - * .google.cloud.securitycenter.v1.MitreAttack mitre_attack = 25; - */ - public Builder setMitreAttack(com.google.cloud.securitycenter.v1.MitreAttack value) { - if (mitreAttackBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - mitreAttack_ = value; - onChanged(); - } else { - mitreAttackBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * MITRE ATT&CK tactics and techniques related to this finding.
-     * See: https://attack.mitre.org
-     * 
- * - * .google.cloud.securitycenter.v1.MitreAttack mitre_attack = 25; - */ - public Builder setMitreAttack( - com.google.cloud.securitycenter.v1.MitreAttack.Builder builderForValue) { - if (mitreAttackBuilder_ == null) { - mitreAttack_ = builderForValue.build(); - onChanged(); - } else { - mitreAttackBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * MITRE ATT&CK tactics and techniques related to this finding.
-     * See: https://attack.mitre.org
-     * 
- * - * .google.cloud.securitycenter.v1.MitreAttack mitre_attack = 25; - */ - public Builder mergeMitreAttack(com.google.cloud.securitycenter.v1.MitreAttack value) { - if (mitreAttackBuilder_ == null) { - if (mitreAttack_ != null) { - mitreAttack_ = - com.google.cloud.securitycenter.v1.MitreAttack.newBuilder(mitreAttack_).mergeFrom(value).buildPartial(); - } else { - mitreAttack_ = value; - } - onChanged(); - } else { - mitreAttackBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * MITRE ATT&CK tactics and techniques related to this finding.
-     * See: https://attack.mitre.org
-     * 
- * - * .google.cloud.securitycenter.v1.MitreAttack mitre_attack = 25; - */ - public Builder clearMitreAttack() { - if (mitreAttackBuilder_ == null) { - mitreAttack_ = null; - onChanged(); - } else { - mitreAttack_ = null; - mitreAttackBuilder_ = null; - } - - return this; - } - /** - *
-     * MITRE ATT&CK tactics and techniques related to this finding.
-     * See: https://attack.mitre.org
-     * 
- * - * .google.cloud.securitycenter.v1.MitreAttack mitre_attack = 25; - */ - public com.google.cloud.securitycenter.v1.MitreAttack.Builder getMitreAttackBuilder() { - - onChanged(); - return getMitreAttackFieldBuilder().getBuilder(); - } - /** - *
-     * MITRE ATT&CK tactics and techniques related to this finding.
-     * See: https://attack.mitre.org
-     * 
- * - * .google.cloud.securitycenter.v1.MitreAttack mitre_attack = 25; - */ - public com.google.cloud.securitycenter.v1.MitreAttackOrBuilder getMitreAttackOrBuilder() { - if (mitreAttackBuilder_ != null) { - return mitreAttackBuilder_.getMessageOrBuilder(); - } else { - return mitreAttack_ == null ? - com.google.cloud.securitycenter.v1.MitreAttack.getDefaultInstance() : mitreAttack_; - } - } - /** - *
-     * MITRE ATT&CK tactics and techniques related to this finding.
-     * See: https://attack.mitre.org
-     * 
- * - * .google.cloud.securitycenter.v1.MitreAttack mitre_attack = 25; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.MitreAttack, com.google.cloud.securitycenter.v1.MitreAttack.Builder, com.google.cloud.securitycenter.v1.MitreAttackOrBuilder> - getMitreAttackFieldBuilder() { - if (mitreAttackBuilder_ == null) { - mitreAttackBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.MitreAttack, com.google.cloud.securitycenter.v1.MitreAttack.Builder, com.google.cloud.securitycenter.v1.MitreAttackOrBuilder>( - getMitreAttack(), - getParentForChildren(), - isClean()); - mitreAttack_ = null; - } - return mitreAttackBuilder_; - } - - private com.google.cloud.securitycenter.v1.Access access_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Access, com.google.cloud.securitycenter.v1.Access.Builder, com.google.cloud.securitycenter.v1.AccessOrBuilder> accessBuilder_; - /** - *
-     * Access details associated to the Finding, such as more information on the
-     * caller, which method was accessed, from where, etc.
-     * 
- * - * .google.cloud.securitycenter.v1.Access access = 26; - * @return Whether the access field is set. - */ - public boolean hasAccess() { - return accessBuilder_ != null || access_ != null; - } - /** - *
-     * Access details associated to the Finding, such as more information on the
-     * caller, which method was accessed, from where, etc.
-     * 
- * - * .google.cloud.securitycenter.v1.Access access = 26; - * @return The access. - */ - public com.google.cloud.securitycenter.v1.Access getAccess() { - if (accessBuilder_ == null) { - return access_ == null ? com.google.cloud.securitycenter.v1.Access.getDefaultInstance() : access_; - } else { - return accessBuilder_.getMessage(); - } - } - /** - *
-     * Access details associated to the Finding, such as more information on the
-     * caller, which method was accessed, from where, etc.
-     * 
- * - * .google.cloud.securitycenter.v1.Access access = 26; - */ - public Builder setAccess(com.google.cloud.securitycenter.v1.Access value) { - if (accessBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - access_ = value; - onChanged(); - } else { - accessBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Access details associated to the Finding, such as more information on the
-     * caller, which method was accessed, from where, etc.
-     * 
- * - * .google.cloud.securitycenter.v1.Access access = 26; - */ - public Builder setAccess( - com.google.cloud.securitycenter.v1.Access.Builder builderForValue) { - if (accessBuilder_ == null) { - access_ = builderForValue.build(); - onChanged(); - } else { - accessBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Access details associated to the Finding, such as more information on the
-     * caller, which method was accessed, from where, etc.
-     * 
- * - * .google.cloud.securitycenter.v1.Access access = 26; - */ - public Builder mergeAccess(com.google.cloud.securitycenter.v1.Access value) { - if (accessBuilder_ == null) { - if (access_ != null) { - access_ = - com.google.cloud.securitycenter.v1.Access.newBuilder(access_).mergeFrom(value).buildPartial(); - } else { - access_ = value; - } - onChanged(); - } else { - accessBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Access details associated to the Finding, such as more information on the
-     * caller, which method was accessed, from where, etc.
-     * 
- * - * .google.cloud.securitycenter.v1.Access access = 26; - */ - public Builder clearAccess() { - if (accessBuilder_ == null) { - access_ = null; - onChanged(); - } else { - access_ = null; - accessBuilder_ = null; - } - - return this; - } - /** - *
-     * Access details associated to the Finding, such as more information on the
-     * caller, which method was accessed, from where, etc.
-     * 
- * - * .google.cloud.securitycenter.v1.Access access = 26; - */ - public com.google.cloud.securitycenter.v1.Access.Builder getAccessBuilder() { - - onChanged(); - return getAccessFieldBuilder().getBuilder(); - } - /** - *
-     * Access details associated to the Finding, such as more information on the
-     * caller, which method was accessed, from where, etc.
-     * 
- * - * .google.cloud.securitycenter.v1.Access access = 26; - */ - public com.google.cloud.securitycenter.v1.AccessOrBuilder getAccessOrBuilder() { - if (accessBuilder_ != null) { - return accessBuilder_.getMessageOrBuilder(); - } else { - return access_ == null ? - com.google.cloud.securitycenter.v1.Access.getDefaultInstance() : access_; - } - } - /** - *
-     * Access details associated to the Finding, such as more information on the
-     * caller, which method was accessed, from where, etc.
-     * 
- * - * .google.cloud.securitycenter.v1.Access access = 26; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Access, com.google.cloud.securitycenter.v1.Access.Builder, com.google.cloud.securitycenter.v1.AccessOrBuilder> - getAccessFieldBuilder() { - if (accessBuilder_ == null) { - accessBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Access, com.google.cloud.securitycenter.v1.Access.Builder, com.google.cloud.securitycenter.v1.AccessOrBuilder>( - getAccess(), - getParentForChildren(), - isClean()); - access_ = null; - } - return accessBuilder_; - } - - private java.util.List connections_ = - java.util.Collections.emptyList(); - private void ensureConnectionsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - connections_ = new java.util.ArrayList(connections_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Connection, com.google.cloud.securitycenter.v1.Connection.Builder, com.google.cloud.securitycenter.v1.ConnectionOrBuilder> connectionsBuilder_; - - /** - *
-     * Contains information about the IP connection associated with the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Connection connections = 31; - */ - public java.util.List getConnectionsList() { - if (connectionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(connections_); - } else { - return connectionsBuilder_.getMessageList(); - } - } - /** - *
-     * Contains information about the IP connection associated with the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Connection connections = 31; - */ - public int getConnectionsCount() { - if (connectionsBuilder_ == null) { - return connections_.size(); - } else { - return connectionsBuilder_.getCount(); - } - } - /** - *
-     * Contains information about the IP connection associated with the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Connection connections = 31; - */ - public com.google.cloud.securitycenter.v1.Connection getConnections(int index) { - if (connectionsBuilder_ == null) { - return connections_.get(index); - } else { - return connectionsBuilder_.getMessage(index); - } - } - /** - *
-     * Contains information about the IP connection associated with the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Connection connections = 31; - */ - public Builder setConnections( - int index, com.google.cloud.securitycenter.v1.Connection value) { - if (connectionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConnectionsIsMutable(); - connections_.set(index, value); - onChanged(); - } else { - connectionsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Contains information about the IP connection associated with the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Connection connections = 31; - */ - public Builder setConnections( - int index, com.google.cloud.securitycenter.v1.Connection.Builder builderForValue) { - if (connectionsBuilder_ == null) { - ensureConnectionsIsMutable(); - connections_.set(index, builderForValue.build()); - onChanged(); - } else { - connectionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Contains information about the IP connection associated with the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Connection connections = 31; - */ - public Builder addConnections(com.google.cloud.securitycenter.v1.Connection value) { - if (connectionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConnectionsIsMutable(); - connections_.add(value); - onChanged(); - } else { - connectionsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Contains information about the IP connection associated with the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Connection connections = 31; - */ - public Builder addConnections( - int index, com.google.cloud.securitycenter.v1.Connection value) { - if (connectionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConnectionsIsMutable(); - connections_.add(index, value); - onChanged(); - } else { - connectionsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Contains information about the IP connection associated with the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Connection connections = 31; - */ - public Builder addConnections( - com.google.cloud.securitycenter.v1.Connection.Builder builderForValue) { - if (connectionsBuilder_ == null) { - ensureConnectionsIsMutable(); - connections_.add(builderForValue.build()); - onChanged(); - } else { - connectionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Contains information about the IP connection associated with the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Connection connections = 31; - */ - public Builder addConnections( - int index, com.google.cloud.securitycenter.v1.Connection.Builder builderForValue) { - if (connectionsBuilder_ == null) { - ensureConnectionsIsMutable(); - connections_.add(index, builderForValue.build()); - onChanged(); - } else { - connectionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Contains information about the IP connection associated with the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Connection connections = 31; - */ - public Builder addAllConnections( - java.lang.Iterable values) { - if (connectionsBuilder_ == null) { - ensureConnectionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, connections_); - onChanged(); - } else { - connectionsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Contains information about the IP connection associated with the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Connection connections = 31; - */ - public Builder clearConnections() { - if (connectionsBuilder_ == null) { - connections_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - connectionsBuilder_.clear(); - } - return this; - } - /** - *
-     * Contains information about the IP connection associated with the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Connection connections = 31; - */ - public Builder removeConnections(int index) { - if (connectionsBuilder_ == null) { - ensureConnectionsIsMutable(); - connections_.remove(index); - onChanged(); - } else { - connectionsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Contains information about the IP connection associated with the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Connection connections = 31; - */ - public com.google.cloud.securitycenter.v1.Connection.Builder getConnectionsBuilder( - int index) { - return getConnectionsFieldBuilder().getBuilder(index); - } - /** - *
-     * Contains information about the IP connection associated with the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Connection connections = 31; - */ - public com.google.cloud.securitycenter.v1.ConnectionOrBuilder getConnectionsOrBuilder( - int index) { - if (connectionsBuilder_ == null) { - return connections_.get(index); } else { - return connectionsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Contains information about the IP connection associated with the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Connection connections = 31; - */ - public java.util.List - getConnectionsOrBuilderList() { - if (connectionsBuilder_ != null) { - return connectionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(connections_); - } - } - /** - *
-     * Contains information about the IP connection associated with the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Connection connections = 31; - */ - public com.google.cloud.securitycenter.v1.Connection.Builder addConnectionsBuilder() { - return getConnectionsFieldBuilder().addBuilder( - com.google.cloud.securitycenter.v1.Connection.getDefaultInstance()); - } - /** - *
-     * Contains information about the IP connection associated with the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Connection connections = 31; - */ - public com.google.cloud.securitycenter.v1.Connection.Builder addConnectionsBuilder( - int index) { - return getConnectionsFieldBuilder().addBuilder( - index, com.google.cloud.securitycenter.v1.Connection.getDefaultInstance()); - } - /** - *
-     * Contains information about the IP connection associated with the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Connection connections = 31; - */ - public java.util.List - getConnectionsBuilderList() { - return getConnectionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Connection, com.google.cloud.securitycenter.v1.Connection.Builder, com.google.cloud.securitycenter.v1.ConnectionOrBuilder> - getConnectionsFieldBuilder() { - if (connectionsBuilder_ == null) { - connectionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Connection, com.google.cloud.securitycenter.v1.Connection.Builder, com.google.cloud.securitycenter.v1.ConnectionOrBuilder>( - connections_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - connections_ = null; - } - return connectionsBuilder_; - } - - private java.lang.Object muteInitiator_ = ""; - /** - *
-     * First known as mute_annotation. Records additional information about the
-     * mute operation e.g. mute config that muted the finding, user who muted the
-     * finding, etc. Unlike other attributes of a finding, a finding provider
-     * shouldn't set the value of mute.
-     * 
- * - * string mute_initiator = 28; - * @return The muteInitiator. - */ - public java.lang.String getMuteInitiator() { - java.lang.Object ref = muteInitiator_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - muteInitiator_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * First known as mute_annotation. Records additional information about the
-     * mute operation e.g. mute config that muted the finding, user who muted the
-     * finding, etc. Unlike other attributes of a finding, a finding provider
-     * shouldn't set the value of mute.
-     * 
- * - * string mute_initiator = 28; - * @return The bytes for muteInitiator. - */ - public com.google.protobuf.ByteString - getMuteInitiatorBytes() { - java.lang.Object ref = muteInitiator_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - muteInitiator_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * First known as mute_annotation. Records additional information about the
-     * mute operation e.g. mute config that muted the finding, user who muted the
-     * finding, etc. Unlike other attributes of a finding, a finding provider
-     * shouldn't set the value of mute.
-     * 
- * - * string mute_initiator = 28; - * @param value The muteInitiator to set. - * @return This builder for chaining. - */ - public Builder setMuteInitiator( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - muteInitiator_ = value; - onChanged(); - return this; - } - /** - *
-     * First known as mute_annotation. Records additional information about the
-     * mute operation e.g. mute config that muted the finding, user who muted the
-     * finding, etc. Unlike other attributes of a finding, a finding provider
-     * shouldn't set the value of mute.
-     * 
- * - * string mute_initiator = 28; - * @return This builder for chaining. - */ - public Builder clearMuteInitiator() { - - muteInitiator_ = getDefaultInstance().getMuteInitiator(); - onChanged(); - return this; - } - /** - *
-     * First known as mute_annotation. Records additional information about the
-     * mute operation e.g. mute config that muted the finding, user who muted the
-     * finding, etc. Unlike other attributes of a finding, a finding provider
-     * shouldn't set the value of mute.
-     * 
- * - * string mute_initiator = 28; - * @param value The bytes for muteInitiator to set. - * @return This builder for chaining. - */ - public Builder setMuteInitiatorBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - muteInitiator_ = value; - onChanged(); - return this; - } - - private java.util.List processes_ = - java.util.Collections.emptyList(); - private void ensureProcessesIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - processes_ = new java.util.ArrayList(processes_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Process, com.google.cloud.securitycenter.v1.Process.Builder, com.google.cloud.securitycenter.v1.ProcessOrBuilder> processesBuilder_; - - /** - *
-     * Represents operating system processes associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Process processes = 30; - */ - public java.util.List getProcessesList() { - if (processesBuilder_ == null) { - return java.util.Collections.unmodifiableList(processes_); - } else { - return processesBuilder_.getMessageList(); - } - } - /** - *
-     * Represents operating system processes associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Process processes = 30; - */ - public int getProcessesCount() { - if (processesBuilder_ == null) { - return processes_.size(); - } else { - return processesBuilder_.getCount(); - } - } - /** - *
-     * Represents operating system processes associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Process processes = 30; - */ - public com.google.cloud.securitycenter.v1.Process getProcesses(int index) { - if (processesBuilder_ == null) { - return processes_.get(index); - } else { - return processesBuilder_.getMessage(index); - } - } - /** - *
-     * Represents operating system processes associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Process processes = 30; - */ - public Builder setProcesses( - int index, com.google.cloud.securitycenter.v1.Process value) { - if (processesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProcessesIsMutable(); - processes_.set(index, value); - onChanged(); - } else { - processesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Represents operating system processes associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Process processes = 30; - */ - public Builder setProcesses( - int index, com.google.cloud.securitycenter.v1.Process.Builder builderForValue) { - if (processesBuilder_ == null) { - ensureProcessesIsMutable(); - processes_.set(index, builderForValue.build()); - onChanged(); - } else { - processesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Represents operating system processes associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Process processes = 30; - */ - public Builder addProcesses(com.google.cloud.securitycenter.v1.Process value) { - if (processesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProcessesIsMutable(); - processes_.add(value); - onChanged(); - } else { - processesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Represents operating system processes associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Process processes = 30; - */ - public Builder addProcesses( - int index, com.google.cloud.securitycenter.v1.Process value) { - if (processesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProcessesIsMutable(); - processes_.add(index, value); - onChanged(); - } else { - processesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Represents operating system processes associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Process processes = 30; - */ - public Builder addProcesses( - com.google.cloud.securitycenter.v1.Process.Builder builderForValue) { - if (processesBuilder_ == null) { - ensureProcessesIsMutable(); - processes_.add(builderForValue.build()); - onChanged(); - } else { - processesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Represents operating system processes associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Process processes = 30; - */ - public Builder addProcesses( - int index, com.google.cloud.securitycenter.v1.Process.Builder builderForValue) { - if (processesBuilder_ == null) { - ensureProcessesIsMutable(); - processes_.add(index, builderForValue.build()); - onChanged(); - } else { - processesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Represents operating system processes associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Process processes = 30; - */ - public Builder addAllProcesses( - java.lang.Iterable values) { - if (processesBuilder_ == null) { - ensureProcessesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, processes_); - onChanged(); - } else { - processesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Represents operating system processes associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Process processes = 30; - */ - public Builder clearProcesses() { - if (processesBuilder_ == null) { - processes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - processesBuilder_.clear(); - } - return this; - } - /** - *
-     * Represents operating system processes associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Process processes = 30; - */ - public Builder removeProcesses(int index) { - if (processesBuilder_ == null) { - ensureProcessesIsMutable(); - processes_.remove(index); - onChanged(); - } else { - processesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Represents operating system processes associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Process processes = 30; - */ - public com.google.cloud.securitycenter.v1.Process.Builder getProcessesBuilder( - int index) { - return getProcessesFieldBuilder().getBuilder(index); - } - /** - *
-     * Represents operating system processes associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Process processes = 30; - */ - public com.google.cloud.securitycenter.v1.ProcessOrBuilder getProcessesOrBuilder( - int index) { - if (processesBuilder_ == null) { - return processes_.get(index); } else { - return processesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Represents operating system processes associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Process processes = 30; - */ - public java.util.List - getProcessesOrBuilderList() { - if (processesBuilder_ != null) { - return processesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(processes_); - } - } - /** - *
-     * Represents operating system processes associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Process processes = 30; - */ - public com.google.cloud.securitycenter.v1.Process.Builder addProcessesBuilder() { - return getProcessesFieldBuilder().addBuilder( - com.google.cloud.securitycenter.v1.Process.getDefaultInstance()); - } - /** - *
-     * Represents operating system processes associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Process processes = 30; - */ - public com.google.cloud.securitycenter.v1.Process.Builder addProcessesBuilder( - int index) { - return getProcessesFieldBuilder().addBuilder( - index, com.google.cloud.securitycenter.v1.Process.getDefaultInstance()); - } - /** - *
-     * Represents operating system processes associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Process processes = 30; - */ - public java.util.List - getProcessesBuilderList() { - return getProcessesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Process, com.google.cloud.securitycenter.v1.Process.Builder, com.google.cloud.securitycenter.v1.ProcessOrBuilder> - getProcessesFieldBuilder() { - if (processesBuilder_ == null) { - processesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Process, com.google.cloud.securitycenter.v1.Process.Builder, com.google.cloud.securitycenter.v1.ProcessOrBuilder>( - processes_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - processes_ = null; - } - return processesBuilder_; - } - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.securitycenter.v1.ContactDetails> contacts_; - private com.google.protobuf.MapField - internalGetContacts() { - if (contacts_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ContactsDefaultEntryHolder.defaultEntry); - } - return contacts_; - } - private com.google.protobuf.MapField - internalGetMutableContacts() { - onChanged();; - if (contacts_ == null) { - contacts_ = com.google.protobuf.MapField.newMapField( - ContactsDefaultEntryHolder.defaultEntry); - } - if (!contacts_.isMutable()) { - contacts_ = contacts_.copy(); - } - return contacts_; - } - - public int getContactsCount() { - return internalGetContacts().getMap().size(); - } - /** - *
-     * Output only. Map containing the point of contacts for the given finding.
-     * The key represents the type of contact, while the value contains a list of
-     * all the contacts that pertain. Please refer to:
-     * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
-     *     {
-     *       "security": {
-     *         "contacts": [
-     *           {
-     *             "email": "person1@company.com"
-     *           },
-     *           {
-     *             "email": "person2@company.com"
-     *           }
-     *         ]
-     *       }
-     *     }
-     * 
- * - * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - - @java.lang.Override - public boolean containsContacts( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetContacts().getMap().containsKey(key); - } - /** - * Use {@link #getContactsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getContacts() { - return getContactsMap(); - } - /** - *
-     * Output only. Map containing the point of contacts for the given finding.
-     * The key represents the type of contact, while the value contains a list of
-     * all the contacts that pertain. Please refer to:
-     * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
-     *     {
-     *       "security": {
-     *         "contacts": [
-     *           {
-     *             "email": "person1@company.com"
-     *           },
-     *           {
-     *             "email": "person2@company.com"
-     *           }
-     *         ]
-     *       }
-     *     }
-     * 
- * - * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - - public java.util.Map getContactsMap() { - return internalGetContacts().getMap(); - } - /** - *
-     * Output only. Map containing the point of contacts for the given finding.
-     * The key represents the type of contact, while the value contains a list of
-     * all the contacts that pertain. Please refer to:
-     * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
-     *     {
-     *       "security": {
-     *         "contacts": [
-     *           {
-     *             "email": "person1@company.com"
-     *           },
-     *           {
-     *             "email": "person2@company.com"
-     *           }
-     *         ]
-     *       }
-     *     }
-     * 
- * - * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - - public com.google.cloud.securitycenter.v1.ContactDetails getContactsOrDefault( - java.lang.String key, - com.google.cloud.securitycenter.v1.ContactDetails defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetContacts().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * Output only. Map containing the point of contacts for the given finding.
-     * The key represents the type of contact, while the value contains a list of
-     * all the contacts that pertain. Please refer to:
-     * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
-     *     {
-     *       "security": {
-     *         "contacts": [
-     *           {
-     *             "email": "person1@company.com"
-     *           },
-     *           {
-     *             "email": "person2@company.com"
-     *           }
-     *         ]
-     *       }
-     *     }
-     * 
- * - * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - - public com.google.cloud.securitycenter.v1.ContactDetails getContactsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetContacts().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearContacts() { - internalGetMutableContacts().getMutableMap() - .clear(); - return this; - } - /** - *
-     * Output only. Map containing the point of contacts for the given finding.
-     * The key represents the type of contact, while the value contains a list of
-     * all the contacts that pertain. Please refer to:
-     * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
-     *     {
-     *       "security": {
-     *         "contacts": [
-     *           {
-     *             "email": "person1@company.com"
-     *           },
-     *           {
-     *             "email": "person2@company.com"
-     *           }
-     *         ]
-     *       }
-     *     }
-     * 
- * - * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - - public Builder removeContacts( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableContacts().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableContacts() { - return internalGetMutableContacts().getMutableMap(); - } - /** - *
-     * Output only. Map containing the point of contacts for the given finding.
-     * The key represents the type of contact, while the value contains a list of
-     * all the contacts that pertain. Please refer to:
-     * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
-     *     {
-     *       "security": {
-     *         "contacts": [
-     *           {
-     *             "email": "person1@company.com"
-     *           },
-     *           {
-     *             "email": "person2@company.com"
-     *           }
-     *         ]
-     *       }
-     *     }
-     * 
- * - * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder putContacts( - java.lang.String key, - com.google.cloud.securitycenter.v1.ContactDetails value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { - throw new NullPointerException("map value"); -} - - internalGetMutableContacts().getMutableMap() - .put(key, value); - return this; - } - /** - *
-     * Output only. Map containing the point of contacts for the given finding.
-     * The key represents the type of contact, while the value contains a list of
-     * all the contacts that pertain. Please refer to:
-     * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
-     *     {
-     *       "security": {
-     *         "contacts": [
-     *           {
-     *             "email": "person1@company.com"
-     *           },
-     *           {
-     *             "email": "person2@company.com"
-     *           }
-     *         ]
-     *       }
-     *     }
-     * 
- * - * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - - public Builder putAllContacts( - java.util.Map values) { - internalGetMutableContacts().getMutableMap() - .putAll(values); - return this; - } - - private java.util.List compliances_ = - java.util.Collections.emptyList(); - private void ensureCompliancesIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { - compliances_ = new java.util.ArrayList(compliances_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Compliance, com.google.cloud.securitycenter.v1.Compliance.Builder, com.google.cloud.securitycenter.v1.ComplianceOrBuilder> compliancesBuilder_; - - /** - *
-     * Contains compliance information for security standards associated to the
-     * finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; - */ - public java.util.List getCompliancesList() { - if (compliancesBuilder_ == null) { - return java.util.Collections.unmodifiableList(compliances_); - } else { - return compliancesBuilder_.getMessageList(); - } - } - /** - *
-     * Contains compliance information for security standards associated to the
-     * finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; - */ - public int getCompliancesCount() { - if (compliancesBuilder_ == null) { - return compliances_.size(); - } else { - return compliancesBuilder_.getCount(); - } - } - /** - *
-     * Contains compliance information for security standards associated to the
-     * finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; - */ - public com.google.cloud.securitycenter.v1.Compliance getCompliances(int index) { - if (compliancesBuilder_ == null) { - return compliances_.get(index); - } else { - return compliancesBuilder_.getMessage(index); - } - } - /** - *
-     * Contains compliance information for security standards associated to the
-     * finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; - */ - public Builder setCompliances( - int index, com.google.cloud.securitycenter.v1.Compliance value) { - if (compliancesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCompliancesIsMutable(); - compliances_.set(index, value); - onChanged(); - } else { - compliancesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Contains compliance information for security standards associated to the
-     * finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; - */ - public Builder setCompliances( - int index, com.google.cloud.securitycenter.v1.Compliance.Builder builderForValue) { - if (compliancesBuilder_ == null) { - ensureCompliancesIsMutable(); - compliances_.set(index, builderForValue.build()); - onChanged(); - } else { - compliancesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Contains compliance information for security standards associated to the
-     * finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; - */ - public Builder addCompliances(com.google.cloud.securitycenter.v1.Compliance value) { - if (compliancesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCompliancesIsMutable(); - compliances_.add(value); - onChanged(); - } else { - compliancesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Contains compliance information for security standards associated to the
-     * finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; - */ - public Builder addCompliances( - int index, com.google.cloud.securitycenter.v1.Compliance value) { - if (compliancesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCompliancesIsMutable(); - compliances_.add(index, value); - onChanged(); - } else { - compliancesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Contains compliance information for security standards associated to the
-     * finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; - */ - public Builder addCompliances( - com.google.cloud.securitycenter.v1.Compliance.Builder builderForValue) { - if (compliancesBuilder_ == null) { - ensureCompliancesIsMutable(); - compliances_.add(builderForValue.build()); - onChanged(); - } else { - compliancesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Contains compliance information for security standards associated to the
-     * finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; - */ - public Builder addCompliances( - int index, com.google.cloud.securitycenter.v1.Compliance.Builder builderForValue) { - if (compliancesBuilder_ == null) { - ensureCompliancesIsMutable(); - compliances_.add(index, builderForValue.build()); - onChanged(); - } else { - compliancesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Contains compliance information for security standards associated to the
-     * finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; - */ - public Builder addAllCompliances( - java.lang.Iterable values) { - if (compliancesBuilder_ == null) { - ensureCompliancesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, compliances_); - onChanged(); - } else { - compliancesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Contains compliance information for security standards associated to the
-     * finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; - */ - public Builder clearCompliances() { - if (compliancesBuilder_ == null) { - compliances_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - compliancesBuilder_.clear(); - } - return this; - } - /** - *
-     * Contains compliance information for security standards associated to the
-     * finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; - */ - public Builder removeCompliances(int index) { - if (compliancesBuilder_ == null) { - ensureCompliancesIsMutable(); - compliances_.remove(index); - onChanged(); - } else { - compliancesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Contains compliance information for security standards associated to the
-     * finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; - */ - public com.google.cloud.securitycenter.v1.Compliance.Builder getCompliancesBuilder( - int index) { - return getCompliancesFieldBuilder().getBuilder(index); - } - /** - *
-     * Contains compliance information for security standards associated to the
-     * finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; - */ - public com.google.cloud.securitycenter.v1.ComplianceOrBuilder getCompliancesOrBuilder( - int index) { - if (compliancesBuilder_ == null) { - return compliances_.get(index); } else { - return compliancesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Contains compliance information for security standards associated to the
-     * finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; - */ - public java.util.List - getCompliancesOrBuilderList() { - if (compliancesBuilder_ != null) { - return compliancesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(compliances_); - } - } - /** - *
-     * Contains compliance information for security standards associated to the
-     * finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; - */ - public com.google.cloud.securitycenter.v1.Compliance.Builder addCompliancesBuilder() { - return getCompliancesFieldBuilder().addBuilder( - com.google.cloud.securitycenter.v1.Compliance.getDefaultInstance()); - } - /** - *
-     * Contains compliance information for security standards associated to the
-     * finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; - */ - public com.google.cloud.securitycenter.v1.Compliance.Builder addCompliancesBuilder( - int index) { - return getCompliancesFieldBuilder().addBuilder( - index, com.google.cloud.securitycenter.v1.Compliance.getDefaultInstance()); - } - /** - *
-     * Contains compliance information for security standards associated to the
-     * finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; - */ - public java.util.List - getCompliancesBuilderList() { - return getCompliancesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Compliance, com.google.cloud.securitycenter.v1.Compliance.Builder, com.google.cloud.securitycenter.v1.ComplianceOrBuilder> - getCompliancesFieldBuilder() { - if (compliancesBuilder_ == null) { - compliancesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Compliance, com.google.cloud.securitycenter.v1.Compliance.Builder, com.google.cloud.securitycenter.v1.ComplianceOrBuilder>( - compliances_, - ((bitField0_ & 0x00000020) != 0), - getParentForChildren(), - isClean()); - compliances_ = null; - } - return compliancesBuilder_; - } - - private java.lang.Object description_ = ""; - /** - *
-     * Contains more detail about the finding.
-     * 
- * - * string description = 37; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Contains more detail about the finding.
-     * 
- * - * string description = 37; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Contains more detail about the finding.
-     * 
- * - * string description = 37; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - *
-     * Contains more detail about the finding.
-     * 
- * - * string description = 37; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-     * Contains more detail about the finding.
-     * 
- * - * string description = 37; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private com.google.cloud.securitycenter.v1.Exfiltration exfiltration_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Exfiltration, com.google.cloud.securitycenter.v1.Exfiltration.Builder, com.google.cloud.securitycenter.v1.ExfiltrationOrBuilder> exfiltrationBuilder_; - /** - *
-     * Represents exfiltration associated with the Finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; - * @return Whether the exfiltration field is set. - */ - public boolean hasExfiltration() { - return exfiltrationBuilder_ != null || exfiltration_ != null; - } - /** - *
-     * Represents exfiltration associated with the Finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; - * @return The exfiltration. - */ - public com.google.cloud.securitycenter.v1.Exfiltration getExfiltration() { - if (exfiltrationBuilder_ == null) { - return exfiltration_ == null ? com.google.cloud.securitycenter.v1.Exfiltration.getDefaultInstance() : exfiltration_; - } else { - return exfiltrationBuilder_.getMessage(); - } - } - /** - *
-     * Represents exfiltration associated with the Finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; - */ - public Builder setExfiltration(com.google.cloud.securitycenter.v1.Exfiltration value) { - if (exfiltrationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - exfiltration_ = value; - onChanged(); - } else { - exfiltrationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Represents exfiltration associated with the Finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; - */ - public Builder setExfiltration( - com.google.cloud.securitycenter.v1.Exfiltration.Builder builderForValue) { - if (exfiltrationBuilder_ == null) { - exfiltration_ = builderForValue.build(); - onChanged(); - } else { - exfiltrationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Represents exfiltration associated with the Finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; - */ - public Builder mergeExfiltration(com.google.cloud.securitycenter.v1.Exfiltration value) { - if (exfiltrationBuilder_ == null) { - if (exfiltration_ != null) { - exfiltration_ = - com.google.cloud.securitycenter.v1.Exfiltration.newBuilder(exfiltration_).mergeFrom(value).buildPartial(); - } else { - exfiltration_ = value; - } - onChanged(); - } else { - exfiltrationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Represents exfiltration associated with the Finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; - */ - public Builder clearExfiltration() { - if (exfiltrationBuilder_ == null) { - exfiltration_ = null; - onChanged(); - } else { - exfiltration_ = null; - exfiltrationBuilder_ = null; - } - - return this; - } - /** - *
-     * Represents exfiltration associated with the Finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; - */ - public com.google.cloud.securitycenter.v1.Exfiltration.Builder getExfiltrationBuilder() { - - onChanged(); - return getExfiltrationFieldBuilder().getBuilder(); - } - /** - *
-     * Represents exfiltration associated with the Finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; - */ - public com.google.cloud.securitycenter.v1.ExfiltrationOrBuilder getExfiltrationOrBuilder() { - if (exfiltrationBuilder_ != null) { - return exfiltrationBuilder_.getMessageOrBuilder(); - } else { - return exfiltration_ == null ? - com.google.cloud.securitycenter.v1.Exfiltration.getDefaultInstance() : exfiltration_; - } - } - /** - *
-     * Represents exfiltration associated with the Finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Exfiltration, com.google.cloud.securitycenter.v1.Exfiltration.Builder, com.google.cloud.securitycenter.v1.ExfiltrationOrBuilder> - getExfiltrationFieldBuilder() { - if (exfiltrationBuilder_ == null) { - exfiltrationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Exfiltration, com.google.cloud.securitycenter.v1.Exfiltration.Builder, com.google.cloud.securitycenter.v1.ExfiltrationOrBuilder>( - getExfiltration(), - getParentForChildren(), - isClean()); - exfiltration_ = null; - } - return exfiltrationBuilder_; - } - - private java.util.List iamBindings_ = - java.util.Collections.emptyList(); - private void ensureIamBindingsIsMutable() { - if (!((bitField0_ & 0x00000040) != 0)) { - iamBindings_ = new java.util.ArrayList(iamBindings_); - bitField0_ |= 0x00000040; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.IamBinding, com.google.cloud.securitycenter.v1.IamBinding.Builder, com.google.cloud.securitycenter.v1.IamBindingOrBuilder> iamBindingsBuilder_; - - /** - *
-     * Represents IAM bindings associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; - */ - public java.util.List getIamBindingsList() { - if (iamBindingsBuilder_ == null) { - return java.util.Collections.unmodifiableList(iamBindings_); - } else { - return iamBindingsBuilder_.getMessageList(); - } - } - /** - *
-     * Represents IAM bindings associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; - */ - public int getIamBindingsCount() { - if (iamBindingsBuilder_ == null) { - return iamBindings_.size(); - } else { - return iamBindingsBuilder_.getCount(); - } - } - /** - *
-     * Represents IAM bindings associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; - */ - public com.google.cloud.securitycenter.v1.IamBinding getIamBindings(int index) { - if (iamBindingsBuilder_ == null) { - return iamBindings_.get(index); - } else { - return iamBindingsBuilder_.getMessage(index); - } - } - /** - *
-     * Represents IAM bindings associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; - */ - public Builder setIamBindings( - int index, com.google.cloud.securitycenter.v1.IamBinding value) { - if (iamBindingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIamBindingsIsMutable(); - iamBindings_.set(index, value); - onChanged(); - } else { - iamBindingsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Represents IAM bindings associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; - */ - public Builder setIamBindings( - int index, com.google.cloud.securitycenter.v1.IamBinding.Builder builderForValue) { - if (iamBindingsBuilder_ == null) { - ensureIamBindingsIsMutable(); - iamBindings_.set(index, builderForValue.build()); - onChanged(); - } else { - iamBindingsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Represents IAM bindings associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; - */ - public Builder addIamBindings(com.google.cloud.securitycenter.v1.IamBinding value) { - if (iamBindingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIamBindingsIsMutable(); - iamBindings_.add(value); - onChanged(); - } else { - iamBindingsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Represents IAM bindings associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; - */ - public Builder addIamBindings( - int index, com.google.cloud.securitycenter.v1.IamBinding value) { - if (iamBindingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIamBindingsIsMutable(); - iamBindings_.add(index, value); - onChanged(); - } else { - iamBindingsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Represents IAM bindings associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; - */ - public Builder addIamBindings( - com.google.cloud.securitycenter.v1.IamBinding.Builder builderForValue) { - if (iamBindingsBuilder_ == null) { - ensureIamBindingsIsMutable(); - iamBindings_.add(builderForValue.build()); - onChanged(); - } else { - iamBindingsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Represents IAM bindings associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; - */ - public Builder addIamBindings( - int index, com.google.cloud.securitycenter.v1.IamBinding.Builder builderForValue) { - if (iamBindingsBuilder_ == null) { - ensureIamBindingsIsMutable(); - iamBindings_.add(index, builderForValue.build()); - onChanged(); - } else { - iamBindingsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Represents IAM bindings associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; - */ - public Builder addAllIamBindings( - java.lang.Iterable values) { - if (iamBindingsBuilder_ == null) { - ensureIamBindingsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, iamBindings_); - onChanged(); - } else { - iamBindingsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Represents IAM bindings associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; - */ - public Builder clearIamBindings() { - if (iamBindingsBuilder_ == null) { - iamBindings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - } else { - iamBindingsBuilder_.clear(); - } - return this; - } - /** - *
-     * Represents IAM bindings associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; - */ - public Builder removeIamBindings(int index) { - if (iamBindingsBuilder_ == null) { - ensureIamBindingsIsMutable(); - iamBindings_.remove(index); - onChanged(); - } else { - iamBindingsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Represents IAM bindings associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; - */ - public com.google.cloud.securitycenter.v1.IamBinding.Builder getIamBindingsBuilder( - int index) { - return getIamBindingsFieldBuilder().getBuilder(index); - } - /** - *
-     * Represents IAM bindings associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; - */ - public com.google.cloud.securitycenter.v1.IamBindingOrBuilder getIamBindingsOrBuilder( - int index) { - if (iamBindingsBuilder_ == null) { - return iamBindings_.get(index); } else { - return iamBindingsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Represents IAM bindings associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; - */ - public java.util.List - getIamBindingsOrBuilderList() { - if (iamBindingsBuilder_ != null) { - return iamBindingsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(iamBindings_); - } - } - /** - *
-     * Represents IAM bindings associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; - */ - public com.google.cloud.securitycenter.v1.IamBinding.Builder addIamBindingsBuilder() { - return getIamBindingsFieldBuilder().addBuilder( - com.google.cloud.securitycenter.v1.IamBinding.getDefaultInstance()); - } - /** - *
-     * Represents IAM bindings associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; - */ - public com.google.cloud.securitycenter.v1.IamBinding.Builder addIamBindingsBuilder( - int index) { - return getIamBindingsFieldBuilder().addBuilder( - index, com.google.cloud.securitycenter.v1.IamBinding.getDefaultInstance()); - } - /** - *
-     * Represents IAM bindings associated with the Finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; - */ - public java.util.List - getIamBindingsBuilderList() { - return getIamBindingsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.IamBinding, com.google.cloud.securitycenter.v1.IamBinding.Builder, com.google.cloud.securitycenter.v1.IamBindingOrBuilder> - getIamBindingsFieldBuilder() { - if (iamBindingsBuilder_ == null) { - iamBindingsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.IamBinding, com.google.cloud.securitycenter.v1.IamBinding.Builder, com.google.cloud.securitycenter.v1.IamBindingOrBuilder>( - iamBindings_, - ((bitField0_ & 0x00000040) != 0), - getParentForChildren(), - isClean()); - iamBindings_ = null; - } - return iamBindingsBuilder_; - } - - private java.lang.Object nextSteps_ = ""; - /** - *
-     * Next steps associate to the finding.
-     * 
- * - * string next_steps = 40; - * @return The nextSteps. - */ - public java.lang.String getNextSteps() { - java.lang.Object ref = nextSteps_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextSteps_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Next steps associate to the finding.
-     * 
- * - * string next_steps = 40; - * @return The bytes for nextSteps. - */ - public com.google.protobuf.ByteString - getNextStepsBytes() { - java.lang.Object ref = nextSteps_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextSteps_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Next steps associate to the finding.
-     * 
- * - * string next_steps = 40; - * @param value The nextSteps to set. - * @return This builder for chaining. - */ - public Builder setNextSteps( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextSteps_ = value; - onChanged(); - return this; - } - /** - *
-     * Next steps associate to the finding.
-     * 
- * - * string next_steps = 40; - * @return This builder for chaining. - */ - public Builder clearNextSteps() { - - nextSteps_ = getDefaultInstance().getNextSteps(); - onChanged(); - return this; - } - /** - *
-     * Next steps associate to the finding.
-     * 
- * - * string next_steps = 40; - * @param value The bytes for nextSteps to set. - * @return This builder for chaining. - */ - public Builder setNextStepsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextSteps_ = value; - onChanged(); - return this; - } - - private java.util.List containers_ = - java.util.Collections.emptyList(); - private void ensureContainersIsMutable() { - if (!((bitField0_ & 0x00000080) != 0)) { - containers_ = new java.util.ArrayList(containers_); - bitField0_ |= 0x00000080; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Container, com.google.cloud.securitycenter.v1.Container.Builder, com.google.cloud.securitycenter.v1.ContainerOrBuilder> containersBuilder_; - - /** - *
-     * Containers associated with the finding. containers provides information
-     * for both Kubernetes and non-Kubernetes containers.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 42; - */ - public java.util.List getContainersList() { - if (containersBuilder_ == null) { - return java.util.Collections.unmodifiableList(containers_); - } else { - return containersBuilder_.getMessageList(); - } - } - /** - *
-     * Containers associated with the finding. containers provides information
-     * for both Kubernetes and non-Kubernetes containers.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 42; - */ - public int getContainersCount() { - if (containersBuilder_ == null) { - return containers_.size(); - } else { - return containersBuilder_.getCount(); - } - } - /** - *
-     * Containers associated with the finding. containers provides information
-     * for both Kubernetes and non-Kubernetes containers.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 42; - */ - public com.google.cloud.securitycenter.v1.Container getContainers(int index) { - if (containersBuilder_ == null) { - return containers_.get(index); - } else { - return containersBuilder_.getMessage(index); - } - } - /** - *
-     * Containers associated with the finding. containers provides information
-     * for both Kubernetes and non-Kubernetes containers.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 42; - */ - public Builder setContainers( - int index, com.google.cloud.securitycenter.v1.Container value) { - if (containersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContainersIsMutable(); - containers_.set(index, value); - onChanged(); - } else { - containersBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Containers associated with the finding. containers provides information
-     * for both Kubernetes and non-Kubernetes containers.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 42; - */ - public Builder setContainers( - int index, com.google.cloud.securitycenter.v1.Container.Builder builderForValue) { - if (containersBuilder_ == null) { - ensureContainersIsMutable(); - containers_.set(index, builderForValue.build()); - onChanged(); - } else { - containersBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Containers associated with the finding. containers provides information
-     * for both Kubernetes and non-Kubernetes containers.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 42; - */ - public Builder addContainers(com.google.cloud.securitycenter.v1.Container value) { - if (containersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContainersIsMutable(); - containers_.add(value); - onChanged(); - } else { - containersBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Containers associated with the finding. containers provides information
-     * for both Kubernetes and non-Kubernetes containers.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 42; - */ - public Builder addContainers( - int index, com.google.cloud.securitycenter.v1.Container value) { - if (containersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContainersIsMutable(); - containers_.add(index, value); - onChanged(); - } else { - containersBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Containers associated with the finding. containers provides information
-     * for both Kubernetes and non-Kubernetes containers.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 42; - */ - public Builder addContainers( - com.google.cloud.securitycenter.v1.Container.Builder builderForValue) { - if (containersBuilder_ == null) { - ensureContainersIsMutable(); - containers_.add(builderForValue.build()); - onChanged(); - } else { - containersBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Containers associated with the finding. containers provides information
-     * for both Kubernetes and non-Kubernetes containers.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 42; - */ - public Builder addContainers( - int index, com.google.cloud.securitycenter.v1.Container.Builder builderForValue) { - if (containersBuilder_ == null) { - ensureContainersIsMutable(); - containers_.add(index, builderForValue.build()); - onChanged(); - } else { - containersBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Containers associated with the finding. containers provides information
-     * for both Kubernetes and non-Kubernetes containers.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 42; - */ - public Builder addAllContainers( - java.lang.Iterable values) { - if (containersBuilder_ == null) { - ensureContainersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, containers_); - onChanged(); - } else { - containersBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Containers associated with the finding. containers provides information
-     * for both Kubernetes and non-Kubernetes containers.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 42; - */ - public Builder clearContainers() { - if (containersBuilder_ == null) { - containers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - } else { - containersBuilder_.clear(); - } - return this; - } - /** - *
-     * Containers associated with the finding. containers provides information
-     * for both Kubernetes and non-Kubernetes containers.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 42; - */ - public Builder removeContainers(int index) { - if (containersBuilder_ == null) { - ensureContainersIsMutable(); - containers_.remove(index); - onChanged(); - } else { - containersBuilder_.remove(index); - } - return this; - } - /** - *
-     * Containers associated with the finding. containers provides information
-     * for both Kubernetes and non-Kubernetes containers.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 42; - */ - public com.google.cloud.securitycenter.v1.Container.Builder getContainersBuilder( - int index) { - return getContainersFieldBuilder().getBuilder(index); - } - /** - *
-     * Containers associated with the finding. containers provides information
-     * for both Kubernetes and non-Kubernetes containers.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 42; - */ - public com.google.cloud.securitycenter.v1.ContainerOrBuilder getContainersOrBuilder( - int index) { - if (containersBuilder_ == null) { - return containers_.get(index); } else { - return containersBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Containers associated with the finding. containers provides information
-     * for both Kubernetes and non-Kubernetes containers.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 42; - */ - public java.util.List - getContainersOrBuilderList() { - if (containersBuilder_ != null) { - return containersBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(containers_); - } - } - /** - *
-     * Containers associated with the finding. containers provides information
-     * for both Kubernetes and non-Kubernetes containers.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 42; - */ - public com.google.cloud.securitycenter.v1.Container.Builder addContainersBuilder() { - return getContainersFieldBuilder().addBuilder( - com.google.cloud.securitycenter.v1.Container.getDefaultInstance()); - } - /** - *
-     * Containers associated with the finding. containers provides information
-     * for both Kubernetes and non-Kubernetes containers.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 42; - */ - public com.google.cloud.securitycenter.v1.Container.Builder addContainersBuilder( - int index) { - return getContainersFieldBuilder().addBuilder( - index, com.google.cloud.securitycenter.v1.Container.getDefaultInstance()); - } - /** - *
-     * Containers associated with the finding. containers provides information
-     * for both Kubernetes and non-Kubernetes containers.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 42; - */ - public java.util.List - getContainersBuilderList() { - return getContainersFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Container, com.google.cloud.securitycenter.v1.Container.Builder, com.google.cloud.securitycenter.v1.ContainerOrBuilder> - getContainersFieldBuilder() { - if (containersBuilder_ == null) { - containersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Container, com.google.cloud.securitycenter.v1.Container.Builder, com.google.cloud.securitycenter.v1.ContainerOrBuilder>( - containers_, - ((bitField0_ & 0x00000080) != 0), - getParentForChildren(), - isClean()); - containers_ = null; - } - return containersBuilder_; - } - - private com.google.cloud.securitycenter.v1.Kubernetes kubernetes_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Kubernetes, com.google.cloud.securitycenter.v1.Kubernetes.Builder, com.google.cloud.securitycenter.v1.KubernetesOrBuilder> kubernetesBuilder_; - /** - *
-     * Kubernetes resources associated with the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Kubernetes kubernetes = 43; - * @return Whether the kubernetes field is set. - */ - public boolean hasKubernetes() { - return kubernetesBuilder_ != null || kubernetes_ != null; - } - /** - *
-     * Kubernetes resources associated with the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Kubernetes kubernetes = 43; - * @return The kubernetes. - */ - public com.google.cloud.securitycenter.v1.Kubernetes getKubernetes() { - if (kubernetesBuilder_ == null) { - return kubernetes_ == null ? com.google.cloud.securitycenter.v1.Kubernetes.getDefaultInstance() : kubernetes_; - } else { - return kubernetesBuilder_.getMessage(); - } - } - /** - *
-     * Kubernetes resources associated with the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Kubernetes kubernetes = 43; - */ - public Builder setKubernetes(com.google.cloud.securitycenter.v1.Kubernetes value) { - if (kubernetesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kubernetes_ = value; - onChanged(); - } else { - kubernetesBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Kubernetes resources associated with the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Kubernetes kubernetes = 43; - */ - public Builder setKubernetes( - com.google.cloud.securitycenter.v1.Kubernetes.Builder builderForValue) { - if (kubernetesBuilder_ == null) { - kubernetes_ = builderForValue.build(); - onChanged(); - } else { - kubernetesBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Kubernetes resources associated with the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Kubernetes kubernetes = 43; - */ - public Builder mergeKubernetes(com.google.cloud.securitycenter.v1.Kubernetes value) { - if (kubernetesBuilder_ == null) { - if (kubernetes_ != null) { - kubernetes_ = - com.google.cloud.securitycenter.v1.Kubernetes.newBuilder(kubernetes_).mergeFrom(value).buildPartial(); - } else { - kubernetes_ = value; - } - onChanged(); - } else { - kubernetesBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Kubernetes resources associated with the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Kubernetes kubernetes = 43; - */ - public Builder clearKubernetes() { - if (kubernetesBuilder_ == null) { - kubernetes_ = null; - onChanged(); - } else { - kubernetes_ = null; - kubernetesBuilder_ = null; - } - - return this; - } - /** - *
-     * Kubernetes resources associated with the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Kubernetes kubernetes = 43; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.Builder getKubernetesBuilder() { - - onChanged(); - return getKubernetesFieldBuilder().getBuilder(); - } - /** - *
-     * Kubernetes resources associated with the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Kubernetes kubernetes = 43; - */ - public com.google.cloud.securitycenter.v1.KubernetesOrBuilder getKubernetesOrBuilder() { - if (kubernetesBuilder_ != null) { - return kubernetesBuilder_.getMessageOrBuilder(); - } else { - return kubernetes_ == null ? - com.google.cloud.securitycenter.v1.Kubernetes.getDefaultInstance() : kubernetes_; - } - } - /** - *
-     * Kubernetes resources associated with the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Kubernetes kubernetes = 43; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Kubernetes, com.google.cloud.securitycenter.v1.Kubernetes.Builder, com.google.cloud.securitycenter.v1.KubernetesOrBuilder> - getKubernetesFieldBuilder() { - if (kubernetesBuilder_ == null) { - kubernetesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Kubernetes, com.google.cloud.securitycenter.v1.Kubernetes.Builder, com.google.cloud.securitycenter.v1.KubernetesOrBuilder>( - getKubernetes(), - getParentForChildren(), - isClean()); - kubernetes_ = null; - } - return kubernetesBuilder_; - } - - private com.google.cloud.securitycenter.v1.Database database_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Database, com.google.cloud.securitycenter.v1.Database.Builder, com.google.cloud.securitycenter.v1.DatabaseOrBuilder> databaseBuilder_; - /** - *
-     * Database associated with the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Database database = 44; - * @return Whether the database field is set. - */ - public boolean hasDatabase() { - return databaseBuilder_ != null || database_ != null; - } - /** - *
-     * Database associated with the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Database database = 44; - * @return The database. - */ - public com.google.cloud.securitycenter.v1.Database getDatabase() { - if (databaseBuilder_ == null) { - return database_ == null ? com.google.cloud.securitycenter.v1.Database.getDefaultInstance() : database_; - } else { - return databaseBuilder_.getMessage(); - } - } - /** - *
-     * Database associated with the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Database database = 44; - */ - public Builder setDatabase(com.google.cloud.securitycenter.v1.Database value) { - if (databaseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - database_ = value; - onChanged(); - } else { - databaseBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Database associated with the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Database database = 44; - */ - public Builder setDatabase( - com.google.cloud.securitycenter.v1.Database.Builder builderForValue) { - if (databaseBuilder_ == null) { - database_ = builderForValue.build(); - onChanged(); - } else { - databaseBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Database associated with the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Database database = 44; - */ - public Builder mergeDatabase(com.google.cloud.securitycenter.v1.Database value) { - if (databaseBuilder_ == null) { - if (database_ != null) { - database_ = - com.google.cloud.securitycenter.v1.Database.newBuilder(database_).mergeFrom(value).buildPartial(); - } else { - database_ = value; - } - onChanged(); - } else { - databaseBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Database associated with the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Database database = 44; - */ - public Builder clearDatabase() { - if (databaseBuilder_ == null) { - database_ = null; - onChanged(); - } else { - database_ = null; - databaseBuilder_ = null; - } - - return this; - } - /** - *
-     * Database associated with the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Database database = 44; - */ - public com.google.cloud.securitycenter.v1.Database.Builder getDatabaseBuilder() { - - onChanged(); - return getDatabaseFieldBuilder().getBuilder(); - } - /** - *
-     * Database associated with the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Database database = 44; - */ - public com.google.cloud.securitycenter.v1.DatabaseOrBuilder getDatabaseOrBuilder() { - if (databaseBuilder_ != null) { - return databaseBuilder_.getMessageOrBuilder(); - } else { - return database_ == null ? - com.google.cloud.securitycenter.v1.Database.getDefaultInstance() : database_; - } - } - /** - *
-     * Database associated with the finding.
-     * 
- * - * .google.cloud.securitycenter.v1.Database database = 44; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Database, com.google.cloud.securitycenter.v1.Database.Builder, com.google.cloud.securitycenter.v1.DatabaseOrBuilder> - getDatabaseFieldBuilder() { - if (databaseBuilder_ == null) { - databaseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Database, com.google.cloud.securitycenter.v1.Database.Builder, com.google.cloud.securitycenter.v1.DatabaseOrBuilder>( - getDatabase(), - getParentForChildren(), - isClean()); - database_ = null; - } - return databaseBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Finding) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Finding) - private static final com.google.cloud.securitycenter.v1.Finding DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Finding(); - } - - public static com.google.cloud.securitycenter.v1.Finding getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Finding parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Finding(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Finding getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingName.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingName.java deleted file mode 100644 index d33a7fd5443e..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingName.java +++ /dev/null @@ -1,448 +0,0 @@ -/* - * Copyright 2022 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; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class FindingName implements ResourceName { - private static final PathTemplate ORGANIZATION_SOURCE_FINDING = - PathTemplate.createWithoutUrlEncoding( - "organizations/{organization}/sources/{source}/findings/{finding}"); - private static final PathTemplate FOLDER_SOURCE_FINDING = - PathTemplate.createWithoutUrlEncoding("folders/{folder}/sources/{source}/findings/{finding}"); - private static final PathTemplate PROJECT_SOURCE_FINDING = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/sources/{source}/findings/{finding}"); - private volatile Map fieldValuesMap; - private PathTemplate pathTemplate; - private String fixedValue; - private final String organization; - private final String source; - private final String finding; - private final String folder; - private final String project; - - @Deprecated - protected FindingName() { - organization = null; - source = null; - finding = null; - folder = null; - project = null; - } - - private FindingName(Builder builder) { - organization = Preconditions.checkNotNull(builder.getOrganization()); - source = Preconditions.checkNotNull(builder.getSource()); - finding = Preconditions.checkNotNull(builder.getFinding()); - folder = null; - project = null; - pathTemplate = ORGANIZATION_SOURCE_FINDING; - } - - private FindingName(FolderSourceFindingBuilder builder) { - folder = Preconditions.checkNotNull(builder.getFolder()); - source = Preconditions.checkNotNull(builder.getSource()); - finding = Preconditions.checkNotNull(builder.getFinding()); - organization = null; - project = null; - pathTemplate = FOLDER_SOURCE_FINDING; - } - - private FindingName(ProjectSourceFindingBuilder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - source = Preconditions.checkNotNull(builder.getSource()); - finding = Preconditions.checkNotNull(builder.getFinding()); - organization = null; - folder = null; - pathTemplate = PROJECT_SOURCE_FINDING; - } - - public String getOrganization() { - return organization; - } - - public String getSource() { - return source; - } - - public String getFinding() { - return finding; - } - - public String getFolder() { - return folder; - } - - public String getProject() { - return project; - } - - 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 newOrganizationSourceFindingBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static FolderSourceFindingBuilder newFolderSourceFindingBuilder() { - return new FolderSourceFindingBuilder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static ProjectSourceFindingBuilder newProjectSourceFindingBuilder() { - return new ProjectSourceFindingBuilder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static FindingName of(String organization, String source, String finding) { - return newBuilder().setOrganization(organization).setSource(source).setFinding(finding).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static FindingName ofOrganizationSourceFindingName( - String organization, String source, String finding) { - return newBuilder().setOrganization(organization).setSource(source).setFinding(finding).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static FindingName ofFolderSourceFindingName( - String folder, String source, String finding) { - return newFolderSourceFindingBuilder() - .setFolder(folder) - .setSource(source) - .setFinding(finding) - .build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static FindingName ofProjectSourceFindingName( - String project, String source, String finding) { - return newProjectSourceFindingBuilder() - .setProject(project) - .setSource(source) - .setFinding(finding) - .build(); - } - - public static String format(String organization, String source, String finding) { - return newBuilder() - .setOrganization(organization) - .setSource(source) - .setFinding(finding) - .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 newBuilder() - .setOrganization(organization) - .setSource(source) - .setFinding(finding) - .build() - .toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatFolderSourceFindingName(String folder, String source, String finding) { - return newFolderSourceFindingBuilder() - .setFolder(folder) - .setSource(source) - .setFinding(finding) - .build() - .toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatProjectSourceFindingName( - String project, String source, String finding) { - return newProjectSourceFindingBuilder() - .setProject(project) - .setSource(source) - .setFinding(finding) - .build() - .toString(); - } - - public static FindingName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - if (ORGANIZATION_SOURCE_FINDING.matches(formattedString)) { - Map matchMap = ORGANIZATION_SOURCE_FINDING.match(formattedString); - return ofOrganizationSourceFindingName( - matchMap.get("organization"), matchMap.get("source"), matchMap.get("finding")); - } else if (FOLDER_SOURCE_FINDING.matches(formattedString)) { - Map matchMap = FOLDER_SOURCE_FINDING.match(formattedString); - return ofFolderSourceFindingName( - matchMap.get("folder"), matchMap.get("source"), matchMap.get("finding")); - } else if (PROJECT_SOURCE_FINDING.matches(formattedString)) { - Map matchMap = PROJECT_SOURCE_FINDING.match(formattedString); - return ofProjectSourceFindingName( - matchMap.get("project"), matchMap.get("source"), matchMap.get("finding")); - } - throw new ValidationException("FindingName.parse: formattedString not in valid format"); - } - - 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 (FindingName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return ORGANIZATION_SOURCE_FINDING.matches(formattedString) - || FOLDER_SOURCE_FINDING.matches(formattedString) - || PROJECT_SOURCE_FINDING.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 (source != null) { - fieldMapBuilder.put("source", source); - } - if (finding != null) { - fieldMapBuilder.put("finding", finding); - } - if (folder != null) { - fieldMapBuilder.put("folder", folder); - } - if (project != null) { - fieldMapBuilder.put("project", project); - } - 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()); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - FindingName that = ((FindingName) o); - return Objects.equals(this.organization, that.organization) - && Objects.equals(this.source, that.source) - && Objects.equals(this.finding, that.finding) - && Objects.equals(this.folder, that.folder) - && Objects.equals(this.project, that.project); - } - 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(source); - h *= 1000003; - h ^= Objects.hashCode(finding); - h *= 1000003; - h ^= Objects.hashCode(folder); - h *= 1000003; - h ^= Objects.hashCode(project); - return h; - } - - /** Builder for organizations/{organization}/sources/{source}/findings/{finding}. */ - public static class Builder { - private String organization; - private String source; - private String finding; - - protected Builder() {} - - public String getOrganization() { - return organization; - } - - public String getSource() { - return source; - } - - public String getFinding() { - return finding; - } - - public Builder setOrganization(String organization) { - this.organization = organization; - return this; - } - - public Builder setSource(String source) { - this.source = source; - return this; - } - - public Builder setFinding(String finding) { - this.finding = finding; - return this; - } - - private Builder(FindingName findingName) { - Preconditions.checkArgument( - Objects.equals(findingName.pathTemplate, ORGANIZATION_SOURCE_FINDING), - "toBuilder is only supported when FindingName has the pattern of organizations/{organization}/sources/{source}/findings/{finding}"); - this.organization = findingName.organization; - this.source = findingName.source; - this.finding = findingName.finding; - } - - public FindingName build() { - return new FindingName(this); - } - } - - /** Builder for folders/{folder}/sources/{source}/findings/{finding}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class FolderSourceFindingBuilder { - private String folder; - private String source; - private String finding; - - protected FolderSourceFindingBuilder() {} - - public String getFolder() { - return folder; - } - - public String getSource() { - return source; - } - - public String getFinding() { - return finding; - } - - public FolderSourceFindingBuilder setFolder(String folder) { - this.folder = folder; - return this; - } - - public FolderSourceFindingBuilder setSource(String source) { - this.source = source; - return this; - } - - public FolderSourceFindingBuilder setFinding(String finding) { - this.finding = finding; - return this; - } - - public FindingName build() { - return new FindingName(this); - } - } - - /** Builder for projects/{project}/sources/{source}/findings/{finding}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class ProjectSourceFindingBuilder { - private String project; - private String source; - private String finding; - - protected ProjectSourceFindingBuilder() {} - - public String getProject() { - return project; - } - - public String getSource() { - return source; - } - - public String getFinding() { - return finding; - } - - public ProjectSourceFindingBuilder setProject(String project) { - this.project = project; - return this; - } - - public ProjectSourceFindingBuilder setSource(String source) { - this.source = source; - return this; - } - - public ProjectSourceFindingBuilder setFinding(String finding) { - this.finding = finding; - return this; - } - - public FindingName build() { - return new FindingName(this); - } - } -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOrBuilder.java deleted file mode 100644 index fde3cfa5b563..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOrBuilder.java +++ /dev/null @@ -1,1157 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/finding.proto - -package com.google.cloud.securitycenter.v1; - -public interface FindingOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Finding) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The relative resource name of this finding. See:
-   * https://cloud.google.com/apis/design/resource_names#relative_resource_name
-   * Example:
-   * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}"
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The relative resource name of this finding. See:
-   * https://cloud.google.com/apis/design/resource_names#relative_resource_name
-   * Example:
-   * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}"
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The relative resource name of the source the finding belongs to. See:
-   * https://cloud.google.com/apis/design/resource_names#relative_resource_name
-   * This field is immutable after creation time.
-   * For example:
-   * "organizations/{organization_id}/sources/{source_id}"
-   * 
- * - * string parent = 2; - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * The relative resource name of the source the finding belongs to. See:
-   * https://cloud.google.com/apis/design/resource_names#relative_resource_name
-   * This field is immutable after creation time.
-   * For example:
-   * "organizations/{organization_id}/sources/{source_id}"
-   * 
- * - * string parent = 2; - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * For findings on Google Cloud resources, the full resource
-   * name of the Google Cloud resource this finding is for. See:
-   * https://cloud.google.com/apis/design/resource_names#full_resource_name
-   * When the finding is for a non-Google Cloud resource, the resourceName can
-   * be a customer or partner defined string. This field is immutable after
-   * creation time.
-   * 
- * - * string resource_name = 3; - * @return The resourceName. - */ - java.lang.String getResourceName(); - /** - *
-   * For findings on Google Cloud resources, the full resource
-   * name of the Google Cloud resource this finding is for. See:
-   * https://cloud.google.com/apis/design/resource_names#full_resource_name
-   * When the finding is for a non-Google Cloud resource, the resourceName can
-   * be a customer or partner defined string. This field is immutable after
-   * creation time.
-   * 
- * - * string resource_name = 3; - * @return The bytes for resourceName. - */ - com.google.protobuf.ByteString - getResourceNameBytes(); - - /** - *
-   * The state of the finding.
-   * 
- * - * .google.cloud.securitycenter.v1.Finding.State state = 4; - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - *
-   * The state of the finding.
-   * 
- * - * .google.cloud.securitycenter.v1.Finding.State state = 4; - * @return The state. - */ - com.google.cloud.securitycenter.v1.Finding.State getState(); - - /** - *
-   * The additional taxonomy group within findings from a given source.
-   * This field is immutable after creation time.
-   * Example: "XSS_FLASH_INJECTION"
-   * 
- * - * string category = 5; - * @return The category. - */ - java.lang.String getCategory(); - /** - *
-   * The additional taxonomy group within findings from a given source.
-   * This field is immutable after creation time.
-   * Example: "XSS_FLASH_INJECTION"
-   * 
- * - * string category = 5; - * @return The bytes for category. - */ - com.google.protobuf.ByteString - getCategoryBytes(); - - /** - *
-   * The URI that, if available, points to a web page outside of Security
-   * Command Center where additional information about the finding can be found.
-   * This field is guaranteed to be either empty or a well formed URL.
-   * 
- * - * string external_uri = 6; - * @return The externalUri. - */ - java.lang.String getExternalUri(); - /** - *
-   * The URI that, if available, points to a web page outside of Security
-   * Command Center where additional information about the finding can be found.
-   * This field is guaranteed to be either empty or a well formed URL.
-   * 
- * - * string external_uri = 6; - * @return The bytes for externalUri. - */ - com.google.protobuf.ByteString - getExternalUriBytes(); - - /** - *
-   * Source specific properties. These properties are managed by the source
-   * that writes the finding. The key names in the source_properties map must be
-   * between 1 and 255 characters, and must start with a letter and contain
-   * alphanumeric characters or underscores only.
-   * 
- * - * map<string, .google.protobuf.Value> source_properties = 7; - */ - int getSourcePropertiesCount(); - /** - *
-   * Source specific properties. These properties are managed by the source
-   * that writes the finding. The key names in the source_properties map must be
-   * between 1 and 255 characters, and must start with a letter and contain
-   * alphanumeric characters or underscores only.
-   * 
- * - * map<string, .google.protobuf.Value> source_properties = 7; - */ - boolean containsSourceProperties( - java.lang.String key); - /** - * Use {@link #getSourcePropertiesMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getSourceProperties(); - /** - *
-   * Source specific properties. These properties are managed by the source
-   * that writes the finding. The key names in the source_properties map must be
-   * between 1 and 255 characters, and must start with a letter and contain
-   * alphanumeric characters or underscores only.
-   * 
- * - * map<string, .google.protobuf.Value> source_properties = 7; - */ - java.util.Map - getSourcePropertiesMap(); - /** - *
-   * Source specific properties. These properties are managed by the source
-   * that writes the finding. The key names in the source_properties map must be
-   * between 1 and 255 characters, and must start with a letter and contain
-   * alphanumeric characters or underscores only.
-   * 
- * - * map<string, .google.protobuf.Value> source_properties = 7; - */ - - /* nullable */ -com.google.protobuf.Value getSourcePropertiesOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Value defaultValue); - /** - *
-   * Source specific properties. These properties are managed by the source
-   * that writes the finding. The key names in the source_properties map must be
-   * between 1 and 255 characters, and must start with a letter and contain
-   * alphanumeric characters or underscores only.
-   * 
- * - * map<string, .google.protobuf.Value> source_properties = 7; - */ - - com.google.protobuf.Value getSourcePropertiesOrThrow( - java.lang.String key); - - /** - *
-   * Output only. User specified security marks. These marks are entirely
-   * managed by the user and come from the SecurityMarks resource that belongs
-   * to the finding.
-   * 
- * - * .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the securityMarks field is set. - */ - boolean hasSecurityMarks(); - /** - *
-   * Output only. User specified security marks. These marks are entirely
-   * managed by the user and come from the SecurityMarks resource that belongs
-   * to the finding.
-   * 
- * - * .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The securityMarks. - */ - com.google.cloud.securitycenter.v1.SecurityMarks getSecurityMarks(); - /** - *
-   * Output only. User specified security marks. These marks are entirely
-   * managed by the user and come from the SecurityMarks resource that belongs
-   * to the finding.
-   * 
- * - * .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.cloud.securitycenter.v1.SecurityMarksOrBuilder getSecurityMarksOrBuilder(); - - /** - *
-   * The time the finding was first detected. If an existing finding is updated,
-   * then this is the time the update occurred.
-   * For example, if the finding represents an open firewall, this property
-   * captures the time the detector believes the firewall became open. The
-   * accuracy is determined by the detector. If the finding is later resolved,
-   * then this time reflects when the finding was resolved. This must not
-   * be set to a value greater than the current timestamp.
-   * 
- * - * .google.protobuf.Timestamp event_time = 9; - * @return Whether the eventTime field is set. - */ - boolean hasEventTime(); - /** - *
-   * The time the finding was first detected. If an existing finding is updated,
-   * then this is the time the update occurred.
-   * For example, if the finding represents an open firewall, this property
-   * captures the time the detector believes the firewall became open. The
-   * accuracy is determined by the detector. If the finding is later resolved,
-   * then this time reflects when the finding was resolved. This must not
-   * be set to a value greater than the current timestamp.
-   * 
- * - * .google.protobuf.Timestamp event_time = 9; - * @return The eventTime. - */ - com.google.protobuf.Timestamp getEventTime(); - /** - *
-   * The time the finding was first detected. If an existing finding is updated,
-   * then this is the time the update occurred.
-   * For example, if the finding represents an open firewall, this property
-   * captures the time the detector believes the firewall became open. The
-   * accuracy is determined by the detector. If the finding is later resolved,
-   * then this time reflects when the finding was resolved. This must not
-   * be set to a value greater than the current timestamp.
-   * 
- * - * .google.protobuf.Timestamp event_time = 9; - */ - com.google.protobuf.TimestampOrBuilder getEventTimeOrBuilder(); - - /** - *
-   * The time at which the finding was created in Security Command Center.
-   * 
- * - * .google.protobuf.Timestamp create_time = 10; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * The time at which the finding was created in Security Command Center.
-   * 
- * - * .google.protobuf.Timestamp create_time = 10; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * The time at which the finding was created in Security Command Center.
-   * 
- * - * .google.protobuf.Timestamp create_time = 10; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * The severity of the finding. This field is managed by the source that
-   * writes the finding.
-   * 
- * - * .google.cloud.securitycenter.v1.Finding.Severity severity = 12; - * @return The enum numeric value on the wire for severity. - */ - int getSeverityValue(); - /** - *
-   * The severity of the finding. This field is managed by the source that
-   * writes the finding.
-   * 
- * - * .google.cloud.securitycenter.v1.Finding.Severity severity = 12; - * @return The severity. - */ - com.google.cloud.securitycenter.v1.Finding.Severity getSeverity(); - - /** - *
-   * The canonical name of the finding. It's either
-   * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}",
-   * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}" or
-   * "projects/{project_number}/sources/{source_id}/findings/{finding_id}",
-   * depending on the closest CRM ancestor of the resource associated with the
-   * finding.
-   * 
- * - * string canonical_name = 14; - * @return The canonicalName. - */ - java.lang.String getCanonicalName(); - /** - *
-   * The canonical name of the finding. It's either
-   * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}",
-   * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}" or
-   * "projects/{project_number}/sources/{source_id}/findings/{finding_id}",
-   * depending on the closest CRM ancestor of the resource associated with the
-   * finding.
-   * 
- * - * string canonical_name = 14; - * @return The bytes for canonicalName. - */ - com.google.protobuf.ByteString - getCanonicalNameBytes(); - - /** - *
-   * Indicates the mute state of a finding (either muted, unmuted
-   * or undefined). Unlike other attributes of a finding, a finding provider
-   * shouldn't set the value of mute.
-   * 
- * - * .google.cloud.securitycenter.v1.Finding.Mute mute = 15; - * @return The enum numeric value on the wire for mute. - */ - int getMuteValue(); - /** - *
-   * Indicates the mute state of a finding (either muted, unmuted
-   * or undefined). Unlike other attributes of a finding, a finding provider
-   * shouldn't set the value of mute.
-   * 
- * - * .google.cloud.securitycenter.v1.Finding.Mute mute = 15; - * @return The mute. - */ - com.google.cloud.securitycenter.v1.Finding.Mute getMute(); - - /** - *
-   * The class of the finding.
-   * 
- * - * .google.cloud.securitycenter.v1.Finding.FindingClass finding_class = 17; - * @return The enum numeric value on the wire for findingClass. - */ - int getFindingClassValue(); - /** - *
-   * The class of the finding.
-   * 
- * - * .google.cloud.securitycenter.v1.Finding.FindingClass finding_class = 17; - * @return The findingClass. - */ - com.google.cloud.securitycenter.v1.Finding.FindingClass getFindingClass(); - - /** - *
-   * Represents what's commonly known as an Indicator of compromise (IoC) in
-   * computer forensics. This is an artifact observed on a network or in an
-   * operating system that, with high confidence, indicates a computer
-   * intrusion.
-   * Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise
-   * 
- * - * .google.cloud.securitycenter.v1.Indicator indicator = 18; - * @return Whether the indicator field is set. - */ - boolean hasIndicator(); - /** - *
-   * Represents what's commonly known as an Indicator of compromise (IoC) in
-   * computer forensics. This is an artifact observed on a network or in an
-   * operating system that, with high confidence, indicates a computer
-   * intrusion.
-   * Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise
-   * 
- * - * .google.cloud.securitycenter.v1.Indicator indicator = 18; - * @return The indicator. - */ - com.google.cloud.securitycenter.v1.Indicator getIndicator(); - /** - *
-   * Represents what's commonly known as an Indicator of compromise (IoC) in
-   * computer forensics. This is an artifact observed on a network or in an
-   * operating system that, with high confidence, indicates a computer
-   * intrusion.
-   * Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise
-   * 
- * - * .google.cloud.securitycenter.v1.Indicator indicator = 18; - */ - com.google.cloud.securitycenter.v1.IndicatorOrBuilder getIndicatorOrBuilder(); - - /** - *
-   * Represents vulnerability specific fields like cve, cvss scores etc.
-   * CVE stands for Common Vulnerabilities and Exposures
-   * (https://cve.mitre.org/about/)
-   * 
- * - * .google.cloud.securitycenter.v1.Vulnerability vulnerability = 20; - * @return Whether the vulnerability field is set. - */ - boolean hasVulnerability(); - /** - *
-   * Represents vulnerability specific fields like cve, cvss scores etc.
-   * CVE stands for Common Vulnerabilities and Exposures
-   * (https://cve.mitre.org/about/)
-   * 
- * - * .google.cloud.securitycenter.v1.Vulnerability vulnerability = 20; - * @return The vulnerability. - */ - com.google.cloud.securitycenter.v1.Vulnerability getVulnerability(); - /** - *
-   * Represents vulnerability specific fields like cve, cvss scores etc.
-   * CVE stands for Common Vulnerabilities and Exposures
-   * (https://cve.mitre.org/about/)
-   * 
- * - * .google.cloud.securitycenter.v1.Vulnerability vulnerability = 20; - */ - com.google.cloud.securitycenter.v1.VulnerabilityOrBuilder getVulnerabilityOrBuilder(); - - /** - *
-   * Output only. The most recent time this finding was muted or unmuted.
-   * 
- * - * .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the muteUpdateTime field is set. - */ - boolean hasMuteUpdateTime(); - /** - *
-   * Output only. The most recent time this finding was muted or unmuted.
-   * 
- * - * .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The muteUpdateTime. - */ - com.google.protobuf.Timestamp getMuteUpdateTime(); - /** - *
-   * Output only. The most recent time this finding was muted or unmuted.
-   * 
- * - * .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getMuteUpdateTimeOrBuilder(); - - /** - *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external
-   * system information and external system finding fields.
-   * 
- * - * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - int getExternalSystemsCount(); - /** - *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external
-   * system information and external system finding fields.
-   * 
- * - * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - boolean containsExternalSystems( - java.lang.String key); - /** - * Use {@link #getExternalSystemsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getExternalSystems(); - /** - *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external
-   * system information and external system finding fields.
-   * 
- * - * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - java.util.Map - getExternalSystemsMap(); - /** - *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external
-   * system information and external system finding fields.
-   * 
- * - * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - - /* nullable */ -com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrDefault( - java.lang.String key, - /* nullable */ -com.google.cloud.securitycenter.v1.ExternalSystem defaultValue); - /** - *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external
-   * system information and external system finding fields.
-   * 
- * - * map<string, .google.cloud.securitycenter.v1.ExternalSystem> external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - - com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrThrow( - java.lang.String key); - - /** - *
-   * MITRE ATT&CK tactics and techniques related to this finding.
-   * See: https://attack.mitre.org
-   * 
- * - * .google.cloud.securitycenter.v1.MitreAttack mitre_attack = 25; - * @return Whether the mitreAttack field is set. - */ - boolean hasMitreAttack(); - /** - *
-   * MITRE ATT&CK tactics and techniques related to this finding.
-   * See: https://attack.mitre.org
-   * 
- * - * .google.cloud.securitycenter.v1.MitreAttack mitre_attack = 25; - * @return The mitreAttack. - */ - com.google.cloud.securitycenter.v1.MitreAttack getMitreAttack(); - /** - *
-   * MITRE ATT&CK tactics and techniques related to this finding.
-   * See: https://attack.mitre.org
-   * 
- * - * .google.cloud.securitycenter.v1.MitreAttack mitre_attack = 25; - */ - com.google.cloud.securitycenter.v1.MitreAttackOrBuilder getMitreAttackOrBuilder(); - - /** - *
-   * Access details associated to the Finding, such as more information on the
-   * caller, which method was accessed, from where, etc.
-   * 
- * - * .google.cloud.securitycenter.v1.Access access = 26; - * @return Whether the access field is set. - */ - boolean hasAccess(); - /** - *
-   * Access details associated to the Finding, such as more information on the
-   * caller, which method was accessed, from where, etc.
-   * 
- * - * .google.cloud.securitycenter.v1.Access access = 26; - * @return The access. - */ - com.google.cloud.securitycenter.v1.Access getAccess(); - /** - *
-   * Access details associated to the Finding, such as more information on the
-   * caller, which method was accessed, from where, etc.
-   * 
- * - * .google.cloud.securitycenter.v1.Access access = 26; - */ - com.google.cloud.securitycenter.v1.AccessOrBuilder getAccessOrBuilder(); - - /** - *
-   * Contains information about the IP connection associated with the finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Connection connections = 31; - */ - java.util.List - getConnectionsList(); - /** - *
-   * Contains information about the IP connection associated with the finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Connection connections = 31; - */ - com.google.cloud.securitycenter.v1.Connection getConnections(int index); - /** - *
-   * Contains information about the IP connection associated with the finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Connection connections = 31; - */ - int getConnectionsCount(); - /** - *
-   * Contains information about the IP connection associated with the finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Connection connections = 31; - */ - java.util.List - getConnectionsOrBuilderList(); - /** - *
-   * Contains information about the IP connection associated with the finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Connection connections = 31; - */ - com.google.cloud.securitycenter.v1.ConnectionOrBuilder getConnectionsOrBuilder( - int index); - - /** - *
-   * First known as mute_annotation. Records additional information about the
-   * mute operation e.g. mute config that muted the finding, user who muted the
-   * finding, etc. Unlike other attributes of a finding, a finding provider
-   * shouldn't set the value of mute.
-   * 
- * - * string mute_initiator = 28; - * @return The muteInitiator. - */ - java.lang.String getMuteInitiator(); - /** - *
-   * First known as mute_annotation. Records additional information about the
-   * mute operation e.g. mute config that muted the finding, user who muted the
-   * finding, etc. Unlike other attributes of a finding, a finding provider
-   * shouldn't set the value of mute.
-   * 
- * - * string mute_initiator = 28; - * @return The bytes for muteInitiator. - */ - com.google.protobuf.ByteString - getMuteInitiatorBytes(); - - /** - *
-   * Represents operating system processes associated with the Finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Process processes = 30; - */ - java.util.List - getProcessesList(); - /** - *
-   * Represents operating system processes associated with the Finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Process processes = 30; - */ - com.google.cloud.securitycenter.v1.Process getProcesses(int index); - /** - *
-   * Represents operating system processes associated with the Finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Process processes = 30; - */ - int getProcessesCount(); - /** - *
-   * Represents operating system processes associated with the Finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Process processes = 30; - */ - java.util.List - getProcessesOrBuilderList(); - /** - *
-   * Represents operating system processes associated with the Finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Process processes = 30; - */ - com.google.cloud.securitycenter.v1.ProcessOrBuilder getProcessesOrBuilder( - int index); - - /** - *
-   * Output only. Map containing the point of contacts for the given finding.
-   * The key represents the type of contact, while the value contains a list of
-   * all the contacts that pertain. Please refer to:
-   * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
-   *     {
-   *       "security": {
-   *         "contacts": [
-   *           {
-   *             "email": "person1@company.com"
-   *           },
-   *           {
-   *             "email": "person2@company.com"
-   *           }
-   *         ]
-   *       }
-   *     }
-   * 
- * - * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - int getContactsCount(); - /** - *
-   * Output only. Map containing the point of contacts for the given finding.
-   * The key represents the type of contact, while the value contains a list of
-   * all the contacts that pertain. Please refer to:
-   * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
-   *     {
-   *       "security": {
-   *         "contacts": [
-   *           {
-   *             "email": "person1@company.com"
-   *           },
-   *           {
-   *             "email": "person2@company.com"
-   *           }
-   *         ]
-   *       }
-   *     }
-   * 
- * - * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - boolean containsContacts( - java.lang.String key); - /** - * Use {@link #getContactsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getContacts(); - /** - *
-   * Output only. Map containing the point of contacts for the given finding.
-   * The key represents the type of contact, while the value contains a list of
-   * all the contacts that pertain. Please refer to:
-   * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
-   *     {
-   *       "security": {
-   *         "contacts": [
-   *           {
-   *             "email": "person1@company.com"
-   *           },
-   *           {
-   *             "email": "person2@company.com"
-   *           }
-   *         ]
-   *       }
-   *     }
-   * 
- * - * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - java.util.Map - getContactsMap(); - /** - *
-   * Output only. Map containing the point of contacts for the given finding.
-   * The key represents the type of contact, while the value contains a list of
-   * all the contacts that pertain. Please refer to:
-   * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
-   *     {
-   *       "security": {
-   *         "contacts": [
-   *           {
-   *             "email": "person1@company.com"
-   *           },
-   *           {
-   *             "email": "person2@company.com"
-   *           }
-   *         ]
-   *       }
-   *     }
-   * 
- * - * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - - /* nullable */ -com.google.cloud.securitycenter.v1.ContactDetails getContactsOrDefault( - java.lang.String key, - /* nullable */ -com.google.cloud.securitycenter.v1.ContactDetails defaultValue); - /** - *
-   * Output only. Map containing the point of contacts for the given finding.
-   * The key represents the type of contact, while the value contains a list of
-   * all the contacts that pertain. Please refer to:
-   * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
-   *     {
-   *       "security": {
-   *         "contacts": [
-   *           {
-   *             "email": "person1@company.com"
-   *           },
-   *           {
-   *             "email": "person2@company.com"
-   *           }
-   *         ]
-   *       }
-   *     }
-   * 
- * - * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - - com.google.cloud.securitycenter.v1.ContactDetails getContactsOrThrow( - java.lang.String key); - - /** - *
-   * Contains compliance information for security standards associated to the
-   * finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; - */ - java.util.List - getCompliancesList(); - /** - *
-   * Contains compliance information for security standards associated to the
-   * finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; - */ - com.google.cloud.securitycenter.v1.Compliance getCompliances(int index); - /** - *
-   * Contains compliance information for security standards associated to the
-   * finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; - */ - int getCompliancesCount(); - /** - *
-   * Contains compliance information for security standards associated to the
-   * finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; - */ - java.util.List - getCompliancesOrBuilderList(); - /** - *
-   * Contains compliance information for security standards associated to the
-   * finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; - */ - com.google.cloud.securitycenter.v1.ComplianceOrBuilder getCompliancesOrBuilder( - int index); - - /** - *
-   * Contains more detail about the finding.
-   * 
- * - * string description = 37; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * Contains more detail about the finding.
-   * 
- * - * string description = 37; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * Represents exfiltration associated with the Finding.
-   * 
- * - * .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; - * @return Whether the exfiltration field is set. - */ - boolean hasExfiltration(); - /** - *
-   * Represents exfiltration associated with the Finding.
-   * 
- * - * .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; - * @return The exfiltration. - */ - com.google.cloud.securitycenter.v1.Exfiltration getExfiltration(); - /** - *
-   * Represents exfiltration associated with the Finding.
-   * 
- * - * .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; - */ - com.google.cloud.securitycenter.v1.ExfiltrationOrBuilder getExfiltrationOrBuilder(); - - /** - *
-   * Represents IAM bindings associated with the Finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; - */ - java.util.List - getIamBindingsList(); - /** - *
-   * Represents IAM bindings associated with the Finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; - */ - com.google.cloud.securitycenter.v1.IamBinding getIamBindings(int index); - /** - *
-   * Represents IAM bindings associated with the Finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; - */ - int getIamBindingsCount(); - /** - *
-   * Represents IAM bindings associated with the Finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; - */ - java.util.List - getIamBindingsOrBuilderList(); - /** - *
-   * Represents IAM bindings associated with the Finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; - */ - com.google.cloud.securitycenter.v1.IamBindingOrBuilder getIamBindingsOrBuilder( - int index); - - /** - *
-   * Next steps associate to the finding.
-   * 
- * - * string next_steps = 40; - * @return The nextSteps. - */ - java.lang.String getNextSteps(); - /** - *
-   * Next steps associate to the finding.
-   * 
- * - * string next_steps = 40; - * @return The bytes for nextSteps. - */ - com.google.protobuf.ByteString - getNextStepsBytes(); - - /** - *
-   * Containers associated with the finding. containers provides information
-   * for both Kubernetes and non-Kubernetes containers.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 42; - */ - java.util.List - getContainersList(); - /** - *
-   * Containers associated with the finding. containers provides information
-   * for both Kubernetes and non-Kubernetes containers.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 42; - */ - com.google.cloud.securitycenter.v1.Container getContainers(int index); - /** - *
-   * Containers associated with the finding. containers provides information
-   * for both Kubernetes and non-Kubernetes containers.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 42; - */ - int getContainersCount(); - /** - *
-   * Containers associated with the finding. containers provides information
-   * for both Kubernetes and non-Kubernetes containers.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 42; - */ - java.util.List - getContainersOrBuilderList(); - /** - *
-   * Containers associated with the finding. containers provides information
-   * for both Kubernetes and non-Kubernetes containers.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 42; - */ - com.google.cloud.securitycenter.v1.ContainerOrBuilder getContainersOrBuilder( - int index); - - /** - *
-   * Kubernetes resources associated with the finding.
-   * 
- * - * .google.cloud.securitycenter.v1.Kubernetes kubernetes = 43; - * @return Whether the kubernetes field is set. - */ - boolean hasKubernetes(); - /** - *
-   * Kubernetes resources associated with the finding.
-   * 
- * - * .google.cloud.securitycenter.v1.Kubernetes kubernetes = 43; - * @return The kubernetes. - */ - com.google.cloud.securitycenter.v1.Kubernetes getKubernetes(); - /** - *
-   * Kubernetes resources associated with the finding.
-   * 
- * - * .google.cloud.securitycenter.v1.Kubernetes kubernetes = 43; - */ - com.google.cloud.securitycenter.v1.KubernetesOrBuilder getKubernetesOrBuilder(); - - /** - *
-   * Database associated with the finding.
-   * 
- * - * .google.cloud.securitycenter.v1.Database database = 44; - * @return Whether the database field is set. - */ - boolean hasDatabase(); - /** - *
-   * Database associated with the finding.
-   * 
- * - * .google.cloud.securitycenter.v1.Database database = 44; - * @return The database. - */ - com.google.cloud.securitycenter.v1.Database getDatabase(); - /** - *
-   * Database associated with the finding.
-   * 
- * - * .google.cloud.securitycenter.v1.Database database = 44; - */ - com.google.cloud.securitycenter.v1.DatabaseOrBuilder getDatabaseOrBuilder(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOuterClass.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOuterClass.java deleted file mode 100644 index 36f74e98869f..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOuterClass.java +++ /dev/null @@ -1,216 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/finding.proto - -package com.google.cloud.securitycenter.v1; - -public final class FindingOuterClass { - private FindingOuterClass() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_Finding_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_Finding_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_Finding_SourcePropertiesEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_Finding_SourcePropertiesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_Finding_ExternalSystemsEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_Finding_ExternalSystemsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_Finding_ContactsEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_Finding_ContactsEntry_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n,google/cloud/securitycenter/v1/finding" + - ".proto\022\036google.cloud.securitycenter.v1\032\037" + - "google/api/field_behavior.proto\032\031google/" + - "api/resource.proto\032+google/cloud/securit" + - "ycenter/v1/access.proto\032/google/cloud/se" + - "curitycenter/v1/compliance.proto\032/google" + - "/cloud/securitycenter/v1/connection.prot" + - "o\0324google/cloud/securitycenter/v1/contac" + - "t_details.proto\032.google/cloud/securityce" + - "nter/v1/container.proto\032-google/cloud/se" + - "curitycenter/v1/database.proto\0321google/c" + - "loud/securitycenter/v1/exfiltration.prot" + - "o\0324google/cloud/securitycenter/v1/extern" + - "al_system.proto\0320google/cloud/securityce" + - "nter/v1/iam_binding.proto\032.google/cloud/" + - "securitycenter/v1/indicator.proto\032/googl" + - "e/cloud/securitycenter/v1/kubernetes.pro" + - "to\0321google/cloud/securitycenter/v1/mitre" + - "_attack.proto\032,google/cloud/securitycent" + - "er/v1/process.proto\0323google/cloud/securi" + - "tycenter/v1/security_marks.proto\0322google" + - "/cloud/securitycenter/v1/vulnerability.p" + - "roto\032\034google/protobuf/struct.proto\032\037goog" + - "le/protobuf/timestamp.proto\"\204\024\n\007Finding\022" + - "\014\n\004name\030\001 \001(\t\022\016\n\006parent\030\002 \001(\t\022\025\n\rresourc" + - "e_name\030\003 \001(\t\022<\n\005state\030\004 \001(\0162-.google.clo" + - "ud.securitycenter.v1.Finding.State\022\020\n\010ca" + - "tegory\030\005 \001(\t\022\024\n\014external_uri\030\006 \001(\t\022X\n\021so" + - "urce_properties\030\007 \003(\0132=.google.cloud.sec" + - "uritycenter.v1.Finding.SourcePropertiesE" + - "ntry\022J\n\016security_marks\030\010 \001(\0132-.google.cl" + - "oud.securitycenter.v1.SecurityMarksB\003\340A\003" + - "\022.\n\nevent_time\030\t \001(\0132\032.google.protobuf.T" + - "imestamp\022/\n\013create_time\030\n \001(\0132\032.google.p" + - "rotobuf.Timestamp\022B\n\010severity\030\014 \001(\01620.go" + - "ogle.cloud.securitycenter.v1.Finding.Sev" + - "erity\022\026\n\016canonical_name\030\016 \001(\t\022:\n\004mute\030\017 " + - "\001(\0162,.google.cloud.securitycenter.v1.Fin" + - "ding.Mute\022K\n\rfinding_class\030\021 \001(\01624.googl" + - "e.cloud.securitycenter.v1.Finding.Findin" + - "gClass\022<\n\tindicator\030\022 \001(\0132).google.cloud" + - ".securitycenter.v1.Indicator\022D\n\rvulnerab" + - "ility\030\024 \001(\0132-.google.cloud.securitycente" + - "r.v1.Vulnerability\0229\n\020mute_update_time\030\025" + - " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022[\n" + - "\020external_systems\030\026 \003(\0132<.google.cloud.s" + - "ecuritycenter.v1.Finding.ExternalSystems" + - "EntryB\003\340A\003\022A\n\014mitre_attack\030\031 \001(\0132+.googl" + - "e.cloud.securitycenter.v1.MitreAttack\0226\n" + - "\006access\030\032 \001(\0132&.google.cloud.securitycen" + - "ter.v1.Access\022?\n\013connections\030\037 \003(\0132*.goo" + - "gle.cloud.securitycenter.v1.Connection\022\026" + - "\n\016mute_initiator\030\034 \001(\t\022:\n\tprocesses\030\036 \003(" + - "\0132\'.google.cloud.securitycenter.v1.Proce" + - "ss\022L\n\010contacts\030! \003(\01325.google.cloud.secu" + - "ritycenter.v1.Finding.ContactsEntryB\003\340A\003" + - "\022?\n\013compliances\030\" \003(\0132*.google.cloud.sec" + - "uritycenter.v1.Compliance\022\023\n\013description" + - "\030% \001(\t\022B\n\014exfiltration\030& \001(\0132,.google.cl" + - "oud.securitycenter.v1.Exfiltration\022@\n\014ia" + - "m_bindings\030\' \003(\0132*.google.cloud.security" + - "center.v1.IamBinding\022\022\n\nnext_steps\030( \001(\t" + - "\022=\n\ncontainers\030* \003(\0132).google.cloud.secu" + - "ritycenter.v1.Container\022>\n\nkubernetes\030+ " + - "\001(\0132*.google.cloud.securitycenter.v1.Kub" + - "ernetes\022:\n\010database\030, \001(\0132(.google.cloud" + - ".securitycenter.v1.Database\032O\n\025SourcePro" + - "pertiesEntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(\013" + - "2\026.google.protobuf.Value:\0028\001\032f\n\024External" + - "SystemsEntry\022\013\n\003key\030\001 \001(\t\022=\n\005value\030\002 \001(\013" + - "2..google.cloud.securitycenter.v1.Extern" + - "alSystem:\0028\001\032_\n\rContactsEntry\022\013\n\003key\030\001 \001" + - "(\t\022=\n\005value\030\002 \001(\0132..google.cloud.securit" + - "ycenter.v1.ContactDetails:\0028\001\"8\n\005State\022\025" + - "\n\021STATE_UNSPECIFIED\020\000\022\n\n\006ACTIVE\020\001\022\014\n\010INA" + - "CTIVE\020\002\"Q\n\010Severity\022\030\n\024SEVERITY_UNSPECIF" + - "IED\020\000\022\014\n\010CRITICAL\020\001\022\010\n\004HIGH\020\002\022\n\n\006MEDIUM\020" + - "\003\022\007\n\003LOW\020\004\"C\n\004Mute\022\024\n\020MUTE_UNSPECIFIED\020\000" + - "\022\t\n\005MUTED\020\001\022\013\n\007UNMUTED\020\002\022\r\n\tUNDEFINED\020\004\"" + - "\202\001\n\014FindingClass\022\035\n\031FINDING_CLASS_UNSPEC" + - "IFIED\020\000\022\n\n\006THREAT\020\001\022\021\n\rVULNERABILITY\020\002\022\024" + - "\n\020MISCONFIGURATION\020\003\022\017\n\013OBSERVATION\020\004\022\r\n" + - "\tSCC_ERROR\020\005:\333\001\352A\327\001\n%securitycenter.goog" + - "leapis.com/Finding\022@organizations/{organ" + - "ization}/sources/{source}/findings/{find" + - "ing}\0224folders/{folder}/sources/{source}/" + - "findings/{finding}\0226projects/{project}/s" + - "ources/{source}/findings/{finding}B\332\001\n\"c" + - "om.google.cloud.securitycenter.v1P\001ZLgoo" + - "gle.golang.org/genproto/googleapis/cloud" + - "/securitycenter/v1;securitycenter\252\002\036Goog" + - "le.Cloud.SecurityCenter.V1\312\002\036Google\\Clou" + - "d\\SecurityCenter\\V1\352\002!Google::Cloud::Sec" + - "urityCenter::V1b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.api.ResourceProto.getDescriptor(), - com.google.cloud.securitycenter.v1.AccessProto.getDescriptor(), - com.google.cloud.securitycenter.v1.ComplianceProto.getDescriptor(), - com.google.cloud.securitycenter.v1.ConnectionProto.getDescriptor(), - com.google.cloud.securitycenter.v1.ContactDetailsProto.getDescriptor(), - com.google.cloud.securitycenter.v1.ContainerProto.getDescriptor(), - com.google.cloud.securitycenter.v1.DatabaseProto.getDescriptor(), - com.google.cloud.securitycenter.v1.ExfiltrationProto.getDescriptor(), - com.google.cloud.securitycenter.v1.ExternalSystemProto.getDescriptor(), - com.google.cloud.securitycenter.v1.IamBindingProto.getDescriptor(), - com.google.cloud.securitycenter.v1.IndicatorProto.getDescriptor(), - com.google.cloud.securitycenter.v1.KubernetesProto.getDescriptor(), - com.google.cloud.securitycenter.v1.MitreAttackProto.getDescriptor(), - com.google.cloud.securitycenter.v1.ProcessProto.getDescriptor(), - com.google.cloud.securitycenter.v1.SecurityMarksOuterClass.getDescriptor(), - com.google.cloud.securitycenter.v1.VulnerabilityProto.getDescriptor(), - com.google.protobuf.StructProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_securitycenter_v1_Finding_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_securitycenter_v1_Finding_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_Finding_descriptor, - new java.lang.String[] { "Name", "Parent", "ResourceName", "State", "Category", "ExternalUri", "SourceProperties", "SecurityMarks", "EventTime", "CreateTime", "Severity", "CanonicalName", "Mute", "FindingClass", "Indicator", "Vulnerability", "MuteUpdateTime", "ExternalSystems", "MitreAttack", "Access", "Connections", "MuteInitiator", "Processes", "Contacts", "Compliances", "Description", "Exfiltration", "IamBindings", "NextSteps", "Containers", "Kubernetes", "Database", }); - internal_static_google_cloud_securitycenter_v1_Finding_SourcePropertiesEntry_descriptor = - internal_static_google_cloud_securitycenter_v1_Finding_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_securitycenter_v1_Finding_SourcePropertiesEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_Finding_SourcePropertiesEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_google_cloud_securitycenter_v1_Finding_ExternalSystemsEntry_descriptor = - internal_static_google_cloud_securitycenter_v1_Finding_descriptor.getNestedTypes().get(1); - internal_static_google_cloud_securitycenter_v1_Finding_ExternalSystemsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_Finding_ExternalSystemsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_google_cloud_securitycenter_v1_Finding_ContactsEntry_descriptor = - internal_static_google_cloud_securitycenter_v1_Finding_descriptor.getNestedTypes().get(2); - internal_static_google_cloud_securitycenter_v1_Finding_ContactsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_Finding_ContactsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.ResourceProto.resource); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.cloud.securitycenter.v1.AccessProto.getDescriptor(); - com.google.cloud.securitycenter.v1.ComplianceProto.getDescriptor(); - com.google.cloud.securitycenter.v1.ConnectionProto.getDescriptor(); - com.google.cloud.securitycenter.v1.ContactDetailsProto.getDescriptor(); - com.google.cloud.securitycenter.v1.ContainerProto.getDescriptor(); - com.google.cloud.securitycenter.v1.DatabaseProto.getDescriptor(); - com.google.cloud.securitycenter.v1.ExfiltrationProto.getDescriptor(); - com.google.cloud.securitycenter.v1.ExternalSystemProto.getDescriptor(); - com.google.cloud.securitycenter.v1.IamBindingProto.getDescriptor(); - com.google.cloud.securitycenter.v1.IndicatorProto.getDescriptor(); - com.google.cloud.securitycenter.v1.KubernetesProto.getDescriptor(); - com.google.cloud.securitycenter.v1.MitreAttackProto.getDescriptor(); - com.google.cloud.securitycenter.v1.ProcessProto.getDescriptor(); - com.google.cloud.securitycenter.v1.SecurityMarksOuterClass.getDescriptor(); - com.google.cloud.securitycenter.v1.VulnerabilityProto.getDescriptor(); - com.google.protobuf.StructProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Folder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Folder.java deleted file mode 100644 index 647029637d3a..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Folder.java +++ /dev/null @@ -1,770 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/folder.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Message that contains the resource name and display name of a folder
- * resource.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Folder} - */ -public final class Folder extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Folder) - FolderOrBuilder { -private static final long serialVersionUID = 0L; - // Use Folder.newBuilder() to construct. - private Folder(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Folder() { - resourceFolder_ = ""; - resourceFolderDisplayName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Folder(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Folder( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - resourceFolder_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - resourceFolderDisplayName_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.FolderProto.internal_static_google_cloud_securitycenter_v1_Folder_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.FolderProto.internal_static_google_cloud_securitycenter_v1_Folder_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Folder.class, com.google.cloud.securitycenter.v1.Folder.Builder.class); - } - - public static final int RESOURCE_FOLDER_FIELD_NUMBER = 1; - private volatile java.lang.Object resourceFolder_; - /** - *
-   * Full resource name of this folder. See:
-   * https://cloud.google.com/apis/design/resource_names#full_resource_name
-   * 
- * - * string resource_folder = 1; - * @return The resourceFolder. - */ - @java.lang.Override - public java.lang.String getResourceFolder() { - java.lang.Object ref = resourceFolder_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceFolder_ = s; - return s; - } - } - /** - *
-   * Full resource name of this folder. See:
-   * https://cloud.google.com/apis/design/resource_names#full_resource_name
-   * 
- * - * string resource_folder = 1; - * @return The bytes for resourceFolder. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getResourceFolderBytes() { - java.lang.Object ref = resourceFolder_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceFolder_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESOURCE_FOLDER_DISPLAY_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object resourceFolderDisplayName_; - /** - *
-   * The user defined display name for this folder.
-   * 
- * - * string resource_folder_display_name = 2; - * @return The resourceFolderDisplayName. - */ - @java.lang.Override - public java.lang.String getResourceFolderDisplayName() { - java.lang.Object ref = resourceFolderDisplayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceFolderDisplayName_ = s; - return s; - } - } - /** - *
-   * The user defined display name for this folder.
-   * 
- * - * string resource_folder_display_name = 2; - * @return The bytes for resourceFolderDisplayName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getResourceFolderDisplayNameBytes() { - java.lang.Object ref = resourceFolderDisplayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceFolderDisplayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceFolder_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceFolder_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceFolderDisplayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceFolderDisplayName_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceFolder_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resourceFolder_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceFolderDisplayName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceFolderDisplayName_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.Folder)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.Folder other = (com.google.cloud.securitycenter.v1.Folder) obj; - - if (!getResourceFolder() - .equals(other.getResourceFolder())) return false; - if (!getResourceFolderDisplayName() - .equals(other.getResourceFolderDisplayName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + RESOURCE_FOLDER_FIELD_NUMBER; - hash = (53 * hash) + getResourceFolder().hashCode(); - hash = (37 * hash) + RESOURCE_FOLDER_DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getResourceFolderDisplayName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.Folder parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Folder parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Folder parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Folder parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Folder parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Folder parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Folder parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Folder parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Folder parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Folder parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Folder parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Folder parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.Folder prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Message that contains the resource name and display name of a folder
-   * resource.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Folder} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Folder) - com.google.cloud.securitycenter.v1.FolderOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.FolderProto.internal_static_google_cloud_securitycenter_v1_Folder_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.FolderProto.internal_static_google_cloud_securitycenter_v1_Folder_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Folder.class, com.google.cloud.securitycenter.v1.Folder.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.Folder.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - resourceFolder_ = ""; - - resourceFolderDisplayName_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.FolderProto.internal_static_google_cloud_securitycenter_v1_Folder_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Folder getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.Folder.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Folder build() { - com.google.cloud.securitycenter.v1.Folder result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Folder buildPartial() { - com.google.cloud.securitycenter.v1.Folder result = new com.google.cloud.securitycenter.v1.Folder(this); - result.resourceFolder_ = resourceFolder_; - result.resourceFolderDisplayName_ = resourceFolderDisplayName_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.Folder) { - return mergeFrom((com.google.cloud.securitycenter.v1.Folder)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.Folder other) { - if (other == com.google.cloud.securitycenter.v1.Folder.getDefaultInstance()) return this; - if (!other.getResourceFolder().isEmpty()) { - resourceFolder_ = other.resourceFolder_; - onChanged(); - } - if (!other.getResourceFolderDisplayName().isEmpty()) { - resourceFolderDisplayName_ = other.resourceFolderDisplayName_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.Folder parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.Folder) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object resourceFolder_ = ""; - /** - *
-     * Full resource name of this folder. See:
-     * https://cloud.google.com/apis/design/resource_names#full_resource_name
-     * 
- * - * string resource_folder = 1; - * @return The resourceFolder. - */ - public java.lang.String getResourceFolder() { - java.lang.Object ref = resourceFolder_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceFolder_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Full resource name of this folder. See:
-     * https://cloud.google.com/apis/design/resource_names#full_resource_name
-     * 
- * - * string resource_folder = 1; - * @return The bytes for resourceFolder. - */ - public com.google.protobuf.ByteString - getResourceFolderBytes() { - java.lang.Object ref = resourceFolder_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceFolder_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Full resource name of this folder. See:
-     * https://cloud.google.com/apis/design/resource_names#full_resource_name
-     * 
- * - * string resource_folder = 1; - * @param value The resourceFolder to set. - * @return This builder for chaining. - */ - public Builder setResourceFolder( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceFolder_ = value; - onChanged(); - return this; - } - /** - *
-     * Full resource name of this folder. See:
-     * https://cloud.google.com/apis/design/resource_names#full_resource_name
-     * 
- * - * string resource_folder = 1; - * @return This builder for chaining. - */ - public Builder clearResourceFolder() { - - resourceFolder_ = getDefaultInstance().getResourceFolder(); - onChanged(); - return this; - } - /** - *
-     * Full resource name of this folder. See:
-     * https://cloud.google.com/apis/design/resource_names#full_resource_name
-     * 
- * - * string resource_folder = 1; - * @param value The bytes for resourceFolder to set. - * @return This builder for chaining. - */ - public Builder setResourceFolderBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resourceFolder_ = value; - onChanged(); - return this; - } - - private java.lang.Object resourceFolderDisplayName_ = ""; - /** - *
-     * The user defined display name for this folder.
-     * 
- * - * string resource_folder_display_name = 2; - * @return The resourceFolderDisplayName. - */ - public java.lang.String getResourceFolderDisplayName() { - java.lang.Object ref = resourceFolderDisplayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceFolderDisplayName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The user defined display name for this folder.
-     * 
- * - * string resource_folder_display_name = 2; - * @return The bytes for resourceFolderDisplayName. - */ - public com.google.protobuf.ByteString - getResourceFolderDisplayNameBytes() { - java.lang.Object ref = resourceFolderDisplayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceFolderDisplayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The user defined display name for this folder.
-     * 
- * - * string resource_folder_display_name = 2; - * @param value The resourceFolderDisplayName to set. - * @return This builder for chaining. - */ - public Builder setResourceFolderDisplayName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceFolderDisplayName_ = value; - onChanged(); - return this; - } - /** - *
-     * The user defined display name for this folder.
-     * 
- * - * string resource_folder_display_name = 2; - * @return This builder for chaining. - */ - public Builder clearResourceFolderDisplayName() { - - resourceFolderDisplayName_ = getDefaultInstance().getResourceFolderDisplayName(); - onChanged(); - return this; - } - /** - *
-     * The user defined display name for this folder.
-     * 
- * - * string resource_folder_display_name = 2; - * @param value The bytes for resourceFolderDisplayName to set. - * @return This builder for chaining. - */ - public Builder setResourceFolderDisplayNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resourceFolderDisplayName_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Folder) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Folder) - private static final com.google.cloud.securitycenter.v1.Folder DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Folder(); - } - - public static com.google.cloud.securitycenter.v1.Folder getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Folder parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Folder(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Folder getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FolderName.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FolderName.java deleted file mode 100644 index 5dd7da3af681..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FolderName.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright 2022 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; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class FolderName implements ResourceName { - private static final PathTemplate FOLDER = - PathTemplate.createWithoutUrlEncoding("folders/{folder}"); - private volatile Map fieldValuesMap; - private final String folder; - - @Deprecated - protected FolderName() { - folder = null; - } - - private FolderName(Builder builder) { - folder = Preconditions.checkNotNull(builder.getFolder()); - } - - public String getFolder() { - return folder; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static FolderName of(String folder) { - return newBuilder().setFolder(folder).build(); - } - - public static String format(String folder) { - return newBuilder().setFolder(folder).build().toString(); - } - - public static FolderName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - FOLDER.validatedMatch( - formattedString, "FolderName.parse: formattedString not in valid format"); - return of(matchMap.get("folder")); - } - - 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 (FolderName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return FOLDER.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (folder != null) { - fieldMapBuilder.put("folder", folder); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return FOLDER.instantiate("folder", folder); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - FolderName that = ((FolderName) o); - return Objects.equals(this.folder, that.folder); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(folder); - return h; - } - - /** Builder for folders/{folder}. */ - public static class Builder { - private String folder; - - protected Builder() {} - - public String getFolder() { - return folder; - } - - public Builder setFolder(String folder) { - this.folder = folder; - return this; - } - - private Builder(FolderName folderName) { - this.folder = folderName.folder; - } - - public FolderName build() { - return new FolderName(this); - } - } -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FolderOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FolderOrBuilder.java deleted file mode 100644 index 3e97d4e381a6..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FolderOrBuilder.java +++ /dev/null @@ -1,51 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/folder.proto - -package com.google.cloud.securitycenter.v1; - -public interface FolderOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Folder) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Full resource name of this folder. See:
-   * https://cloud.google.com/apis/design/resource_names#full_resource_name
-   * 
- * - * string resource_folder = 1; - * @return The resourceFolder. - */ - java.lang.String getResourceFolder(); - /** - *
-   * Full resource name of this folder. See:
-   * https://cloud.google.com/apis/design/resource_names#full_resource_name
-   * 
- * - * string resource_folder = 1; - * @return The bytes for resourceFolder. - */ - com.google.protobuf.ByteString - getResourceFolderBytes(); - - /** - *
-   * The user defined display name for this folder.
-   * 
- * - * string resource_folder_display_name = 2; - * @return The resourceFolderDisplayName. - */ - java.lang.String getResourceFolderDisplayName(); - /** - *
-   * The user defined display name for this folder.
-   * 
- * - * string resource_folder_display_name = 2; - * @return The bytes for resourceFolderDisplayName. - */ - com.google.protobuf.ByteString - getResourceFolderDisplayNameBytes(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FolderProto.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FolderProto.java deleted file mode 100644 index a1295ec42756..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FolderProto.java +++ /dev/null @@ -1,55 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/folder.proto - -package com.google.cloud.securitycenter.v1; - -public final class FolderProto { - private FolderProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_Folder_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_Folder_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n+google/cloud/securitycenter/v1/folder." + - "proto\022\036google.cloud.securitycenter.v1\"G\n" + - "\006Folder\022\027\n\017resource_folder\030\001 \001(\t\022$\n\034reso" + - "urce_folder_display_name\030\002 \001(\tB\347\001\n\"com.g" + - "oogle.cloud.securitycenter.v1B\013FolderPro" + - "toP\001ZLgoogle.golang.org/genproto/googlea" + - "pis/cloud/securitycenter/v1;securitycent" + - "er\252\002\036Google.Cloud.SecurityCenter.V1\312\002\036Go" + - "ogle\\Cloud\\SecurityCenter\\V1\352\002!Google::C" + - "loud::SecurityCenter::V1b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_google_cloud_securitycenter_v1_Folder_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_securitycenter_v1_Folder_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_Folder_descriptor, - new java.lang.String[] { "ResourceFolder", "ResourceFolderDisplayName", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Geolocation.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Geolocation.java deleted file mode 100644 index faf1a2c0a441..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Geolocation.java +++ /dev/null @@ -1,595 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/access.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Represents a geographical location for a given access.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Geolocation} - */ -public final class Geolocation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Geolocation) - GeolocationOrBuilder { -private static final long serialVersionUID = 0L; - // Use Geolocation.newBuilder() to construct. - private Geolocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Geolocation() { - regionCode_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Geolocation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Geolocation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - regionCode_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.AccessProto.internal_static_google_cloud_securitycenter_v1_Geolocation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.AccessProto.internal_static_google_cloud_securitycenter_v1_Geolocation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Geolocation.class, com.google.cloud.securitycenter.v1.Geolocation.Builder.class); - } - - public static final int REGION_CODE_FIELD_NUMBER = 1; - private volatile java.lang.Object regionCode_; - /** - *
-   * A CLDR.
-   * 
- * - * string region_code = 1; - * @return The regionCode. - */ - @java.lang.Override - public java.lang.String getRegionCode() { - java.lang.Object ref = regionCode_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - regionCode_ = s; - return s; - } - } - /** - *
-   * A CLDR.
-   * 
- * - * string region_code = 1; - * @return The bytes for regionCode. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRegionCodeBytes() { - java.lang.Object ref = regionCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - regionCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(regionCode_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, regionCode_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(regionCode_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, regionCode_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.Geolocation)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.Geolocation other = (com.google.cloud.securitycenter.v1.Geolocation) obj; - - if (!getRegionCode() - .equals(other.getRegionCode())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + REGION_CODE_FIELD_NUMBER; - hash = (53 * hash) + getRegionCode().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.Geolocation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Geolocation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Geolocation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Geolocation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Geolocation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Geolocation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Geolocation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Geolocation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Geolocation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Geolocation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Geolocation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Geolocation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.Geolocation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Represents a geographical location for a given access.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Geolocation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Geolocation) - com.google.cloud.securitycenter.v1.GeolocationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.AccessProto.internal_static_google_cloud_securitycenter_v1_Geolocation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.AccessProto.internal_static_google_cloud_securitycenter_v1_Geolocation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Geolocation.class, com.google.cloud.securitycenter.v1.Geolocation.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.Geolocation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - regionCode_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.AccessProto.internal_static_google_cloud_securitycenter_v1_Geolocation_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Geolocation getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.Geolocation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Geolocation build() { - com.google.cloud.securitycenter.v1.Geolocation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Geolocation buildPartial() { - com.google.cloud.securitycenter.v1.Geolocation result = new com.google.cloud.securitycenter.v1.Geolocation(this); - result.regionCode_ = regionCode_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.Geolocation) { - return mergeFrom((com.google.cloud.securitycenter.v1.Geolocation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.Geolocation other) { - if (other == com.google.cloud.securitycenter.v1.Geolocation.getDefaultInstance()) return this; - if (!other.getRegionCode().isEmpty()) { - regionCode_ = other.regionCode_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.Geolocation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.Geolocation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object regionCode_ = ""; - /** - *
-     * A CLDR.
-     * 
- * - * string region_code = 1; - * @return The regionCode. - */ - public java.lang.String getRegionCode() { - java.lang.Object ref = regionCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - regionCode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A CLDR.
-     * 
- * - * string region_code = 1; - * @return The bytes for regionCode. - */ - public com.google.protobuf.ByteString - getRegionCodeBytes() { - java.lang.Object ref = regionCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - regionCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A CLDR.
-     * 
- * - * string region_code = 1; - * @param value The regionCode to set. - * @return This builder for chaining. - */ - public Builder setRegionCode( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - regionCode_ = value; - onChanged(); - return this; - } - /** - *
-     * A CLDR.
-     * 
- * - * string region_code = 1; - * @return This builder for chaining. - */ - public Builder clearRegionCode() { - - regionCode_ = getDefaultInstance().getRegionCode(); - onChanged(); - return this; - } - /** - *
-     * A CLDR.
-     * 
- * - * string region_code = 1; - * @param value The bytes for regionCode to set. - * @return This builder for chaining. - */ - public Builder setRegionCodeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - regionCode_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Geolocation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Geolocation) - private static final com.google.cloud.securitycenter.v1.Geolocation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Geolocation(); - } - - public static com.google.cloud.securitycenter.v1.Geolocation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Geolocation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Geolocation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Geolocation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GeolocationOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GeolocationOrBuilder.java deleted file mode 100644 index 0b3d14d2e9d1..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GeolocationOrBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/access.proto - -package com.google.cloud.securitycenter.v1; - -public interface GeolocationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Geolocation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A CLDR.
-   * 
- * - * string region_code = 1; - * @return The regionCode. - */ - java.lang.String getRegionCode(); - /** - *
-   * A CLDR.
-   * 
- * - * string region_code = 1; - * @return The bytes for regionCode. - */ - com.google.protobuf.ByteString - getRegionCodeBytes(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetBigQueryExportRequest.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetBigQueryExportRequest.java deleted file mode 100644 index 70e2f5737bb1..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetBigQueryExportRequest.java +++ /dev/null @@ -1,616 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Request message for retrieving a big query export.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.GetBigQueryExportRequest} - */ -public final class GetBigQueryExportRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.GetBigQueryExportRequest) - GetBigQueryExportRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetBigQueryExportRequest.newBuilder() to construct. - private GetBigQueryExportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetBigQueryExportRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetBigQueryExportRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetBigQueryExportRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GetBigQueryExportRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GetBigQueryExportRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.GetBigQueryExportRequest.class, com.google.cloud.securitycenter.v1.GetBigQueryExportRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Name of the big query export to retrieve. Its format is
-   * organizations/{organization}/bigQueryExports/{export_id},
-   * folders/{folder}/bigQueryExports/{export_id}, or
-   * projects/{project}/bigQueryExports/{export_id}
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Name of the big query export to retrieve. Its format is
-   * organizations/{organization}/bigQueryExports/{export_id},
-   * folders/{folder}/bigQueryExports/{export_id}, or
-   * projects/{project}/bigQueryExports/{export_id}
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.GetBigQueryExportRequest)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.GetBigQueryExportRequest other = (com.google.cloud.securitycenter.v1.GetBigQueryExportRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.GetBigQueryExportRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.GetBigQueryExportRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GetBigQueryExportRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.GetBigQueryExportRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GetBigQueryExportRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.GetBigQueryExportRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GetBigQueryExportRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.GetBigQueryExportRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GetBigQueryExportRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.GetBigQueryExportRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GetBigQueryExportRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.GetBigQueryExportRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.GetBigQueryExportRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for retrieving a big query export.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.GetBigQueryExportRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.GetBigQueryExportRequest) - com.google.cloud.securitycenter.v1.GetBigQueryExportRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GetBigQueryExportRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GetBigQueryExportRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.GetBigQueryExportRequest.class, com.google.cloud.securitycenter.v1.GetBigQueryExportRequest.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.GetBigQueryExportRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GetBigQueryExportRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GetBigQueryExportRequest getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.GetBigQueryExportRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GetBigQueryExportRequest build() { - com.google.cloud.securitycenter.v1.GetBigQueryExportRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GetBigQueryExportRequest buildPartial() { - com.google.cloud.securitycenter.v1.GetBigQueryExportRequest result = new com.google.cloud.securitycenter.v1.GetBigQueryExportRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.GetBigQueryExportRequest) { - return mergeFrom((com.google.cloud.securitycenter.v1.GetBigQueryExportRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.GetBigQueryExportRequest other) { - if (other == com.google.cloud.securitycenter.v1.GetBigQueryExportRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.GetBigQueryExportRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.GetBigQueryExportRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Name of the big query export to retrieve. Its format is
-     * organizations/{organization}/bigQueryExports/{export_id},
-     * folders/{folder}/bigQueryExports/{export_id}, or
-     * projects/{project}/bigQueryExports/{export_id}
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Name of the big query export to retrieve. Its format is
-     * organizations/{organization}/bigQueryExports/{export_id},
-     * folders/{folder}/bigQueryExports/{export_id}, or
-     * projects/{project}/bigQueryExports/{export_id}
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Name of the big query export to retrieve. Its format is
-     * organizations/{organization}/bigQueryExports/{export_id},
-     * folders/{folder}/bigQueryExports/{export_id}, or
-     * projects/{project}/bigQueryExports/{export_id}
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Name of the big query export to retrieve. Its format is
-     * organizations/{organization}/bigQueryExports/{export_id},
-     * folders/{folder}/bigQueryExports/{export_id}, or
-     * projects/{project}/bigQueryExports/{export_id}
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Name of the big query export to retrieve. Its format is
-     * organizations/{organization}/bigQueryExports/{export_id},
-     * folders/{folder}/bigQueryExports/{export_id}, or
-     * projects/{project}/bigQueryExports/{export_id}
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.GetBigQueryExportRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.GetBigQueryExportRequest) - private static final com.google.cloud.securitycenter.v1.GetBigQueryExportRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.GetBigQueryExportRequest(); - } - - public static com.google.cloud.securitycenter.v1.GetBigQueryExportRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetBigQueryExportRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetBigQueryExportRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GetBigQueryExportRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetBigQueryExportRequestOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetBigQueryExportRequestOrBuilder.java deleted file mode 100644 index 24a999b0cefd..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetBigQueryExportRequestOrBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -public interface GetBigQueryExportRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.GetBigQueryExportRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Name of the big query export to retrieve. Its format is
-   * organizations/{organization}/bigQueryExports/{export_id},
-   * folders/{folder}/bigQueryExports/{export_id}, or
-   * projects/{project}/bigQueryExports/{export_id}
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Name of the big query export to retrieve. Its format is
-   * organizations/{organization}/bigQueryExports/{export_id},
-   * folders/{folder}/bigQueryExports/{export_id}, or
-   * projects/{project}/bigQueryExports/{export_id}
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetMuteConfigRequest.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetMuteConfigRequest.java deleted file mode 100644 index 7953b91fb402..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetMuteConfigRequest.java +++ /dev/null @@ -1,616 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Request message for retrieving a mute config.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.GetMuteConfigRequest} - */ -public final class GetMuteConfigRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.GetMuteConfigRequest) - GetMuteConfigRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetMuteConfigRequest.newBuilder() to construct. - private GetMuteConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetMuteConfigRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetMuteConfigRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetMuteConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GetMuteConfigRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GetMuteConfigRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.GetMuteConfigRequest.class, com.google.cloud.securitycenter.v1.GetMuteConfigRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Name of the mute config to retrieve. Its format is
-   * organizations/{organization}/muteConfigs/{config_id},
-   * folders/{folder}/muteConfigs/{config_id}, or
-   * projects/{project}/muteConfigs/{config_id}
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Name of the mute config to retrieve. Its format is
-   * organizations/{organization}/muteConfigs/{config_id},
-   * folders/{folder}/muteConfigs/{config_id}, or
-   * projects/{project}/muteConfigs/{config_id}
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.GetMuteConfigRequest)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.GetMuteConfigRequest other = (com.google.cloud.securitycenter.v1.GetMuteConfigRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.GetMuteConfigRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.GetMuteConfigRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GetMuteConfigRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.GetMuteConfigRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GetMuteConfigRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.GetMuteConfigRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GetMuteConfigRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.GetMuteConfigRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GetMuteConfigRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.GetMuteConfigRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GetMuteConfigRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.GetMuteConfigRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.GetMuteConfigRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for retrieving a mute config.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.GetMuteConfigRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.GetMuteConfigRequest) - com.google.cloud.securitycenter.v1.GetMuteConfigRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GetMuteConfigRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GetMuteConfigRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.GetMuteConfigRequest.class, com.google.cloud.securitycenter.v1.GetMuteConfigRequest.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.GetMuteConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GetMuteConfigRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GetMuteConfigRequest getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.GetMuteConfigRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GetMuteConfigRequest build() { - com.google.cloud.securitycenter.v1.GetMuteConfigRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GetMuteConfigRequest buildPartial() { - com.google.cloud.securitycenter.v1.GetMuteConfigRequest result = new com.google.cloud.securitycenter.v1.GetMuteConfigRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.GetMuteConfigRequest) { - return mergeFrom((com.google.cloud.securitycenter.v1.GetMuteConfigRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.GetMuteConfigRequest other) { - if (other == com.google.cloud.securitycenter.v1.GetMuteConfigRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.GetMuteConfigRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.GetMuteConfigRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Name of the mute config to retrieve. Its format is
-     * organizations/{organization}/muteConfigs/{config_id},
-     * folders/{folder}/muteConfigs/{config_id}, or
-     * projects/{project}/muteConfigs/{config_id}
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Name of the mute config to retrieve. Its format is
-     * organizations/{organization}/muteConfigs/{config_id},
-     * folders/{folder}/muteConfigs/{config_id}, or
-     * projects/{project}/muteConfigs/{config_id}
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Name of the mute config to retrieve. Its format is
-     * organizations/{organization}/muteConfigs/{config_id},
-     * folders/{folder}/muteConfigs/{config_id}, or
-     * projects/{project}/muteConfigs/{config_id}
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Name of the mute config to retrieve. Its format is
-     * organizations/{organization}/muteConfigs/{config_id},
-     * folders/{folder}/muteConfigs/{config_id}, or
-     * projects/{project}/muteConfigs/{config_id}
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Name of the mute config to retrieve. Its format is
-     * organizations/{organization}/muteConfigs/{config_id},
-     * folders/{folder}/muteConfigs/{config_id}, or
-     * projects/{project}/muteConfigs/{config_id}
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.GetMuteConfigRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.GetMuteConfigRequest) - private static final com.google.cloud.securitycenter.v1.GetMuteConfigRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.GetMuteConfigRequest(); - } - - public static com.google.cloud.securitycenter.v1.GetMuteConfigRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetMuteConfigRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetMuteConfigRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GetMuteConfigRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetMuteConfigRequestOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetMuteConfigRequestOrBuilder.java deleted file mode 100644 index c5ae6e39cf04..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetMuteConfigRequestOrBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -public interface GetMuteConfigRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.GetMuteConfigRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Name of the mute config to retrieve. Its format is
-   * organizations/{organization}/muteConfigs/{config_id},
-   * folders/{folder}/muteConfigs/{config_id}, or
-   * projects/{project}/muteConfigs/{config_id}
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Name of the mute config to retrieve. Its format is
-   * organizations/{organization}/muteConfigs/{config_id},
-   * folders/{folder}/muteConfigs/{config_id}, or
-   * projects/{project}/muteConfigs/{config_id}
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetNotificationConfigRequest.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetNotificationConfigRequest.java deleted file mode 100644 index 7d504bee3d7e..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetNotificationConfigRequest.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Request message for getting a notification config.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.GetNotificationConfigRequest} - */ -public final class GetNotificationConfigRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.GetNotificationConfigRequest) - GetNotificationConfigRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetNotificationConfigRequest.newBuilder() to construct. - private GetNotificationConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetNotificationConfigRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetNotificationConfigRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetNotificationConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GetNotificationConfigRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GetNotificationConfigRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.GetNotificationConfigRequest.class, com.google.cloud.securitycenter.v1.GetNotificationConfigRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Name of the notification config to get. Its format is
-   * "organizations/[organization_id]/notificationConfigs/[config_id]".
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Name of the notification config to get. Its format is
-   * "organizations/[organization_id]/notificationConfigs/[config_id]".
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.GetNotificationConfigRequest)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.GetNotificationConfigRequest other = (com.google.cloud.securitycenter.v1.GetNotificationConfigRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.GetNotificationConfigRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.GetNotificationConfigRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GetNotificationConfigRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.GetNotificationConfigRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GetNotificationConfigRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.GetNotificationConfigRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GetNotificationConfigRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.GetNotificationConfigRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GetNotificationConfigRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.GetNotificationConfigRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GetNotificationConfigRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.GetNotificationConfigRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.GetNotificationConfigRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for getting a notification config.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.GetNotificationConfigRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.GetNotificationConfigRequest) - com.google.cloud.securitycenter.v1.GetNotificationConfigRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GetNotificationConfigRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GetNotificationConfigRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.GetNotificationConfigRequest.class, com.google.cloud.securitycenter.v1.GetNotificationConfigRequest.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.GetNotificationConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GetNotificationConfigRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GetNotificationConfigRequest getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.GetNotificationConfigRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GetNotificationConfigRequest build() { - com.google.cloud.securitycenter.v1.GetNotificationConfigRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GetNotificationConfigRequest buildPartial() { - com.google.cloud.securitycenter.v1.GetNotificationConfigRequest result = new com.google.cloud.securitycenter.v1.GetNotificationConfigRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.GetNotificationConfigRequest) { - return mergeFrom((com.google.cloud.securitycenter.v1.GetNotificationConfigRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.GetNotificationConfigRequest other) { - if (other == com.google.cloud.securitycenter.v1.GetNotificationConfigRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.GetNotificationConfigRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.GetNotificationConfigRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Name of the notification config to get. Its format is
-     * "organizations/[organization_id]/notificationConfigs/[config_id]".
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Name of the notification config to get. Its format is
-     * "organizations/[organization_id]/notificationConfigs/[config_id]".
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Name of the notification config to get. Its format is
-     * "organizations/[organization_id]/notificationConfigs/[config_id]".
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Name of the notification config to get. Its format is
-     * "organizations/[organization_id]/notificationConfigs/[config_id]".
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Name of the notification config to get. Its format is
-     * "organizations/[organization_id]/notificationConfigs/[config_id]".
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.GetNotificationConfigRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.GetNotificationConfigRequest) - private static final com.google.cloud.securitycenter.v1.GetNotificationConfigRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.GetNotificationConfigRequest(); - } - - public static com.google.cloud.securitycenter.v1.GetNotificationConfigRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetNotificationConfigRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetNotificationConfigRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GetNotificationConfigRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetNotificationConfigRequestOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetNotificationConfigRequestOrBuilder.java deleted file mode 100644 index 7dae1ef25a2f..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetNotificationConfigRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -public interface GetNotificationConfigRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.GetNotificationConfigRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Name of the notification config to get. Its format is
-   * "organizations/[organization_id]/notificationConfigs/[config_id]".
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Name of the notification config to get. Its format is
-   * "organizations/[organization_id]/notificationConfigs/[config_id]".
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetOrganizationSettingsRequest.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetOrganizationSettingsRequest.java deleted file mode 100644 index fbb5039c6a55..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetOrganizationSettingsRequest.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Request message for getting organization settings.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.GetOrganizationSettingsRequest} - */ -public final class GetOrganizationSettingsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.GetOrganizationSettingsRequest) - GetOrganizationSettingsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetOrganizationSettingsRequest.newBuilder() to construct. - private GetOrganizationSettingsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetOrganizationSettingsRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetOrganizationSettingsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetOrganizationSettingsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GetOrganizationSettingsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GetOrganizationSettingsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest.class, com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Name of the organization to get organization settings for. Its format is
-   * "organizations/[organization_id]/organizationSettings".
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Name of the organization to get organization settings for. Its format is
-   * "organizations/[organization_id]/organizationSettings".
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest other = (com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for getting organization settings.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.GetOrganizationSettingsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.GetOrganizationSettingsRequest) - com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GetOrganizationSettingsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GetOrganizationSettingsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest.class, com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GetOrganizationSettingsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest build() { - com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest buildPartial() { - com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest result = new com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest) { - return mergeFrom((com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest other) { - if (other == com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Name of the organization to get organization settings for. Its format is
-     * "organizations/[organization_id]/organizationSettings".
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Name of the organization to get organization settings for. Its format is
-     * "organizations/[organization_id]/organizationSettings".
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Name of the organization to get organization settings for. Its format is
-     * "organizations/[organization_id]/organizationSettings".
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Name of the organization to get organization settings for. Its format is
-     * "organizations/[organization_id]/organizationSettings".
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Name of the organization to get organization settings for. Its format is
-     * "organizations/[organization_id]/organizationSettings".
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.GetOrganizationSettingsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.GetOrganizationSettingsRequest) - private static final com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest(); - } - - public static com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetOrganizationSettingsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetOrganizationSettingsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetOrganizationSettingsRequestOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetOrganizationSettingsRequestOrBuilder.java deleted file mode 100644 index 9f0dfe98e05d..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetOrganizationSettingsRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -public interface GetOrganizationSettingsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.GetOrganizationSettingsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Name of the organization to get organization settings for. Its format is
-   * "organizations/[organization_id]/organizationSettings".
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Name of the organization to get organization settings for. Its format is
-   * "organizations/[organization_id]/organizationSettings".
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetSourceRequest.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetSourceRequest.java deleted file mode 100644 index 47e1b6656756..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetSourceRequest.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Request message for getting a source.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.GetSourceRequest} - */ -public final class GetSourceRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.GetSourceRequest) - GetSourceRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetSourceRequest.newBuilder() to construct. - private GetSourceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetSourceRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetSourceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetSourceRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GetSourceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GetSourceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.GetSourceRequest.class, com.google.cloud.securitycenter.v1.GetSourceRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Relative resource name of the source. Its format is
-   * "organizations/[organization_id]/source/[source_id]".
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Relative resource name of the source. Its format is
-   * "organizations/[organization_id]/source/[source_id]".
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.GetSourceRequest)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.GetSourceRequest other = (com.google.cloud.securitycenter.v1.GetSourceRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.GetSourceRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.GetSourceRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GetSourceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.GetSourceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GetSourceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.GetSourceRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GetSourceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.GetSourceRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GetSourceRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.GetSourceRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GetSourceRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.GetSourceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.GetSourceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for getting a source.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.GetSourceRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.GetSourceRequest) - com.google.cloud.securitycenter.v1.GetSourceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GetSourceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GetSourceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.GetSourceRequest.class, com.google.cloud.securitycenter.v1.GetSourceRequest.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.GetSourceRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GetSourceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GetSourceRequest getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.GetSourceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GetSourceRequest build() { - com.google.cloud.securitycenter.v1.GetSourceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GetSourceRequest buildPartial() { - com.google.cloud.securitycenter.v1.GetSourceRequest result = new com.google.cloud.securitycenter.v1.GetSourceRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.GetSourceRequest) { - return mergeFrom((com.google.cloud.securitycenter.v1.GetSourceRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.GetSourceRequest other) { - if (other == com.google.cloud.securitycenter.v1.GetSourceRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.GetSourceRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.GetSourceRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Relative resource name of the source. Its format is
-     * "organizations/[organization_id]/source/[source_id]".
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Relative resource name of the source. Its format is
-     * "organizations/[organization_id]/source/[source_id]".
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Relative resource name of the source. Its format is
-     * "organizations/[organization_id]/source/[source_id]".
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Relative resource name of the source. Its format is
-     * "organizations/[organization_id]/source/[source_id]".
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Relative resource name of the source. Its format is
-     * "organizations/[organization_id]/source/[source_id]".
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.GetSourceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.GetSourceRequest) - private static final com.google.cloud.securitycenter.v1.GetSourceRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.GetSourceRequest(); - } - - public static com.google.cloud.securitycenter.v1.GetSourceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetSourceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetSourceRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GetSourceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetSourceRequestOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetSourceRequestOrBuilder.java deleted file mode 100644 index c25dba2e7a9a..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GetSourceRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -public interface GetSourceRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.GetSourceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Relative resource name of the source. Its format is
-   * "organizations/[organization_id]/source/[source_id]".
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Relative resource name of the source. Its format is
-   * "organizations/[organization_id]/source/[source_id]".
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupAssetsRequest.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupAssetsRequest.java deleted file mode 100644 index 39b8c0111e4b..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupAssetsRequest.java +++ /dev/null @@ -1,2378 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Request message for grouping by assets.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.GroupAssetsRequest} - */ -public final class GroupAssetsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.GroupAssetsRequest) - GroupAssetsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GroupAssetsRequest.newBuilder() to construct. - private GroupAssetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GroupAssetsRequest() { - parent_ = ""; - filter_ = ""; - groupBy_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GroupAssetsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GroupAssetsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - groupBy_ = s; - break; - } - case 34: { - com.google.protobuf.Duration.Builder subBuilder = null; - if (compareDuration_ != null) { - subBuilder = compareDuration_.toBuilder(); - } - compareDuration_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(compareDuration_); - compareDuration_ = subBuilder.buildPartial(); - } - - break; - } - case 42: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (readTime_ != null) { - subBuilder = readTime_.toBuilder(); - } - readTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(readTime_); - readTime_ = subBuilder.buildPartial(); - } - - break; - } - case 58: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 64: { - - pageSize_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GroupAssetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GroupAssetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.GroupAssetsRequest.class, com.google.cloud.securitycenter.v1.GroupAssetsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. Name of the organization to groupBy. Its format is
-   * "organizations/[organization_id], folders/[folder_id], or
-   * projects/[project_id]".
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. Name of the organization to groupBy. Its format is
-   * "organizations/[organization_id], folders/[folder_id], or
-   * projects/[project_id]".
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 2; - private volatile java.lang.Object filter_; - /** - *
-   * Expression that defines the filter to apply across assets.
-   * The expression is a list of zero or more restrictions combined via logical
-   * operators `AND` and `OR`.
-   * Parentheses are supported, and `OR` has higher precedence than `AND`.
-   * Restrictions have the form `<field> <operator> <value>` and may have a `-`
-   * character in front of them to indicate negation. The fields map to those
-   * defined in the Asset resource. Examples include:
-   * * name
-   * * security_center_properties.resource_name
-   * * resource_properties.a_property
-   * * security_marks.marks.marka
-   * The supported operators are:
-   * * `=` for all value types.
-   * * `>`, `<`, `>=`, `<=` for integer values.
-   * * `:`, meaning substring matching, for strings.
-   * The supported value types are:
-   * * string literals in quotes.
-   * * integer literals without quotes.
-   * * boolean literals `true` and `false` without quotes.
-   * The following field and operator combinations are supported:
-   * * name: `=`
-   * * update_time: `=`, `>`, `<`, `>=`, `<=`
-   *   Usage: This should be milliseconds since epoch or an RFC3339 string.
-   *   Examples:
-   *     `update_time = "2019-06-10T16:07:18-07:00"`
-   *     `update_time = 1560208038000`
-   * * create_time: `=`, `>`, `<`, `>=`, `<=`
-   *   Usage: This should be milliseconds since epoch or an RFC3339 string.
-   *   Examples:
-   *     `create_time = "2019-06-10T16:07:18-07:00"`
-   *     `create_time = 1560208038000`
-   * * iam_policy.policy_blob: `=`, `:`
-   * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=`
-   * * security_marks.marks: `=`, `:`
-   * * security_center_properties.resource_name: `=`, `:`
-   * * security_center_properties.resource_display_name: `=`, `:`
-   * * security_center_properties.resource_type: `=`, `:`
-   * * security_center_properties.resource_parent: `=`, `:`
-   * * security_center_properties.resource_parent_display_name: `=`, `:`
-   * * security_center_properties.resource_project: `=`, `:`
-   * * security_center_properties.resource_project_display_name: `=`, `:`
-   * * security_center_properties.resource_owners: `=`, `:`
-   * For example, `resource_properties.size = 100` is a valid filter string.
-   * Use a partial match on the empty string to filter based on a property
-   * existing: `resource_properties.my_property : ""`
-   * Use a negated partial match on the empty string to filter based on a
-   * property not existing: `-resource_properties.my_property : ""`
-   * 
- * - * string filter = 2; - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - *
-   * Expression that defines the filter to apply across assets.
-   * The expression is a list of zero or more restrictions combined via logical
-   * operators `AND` and `OR`.
-   * Parentheses are supported, and `OR` has higher precedence than `AND`.
-   * Restrictions have the form `<field> <operator> <value>` and may have a `-`
-   * character in front of them to indicate negation. The fields map to those
-   * defined in the Asset resource. Examples include:
-   * * name
-   * * security_center_properties.resource_name
-   * * resource_properties.a_property
-   * * security_marks.marks.marka
-   * The supported operators are:
-   * * `=` for all value types.
-   * * `>`, `<`, `>=`, `<=` for integer values.
-   * * `:`, meaning substring matching, for strings.
-   * The supported value types are:
-   * * string literals in quotes.
-   * * integer literals without quotes.
-   * * boolean literals `true` and `false` without quotes.
-   * The following field and operator combinations are supported:
-   * * name: `=`
-   * * update_time: `=`, `>`, `<`, `>=`, `<=`
-   *   Usage: This should be milliseconds since epoch or an RFC3339 string.
-   *   Examples:
-   *     `update_time = "2019-06-10T16:07:18-07:00"`
-   *     `update_time = 1560208038000`
-   * * create_time: `=`, `>`, `<`, `>=`, `<=`
-   *   Usage: This should be milliseconds since epoch or an RFC3339 string.
-   *   Examples:
-   *     `create_time = "2019-06-10T16:07:18-07:00"`
-   *     `create_time = 1560208038000`
-   * * iam_policy.policy_blob: `=`, `:`
-   * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=`
-   * * security_marks.marks: `=`, `:`
-   * * security_center_properties.resource_name: `=`, `:`
-   * * security_center_properties.resource_display_name: `=`, `:`
-   * * security_center_properties.resource_type: `=`, `:`
-   * * security_center_properties.resource_parent: `=`, `:`
-   * * security_center_properties.resource_parent_display_name: `=`, `:`
-   * * security_center_properties.resource_project: `=`, `:`
-   * * security_center_properties.resource_project_display_name: `=`, `:`
-   * * security_center_properties.resource_owners: `=`, `:`
-   * For example, `resource_properties.size = 100` is a valid filter string.
-   * Use a partial match on the empty string to filter based on a property
-   * existing: `resource_properties.my_property : ""`
-   * Use a negated partial match on the empty string to filter based on a
-   * property not existing: `-resource_properties.my_property : ""`
-   * 
- * - * string filter = 2; - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int GROUP_BY_FIELD_NUMBER = 3; - private volatile java.lang.Object groupBy_; - /** - *
-   * Required. Expression that defines what assets fields to use for grouping. The string
-   * value should follow SQL syntax: comma separated list of fields. For
-   * example:
-   * "security_center_properties.resource_project,security_center_properties.project".
-   * The following fields are supported when compare_duration is not set:
-   * * security_center_properties.resource_project
-   * * security_center_properties.resource_project_display_name
-   * * security_center_properties.resource_type
-   * * security_center_properties.resource_parent
-   * * security_center_properties.resource_parent_display_name
-   * The following fields are supported when compare_duration is set:
-   * * security_center_properties.resource_type
-   * * security_center_properties.resource_project_display_name
-   * * security_center_properties.resource_parent_display_name
-   * 
- * - * string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The groupBy. - */ - @java.lang.Override - public java.lang.String getGroupBy() { - java.lang.Object ref = groupBy_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - groupBy_ = s; - return s; - } - } - /** - *
-   * Required. Expression that defines what assets fields to use for grouping. The string
-   * value should follow SQL syntax: comma separated list of fields. For
-   * example:
-   * "security_center_properties.resource_project,security_center_properties.project".
-   * The following fields are supported when compare_duration is not set:
-   * * security_center_properties.resource_project
-   * * security_center_properties.resource_project_display_name
-   * * security_center_properties.resource_type
-   * * security_center_properties.resource_parent
-   * * security_center_properties.resource_parent_display_name
-   * The following fields are supported when compare_duration is set:
-   * * security_center_properties.resource_type
-   * * security_center_properties.resource_project_display_name
-   * * security_center_properties.resource_parent_display_name
-   * 
- * - * string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for groupBy. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getGroupByBytes() { - java.lang.Object ref = groupBy_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - groupBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int COMPARE_DURATION_FIELD_NUMBER = 4; - private com.google.protobuf.Duration compareDuration_; - /** - *
-   * When compare_duration is set, the GroupResult's "state_change" property is
-   * updated to indicate whether the asset was added, removed, or remained
-   * present during the compare_duration period of time that precedes the
-   * read_time. This is the time between (read_time - compare_duration) and
-   * read_time.
-   * The state change value is derived based on the presence of the asset at the
-   * two points in time. Intermediate state changes between the two times don't
-   * affect the result. For example, the results aren't affected if the asset is
-   * removed and re-created again.
-   * Possible "state_change" values when compare_duration is specified:
-   * * "ADDED":   indicates that the asset was not present at the start of
-   *                compare_duration, but present at reference_time.
-   * * "REMOVED": indicates that the asset was present at the start of
-   *                compare_duration, but not present at reference_time.
-   * * "ACTIVE":  indicates that the asset was present at both the
-   *                start and the end of the time period defined by
-   *                compare_duration and reference_time.
-   * If compare_duration is not specified, then the only possible state_change
-   * is "UNUSED", which will be the state_change set for all assets present at
-   * read_time.
-   * If this field is set then `state_change` must be a specified field in
-   * `group_by`.
-   * 
- * - * .google.protobuf.Duration compare_duration = 4; - * @return Whether the compareDuration field is set. - */ - @java.lang.Override - public boolean hasCompareDuration() { - return compareDuration_ != null; - } - /** - *
-   * When compare_duration is set, the GroupResult's "state_change" property is
-   * updated to indicate whether the asset was added, removed, or remained
-   * present during the compare_duration period of time that precedes the
-   * read_time. This is the time between (read_time - compare_duration) and
-   * read_time.
-   * The state change value is derived based on the presence of the asset at the
-   * two points in time. Intermediate state changes between the two times don't
-   * affect the result. For example, the results aren't affected if the asset is
-   * removed and re-created again.
-   * Possible "state_change" values when compare_duration is specified:
-   * * "ADDED":   indicates that the asset was not present at the start of
-   *                compare_duration, but present at reference_time.
-   * * "REMOVED": indicates that the asset was present at the start of
-   *                compare_duration, but not present at reference_time.
-   * * "ACTIVE":  indicates that the asset was present at both the
-   *                start and the end of the time period defined by
-   *                compare_duration and reference_time.
-   * If compare_duration is not specified, then the only possible state_change
-   * is "UNUSED", which will be the state_change set for all assets present at
-   * read_time.
-   * If this field is set then `state_change` must be a specified field in
-   * `group_by`.
-   * 
- * - * .google.protobuf.Duration compare_duration = 4; - * @return The compareDuration. - */ - @java.lang.Override - public com.google.protobuf.Duration getCompareDuration() { - return compareDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : compareDuration_; - } - /** - *
-   * When compare_duration is set, the GroupResult's "state_change" property is
-   * updated to indicate whether the asset was added, removed, or remained
-   * present during the compare_duration period of time that precedes the
-   * read_time. This is the time between (read_time - compare_duration) and
-   * read_time.
-   * The state change value is derived based on the presence of the asset at the
-   * two points in time. Intermediate state changes between the two times don't
-   * affect the result. For example, the results aren't affected if the asset is
-   * removed and re-created again.
-   * Possible "state_change" values when compare_duration is specified:
-   * * "ADDED":   indicates that the asset was not present at the start of
-   *                compare_duration, but present at reference_time.
-   * * "REMOVED": indicates that the asset was present at the start of
-   *                compare_duration, but not present at reference_time.
-   * * "ACTIVE":  indicates that the asset was present at both the
-   *                start and the end of the time period defined by
-   *                compare_duration and reference_time.
-   * If compare_duration is not specified, then the only possible state_change
-   * is "UNUSED", which will be the state_change set for all assets present at
-   * read_time.
-   * If this field is set then `state_change` must be a specified field in
-   * `group_by`.
-   * 
- * - * .google.protobuf.Duration compare_duration = 4; - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getCompareDurationOrBuilder() { - return getCompareDuration(); - } - - public static final int READ_TIME_FIELD_NUMBER = 5; - private com.google.protobuf.Timestamp readTime_; - /** - *
-   * Time used as a reference point when filtering assets. The filter is limited
-   * to assets existing at the supplied time and their values are those at that
-   * specific time. Absence of this field will default to the API's version of
-   * NOW.
-   * 
- * - * .google.protobuf.Timestamp read_time = 5; - * @return Whether the readTime field is set. - */ - @java.lang.Override - public boolean hasReadTime() { - return readTime_ != null; - } - /** - *
-   * Time used as a reference point when filtering assets. The filter is limited
-   * to assets existing at the supplied time and their values are those at that
-   * specific time. Absence of this field will default to the API's version of
-   * NOW.
-   * 
- * - * .google.protobuf.Timestamp read_time = 5; - * @return The readTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getReadTime() { - return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } - /** - *
-   * Time used as a reference point when filtering assets. The filter is limited
-   * to assets existing at the supplied time and their values are those at that
-   * specific time. Absence of this field will default to the API's version of
-   * NOW.
-   * 
- * - * .google.protobuf.Timestamp read_time = 5; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { - return getReadTime(); - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 7; - private volatile java.lang.Object pageToken_; - /** - *
-   * The value returned by the last `GroupAssetsResponse`; indicates
-   * that this is a continuation of a prior `GroupAssets` call, and that the
-   * system should return the next page of data.
-   * 
- * - * string page_token = 7; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * The value returned by the last `GroupAssetsResponse`; indicates
-   * that this is a continuation of a prior `GroupAssets` call, and that the
-   * system should return the next page of data.
-   * 
- * - * string page_token = 7; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 8; - private int pageSize_; - /** - *
-   * The maximum number of results to return in a single response. Default is
-   * 10, minimum is 1, maximum is 1000.
-   * 
- * - * int32 page_size = 8; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(groupBy_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, groupBy_); - } - if (compareDuration_ != null) { - output.writeMessage(4, getCompareDuration()); - } - if (readTime_ != null) { - output.writeMessage(5, getReadTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, pageToken_); - } - if (pageSize_ != 0) { - output.writeInt32(8, pageSize_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(groupBy_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, groupBy_); - } - if (compareDuration_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getCompareDuration()); - } - if (readTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getReadTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, pageToken_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(8, pageSize_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.GroupAssetsRequest)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.GroupAssetsRequest other = (com.google.cloud.securitycenter.v1.GroupAssetsRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!getFilter() - .equals(other.getFilter())) return false; - if (!getGroupBy() - .equals(other.getGroupBy())) return false; - if (hasCompareDuration() != other.hasCompareDuration()) return false; - if (hasCompareDuration()) { - if (!getCompareDuration() - .equals(other.getCompareDuration())) return false; - } - if (hasReadTime() != other.hasReadTime()) return false; - if (hasReadTime()) { - if (!getReadTime() - .equals(other.getReadTime())) return false; - } - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + GROUP_BY_FIELD_NUMBER; - hash = (53 * hash) + getGroupBy().hashCode(); - if (hasCompareDuration()) { - hash = (37 * hash) + COMPARE_DURATION_FIELD_NUMBER; - hash = (53 * hash) + getCompareDuration().hashCode(); - } - if (hasReadTime()) { - hash = (37 * hash) + READ_TIME_FIELD_NUMBER; - hash = (53 * hash) + getReadTime().hashCode(); - } - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.GroupAssetsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.GroupAssetsRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GroupAssetsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.GroupAssetsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GroupAssetsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.GroupAssetsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GroupAssetsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.GroupAssetsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GroupAssetsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.GroupAssetsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GroupAssetsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.GroupAssetsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.GroupAssetsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for grouping by assets.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.GroupAssetsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.GroupAssetsRequest) - com.google.cloud.securitycenter.v1.GroupAssetsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GroupAssetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GroupAssetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.GroupAssetsRequest.class, com.google.cloud.securitycenter.v1.GroupAssetsRequest.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.GroupAssetsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - filter_ = ""; - - groupBy_ = ""; - - if (compareDurationBuilder_ == null) { - compareDuration_ = null; - } else { - compareDuration_ = null; - compareDurationBuilder_ = null; - } - if (readTimeBuilder_ == null) { - readTime_ = null; - } else { - readTime_ = null; - readTimeBuilder_ = null; - } - pageToken_ = ""; - - pageSize_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GroupAssetsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GroupAssetsRequest getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.GroupAssetsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GroupAssetsRequest build() { - com.google.cloud.securitycenter.v1.GroupAssetsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GroupAssetsRequest buildPartial() { - com.google.cloud.securitycenter.v1.GroupAssetsRequest result = new com.google.cloud.securitycenter.v1.GroupAssetsRequest(this); - result.parent_ = parent_; - result.filter_ = filter_; - result.groupBy_ = groupBy_; - if (compareDurationBuilder_ == null) { - result.compareDuration_ = compareDuration_; - } else { - result.compareDuration_ = compareDurationBuilder_.build(); - } - if (readTimeBuilder_ == null) { - result.readTime_ = readTime_; - } else { - result.readTime_ = readTimeBuilder_.build(); - } - result.pageToken_ = pageToken_; - result.pageSize_ = pageSize_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.GroupAssetsRequest) { - return mergeFrom((com.google.cloud.securitycenter.v1.GroupAssetsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.GroupAssetsRequest other) { - if (other == com.google.cloud.securitycenter.v1.GroupAssetsRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - onChanged(); - } - if (!other.getGroupBy().isEmpty()) { - groupBy_ = other.groupBy_; - onChanged(); - } - if (other.hasCompareDuration()) { - mergeCompareDuration(other.getCompareDuration()); - } - if (other.hasReadTime()) { - mergeReadTime(other.getReadTime()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.GroupAssetsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.GroupAssetsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. Name of the organization to groupBy. Its format is
-     * "organizations/[organization_id], folders/[folder_id], or
-     * projects/[project_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Name of the organization to groupBy. Its format is
-     * "organizations/[organization_id], folders/[folder_id], or
-     * projects/[project_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Name of the organization to groupBy. Its format is
-     * "organizations/[organization_id], folders/[folder_id], or
-     * projects/[project_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Name of the organization to groupBy. Its format is
-     * "organizations/[organization_id], folders/[folder_id], or
-     * projects/[project_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. Name of the organization to groupBy. Its format is
-     * "organizations/[organization_id], folders/[folder_id], or
-     * projects/[project_id]".
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - *
-     * Expression that defines the filter to apply across assets.
-     * The expression is a list of zero or more restrictions combined via logical
-     * operators `AND` and `OR`.
-     * Parentheses are supported, and `OR` has higher precedence than `AND`.
-     * Restrictions have the form `<field> <operator> <value>` and may have a `-`
-     * character in front of them to indicate negation. The fields map to those
-     * defined in the Asset resource. Examples include:
-     * * name
-     * * security_center_properties.resource_name
-     * * resource_properties.a_property
-     * * security_marks.marks.marka
-     * The supported operators are:
-     * * `=` for all value types.
-     * * `>`, `<`, `>=`, `<=` for integer values.
-     * * `:`, meaning substring matching, for strings.
-     * The supported value types are:
-     * * string literals in quotes.
-     * * integer literals without quotes.
-     * * boolean literals `true` and `false` without quotes.
-     * The following field and operator combinations are supported:
-     * * name: `=`
-     * * update_time: `=`, `>`, `<`, `>=`, `<=`
-     *   Usage: This should be milliseconds since epoch or an RFC3339 string.
-     *   Examples:
-     *     `update_time = "2019-06-10T16:07:18-07:00"`
-     *     `update_time = 1560208038000`
-     * * create_time: `=`, `>`, `<`, `>=`, `<=`
-     *   Usage: This should be milliseconds since epoch or an RFC3339 string.
-     *   Examples:
-     *     `create_time = "2019-06-10T16:07:18-07:00"`
-     *     `create_time = 1560208038000`
-     * * iam_policy.policy_blob: `=`, `:`
-     * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=`
-     * * security_marks.marks: `=`, `:`
-     * * security_center_properties.resource_name: `=`, `:`
-     * * security_center_properties.resource_display_name: `=`, `:`
-     * * security_center_properties.resource_type: `=`, `:`
-     * * security_center_properties.resource_parent: `=`, `:`
-     * * security_center_properties.resource_parent_display_name: `=`, `:`
-     * * security_center_properties.resource_project: `=`, `:`
-     * * security_center_properties.resource_project_display_name: `=`, `:`
-     * * security_center_properties.resource_owners: `=`, `:`
-     * For example, `resource_properties.size = 100` is a valid filter string.
-     * Use a partial match on the empty string to filter based on a property
-     * existing: `resource_properties.my_property : ""`
-     * Use a negated partial match on the empty string to filter based on a
-     * property not existing: `-resource_properties.my_property : ""`
-     * 
- * - * string filter = 2; - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Expression that defines the filter to apply across assets.
-     * The expression is a list of zero or more restrictions combined via logical
-     * operators `AND` and `OR`.
-     * Parentheses are supported, and `OR` has higher precedence than `AND`.
-     * Restrictions have the form `<field> <operator> <value>` and may have a `-`
-     * character in front of them to indicate negation. The fields map to those
-     * defined in the Asset resource. Examples include:
-     * * name
-     * * security_center_properties.resource_name
-     * * resource_properties.a_property
-     * * security_marks.marks.marka
-     * The supported operators are:
-     * * `=` for all value types.
-     * * `>`, `<`, `>=`, `<=` for integer values.
-     * * `:`, meaning substring matching, for strings.
-     * The supported value types are:
-     * * string literals in quotes.
-     * * integer literals without quotes.
-     * * boolean literals `true` and `false` without quotes.
-     * The following field and operator combinations are supported:
-     * * name: `=`
-     * * update_time: `=`, `>`, `<`, `>=`, `<=`
-     *   Usage: This should be milliseconds since epoch or an RFC3339 string.
-     *   Examples:
-     *     `update_time = "2019-06-10T16:07:18-07:00"`
-     *     `update_time = 1560208038000`
-     * * create_time: `=`, `>`, `<`, `>=`, `<=`
-     *   Usage: This should be milliseconds since epoch or an RFC3339 string.
-     *   Examples:
-     *     `create_time = "2019-06-10T16:07:18-07:00"`
-     *     `create_time = 1560208038000`
-     * * iam_policy.policy_blob: `=`, `:`
-     * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=`
-     * * security_marks.marks: `=`, `:`
-     * * security_center_properties.resource_name: `=`, `:`
-     * * security_center_properties.resource_display_name: `=`, `:`
-     * * security_center_properties.resource_type: `=`, `:`
-     * * security_center_properties.resource_parent: `=`, `:`
-     * * security_center_properties.resource_parent_display_name: `=`, `:`
-     * * security_center_properties.resource_project: `=`, `:`
-     * * security_center_properties.resource_project_display_name: `=`, `:`
-     * * security_center_properties.resource_owners: `=`, `:`
-     * For example, `resource_properties.size = 100` is a valid filter string.
-     * Use a partial match on the empty string to filter based on a property
-     * existing: `resource_properties.my_property : ""`
-     * Use a negated partial match on the empty string to filter based on a
-     * property not existing: `-resource_properties.my_property : ""`
-     * 
- * - * string filter = 2; - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Expression that defines the filter to apply across assets.
-     * The expression is a list of zero or more restrictions combined via logical
-     * operators `AND` and `OR`.
-     * Parentheses are supported, and `OR` has higher precedence than `AND`.
-     * Restrictions have the form `<field> <operator> <value>` and may have a `-`
-     * character in front of them to indicate negation. The fields map to those
-     * defined in the Asset resource. Examples include:
-     * * name
-     * * security_center_properties.resource_name
-     * * resource_properties.a_property
-     * * security_marks.marks.marka
-     * The supported operators are:
-     * * `=` for all value types.
-     * * `>`, `<`, `>=`, `<=` for integer values.
-     * * `:`, meaning substring matching, for strings.
-     * The supported value types are:
-     * * string literals in quotes.
-     * * integer literals without quotes.
-     * * boolean literals `true` and `false` without quotes.
-     * The following field and operator combinations are supported:
-     * * name: `=`
-     * * update_time: `=`, `>`, `<`, `>=`, `<=`
-     *   Usage: This should be milliseconds since epoch or an RFC3339 string.
-     *   Examples:
-     *     `update_time = "2019-06-10T16:07:18-07:00"`
-     *     `update_time = 1560208038000`
-     * * create_time: `=`, `>`, `<`, `>=`, `<=`
-     *   Usage: This should be milliseconds since epoch or an RFC3339 string.
-     *   Examples:
-     *     `create_time = "2019-06-10T16:07:18-07:00"`
-     *     `create_time = 1560208038000`
-     * * iam_policy.policy_blob: `=`, `:`
-     * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=`
-     * * security_marks.marks: `=`, `:`
-     * * security_center_properties.resource_name: `=`, `:`
-     * * security_center_properties.resource_display_name: `=`, `:`
-     * * security_center_properties.resource_type: `=`, `:`
-     * * security_center_properties.resource_parent: `=`, `:`
-     * * security_center_properties.resource_parent_display_name: `=`, `:`
-     * * security_center_properties.resource_project: `=`, `:`
-     * * security_center_properties.resource_project_display_name: `=`, `:`
-     * * security_center_properties.resource_owners: `=`, `:`
-     * For example, `resource_properties.size = 100` is a valid filter string.
-     * Use a partial match on the empty string to filter based on a property
-     * existing: `resource_properties.my_property : ""`
-     * Use a negated partial match on the empty string to filter based on a
-     * property not existing: `-resource_properties.my_property : ""`
-     * 
- * - * string filter = 2; - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - filter_ = value; - onChanged(); - return this; - } - /** - *
-     * Expression that defines the filter to apply across assets.
-     * The expression is a list of zero or more restrictions combined via logical
-     * operators `AND` and `OR`.
-     * Parentheses are supported, and `OR` has higher precedence than `AND`.
-     * Restrictions have the form `<field> <operator> <value>` and may have a `-`
-     * character in front of them to indicate negation. The fields map to those
-     * defined in the Asset resource. Examples include:
-     * * name
-     * * security_center_properties.resource_name
-     * * resource_properties.a_property
-     * * security_marks.marks.marka
-     * The supported operators are:
-     * * `=` for all value types.
-     * * `>`, `<`, `>=`, `<=` for integer values.
-     * * `:`, meaning substring matching, for strings.
-     * The supported value types are:
-     * * string literals in quotes.
-     * * integer literals without quotes.
-     * * boolean literals `true` and `false` without quotes.
-     * The following field and operator combinations are supported:
-     * * name: `=`
-     * * update_time: `=`, `>`, `<`, `>=`, `<=`
-     *   Usage: This should be milliseconds since epoch or an RFC3339 string.
-     *   Examples:
-     *     `update_time = "2019-06-10T16:07:18-07:00"`
-     *     `update_time = 1560208038000`
-     * * create_time: `=`, `>`, `<`, `>=`, `<=`
-     *   Usage: This should be milliseconds since epoch or an RFC3339 string.
-     *   Examples:
-     *     `create_time = "2019-06-10T16:07:18-07:00"`
-     *     `create_time = 1560208038000`
-     * * iam_policy.policy_blob: `=`, `:`
-     * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=`
-     * * security_marks.marks: `=`, `:`
-     * * security_center_properties.resource_name: `=`, `:`
-     * * security_center_properties.resource_display_name: `=`, `:`
-     * * security_center_properties.resource_type: `=`, `:`
-     * * security_center_properties.resource_parent: `=`, `:`
-     * * security_center_properties.resource_parent_display_name: `=`, `:`
-     * * security_center_properties.resource_project: `=`, `:`
-     * * security_center_properties.resource_project_display_name: `=`, `:`
-     * * security_center_properties.resource_owners: `=`, `:`
-     * For example, `resource_properties.size = 100` is a valid filter string.
-     * Use a partial match on the empty string to filter based on a property
-     * existing: `resource_properties.my_property : ""`
-     * Use a negated partial match on the empty string to filter based on a
-     * property not existing: `-resource_properties.my_property : ""`
-     * 
- * - * string filter = 2; - * @return This builder for chaining. - */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - *
-     * Expression that defines the filter to apply across assets.
-     * The expression is a list of zero or more restrictions combined via logical
-     * operators `AND` and `OR`.
-     * Parentheses are supported, and `OR` has higher precedence than `AND`.
-     * Restrictions have the form `<field> <operator> <value>` and may have a `-`
-     * character in front of them to indicate negation. The fields map to those
-     * defined in the Asset resource. Examples include:
-     * * name
-     * * security_center_properties.resource_name
-     * * resource_properties.a_property
-     * * security_marks.marks.marka
-     * The supported operators are:
-     * * `=` for all value types.
-     * * `>`, `<`, `>=`, `<=` for integer values.
-     * * `:`, meaning substring matching, for strings.
-     * The supported value types are:
-     * * string literals in quotes.
-     * * integer literals without quotes.
-     * * boolean literals `true` and `false` without quotes.
-     * The following field and operator combinations are supported:
-     * * name: `=`
-     * * update_time: `=`, `>`, `<`, `>=`, `<=`
-     *   Usage: This should be milliseconds since epoch or an RFC3339 string.
-     *   Examples:
-     *     `update_time = "2019-06-10T16:07:18-07:00"`
-     *     `update_time = 1560208038000`
-     * * create_time: `=`, `>`, `<`, `>=`, `<=`
-     *   Usage: This should be milliseconds since epoch or an RFC3339 string.
-     *   Examples:
-     *     `create_time = "2019-06-10T16:07:18-07:00"`
-     *     `create_time = 1560208038000`
-     * * iam_policy.policy_blob: `=`, `:`
-     * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=`
-     * * security_marks.marks: `=`, `:`
-     * * security_center_properties.resource_name: `=`, `:`
-     * * security_center_properties.resource_display_name: `=`, `:`
-     * * security_center_properties.resource_type: `=`, `:`
-     * * security_center_properties.resource_parent: `=`, `:`
-     * * security_center_properties.resource_parent_display_name: `=`, `:`
-     * * security_center_properties.resource_project: `=`, `:`
-     * * security_center_properties.resource_project_display_name: `=`, `:`
-     * * security_center_properties.resource_owners: `=`, `:`
-     * For example, `resource_properties.size = 100` is a valid filter string.
-     * Use a partial match on the empty string to filter based on a property
-     * existing: `resource_properties.my_property : ""`
-     * Use a negated partial match on the empty string to filter based on a
-     * property not existing: `-resource_properties.my_property : ""`
-     * 
- * - * string filter = 2; - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - filter_ = value; - onChanged(); - return this; - } - - private java.lang.Object groupBy_ = ""; - /** - *
-     * Required. Expression that defines what assets fields to use for grouping. The string
-     * value should follow SQL syntax: comma separated list of fields. For
-     * example:
-     * "security_center_properties.resource_project,security_center_properties.project".
-     * The following fields are supported when compare_duration is not set:
-     * * security_center_properties.resource_project
-     * * security_center_properties.resource_project_display_name
-     * * security_center_properties.resource_type
-     * * security_center_properties.resource_parent
-     * * security_center_properties.resource_parent_display_name
-     * The following fields are supported when compare_duration is set:
-     * * security_center_properties.resource_type
-     * * security_center_properties.resource_project_display_name
-     * * security_center_properties.resource_parent_display_name
-     * 
- * - * string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The groupBy. - */ - public java.lang.String getGroupBy() { - java.lang.Object ref = groupBy_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - groupBy_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Expression that defines what assets fields to use for grouping. The string
-     * value should follow SQL syntax: comma separated list of fields. For
-     * example:
-     * "security_center_properties.resource_project,security_center_properties.project".
-     * The following fields are supported when compare_duration is not set:
-     * * security_center_properties.resource_project
-     * * security_center_properties.resource_project_display_name
-     * * security_center_properties.resource_type
-     * * security_center_properties.resource_parent
-     * * security_center_properties.resource_parent_display_name
-     * The following fields are supported when compare_duration is set:
-     * * security_center_properties.resource_type
-     * * security_center_properties.resource_project_display_name
-     * * security_center_properties.resource_parent_display_name
-     * 
- * - * string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for groupBy. - */ - public com.google.protobuf.ByteString - getGroupByBytes() { - java.lang.Object ref = groupBy_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - groupBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Expression that defines what assets fields to use for grouping. The string
-     * value should follow SQL syntax: comma separated list of fields. For
-     * example:
-     * "security_center_properties.resource_project,security_center_properties.project".
-     * The following fields are supported when compare_duration is not set:
-     * * security_center_properties.resource_project
-     * * security_center_properties.resource_project_display_name
-     * * security_center_properties.resource_type
-     * * security_center_properties.resource_parent
-     * * security_center_properties.resource_parent_display_name
-     * The following fields are supported when compare_duration is set:
-     * * security_center_properties.resource_type
-     * * security_center_properties.resource_project_display_name
-     * * security_center_properties.resource_parent_display_name
-     * 
- * - * string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param value The groupBy to set. - * @return This builder for chaining. - */ - public Builder setGroupBy( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - groupBy_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Expression that defines what assets fields to use for grouping. The string
-     * value should follow SQL syntax: comma separated list of fields. For
-     * example:
-     * "security_center_properties.resource_project,security_center_properties.project".
-     * The following fields are supported when compare_duration is not set:
-     * * security_center_properties.resource_project
-     * * security_center_properties.resource_project_display_name
-     * * security_center_properties.resource_type
-     * * security_center_properties.resource_parent
-     * * security_center_properties.resource_parent_display_name
-     * The following fields are supported when compare_duration is set:
-     * * security_center_properties.resource_type
-     * * security_center_properties.resource_project_display_name
-     * * security_center_properties.resource_parent_display_name
-     * 
- * - * string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearGroupBy() { - - groupBy_ = getDefaultInstance().getGroupBy(); - onChanged(); - return this; - } - /** - *
-     * Required. Expression that defines what assets fields to use for grouping. The string
-     * value should follow SQL syntax: comma separated list of fields. For
-     * example:
-     * "security_center_properties.resource_project,security_center_properties.project".
-     * The following fields are supported when compare_duration is not set:
-     * * security_center_properties.resource_project
-     * * security_center_properties.resource_project_display_name
-     * * security_center_properties.resource_type
-     * * security_center_properties.resource_parent
-     * * security_center_properties.resource_parent_display_name
-     * The following fields are supported when compare_duration is set:
-     * * security_center_properties.resource_type
-     * * security_center_properties.resource_project_display_name
-     * * security_center_properties.resource_parent_display_name
-     * 
- * - * string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for groupBy to set. - * @return This builder for chaining. - */ - public Builder setGroupByBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - groupBy_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Duration compareDuration_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> compareDurationBuilder_; - /** - *
-     * When compare_duration is set, the GroupResult's "state_change" property is
-     * updated to indicate whether the asset was added, removed, or remained
-     * present during the compare_duration period of time that precedes the
-     * read_time. This is the time between (read_time - compare_duration) and
-     * read_time.
-     * The state change value is derived based on the presence of the asset at the
-     * two points in time. Intermediate state changes between the two times don't
-     * affect the result. For example, the results aren't affected if the asset is
-     * removed and re-created again.
-     * Possible "state_change" values when compare_duration is specified:
-     * * "ADDED":   indicates that the asset was not present at the start of
-     *                compare_duration, but present at reference_time.
-     * * "REMOVED": indicates that the asset was present at the start of
-     *                compare_duration, but not present at reference_time.
-     * * "ACTIVE":  indicates that the asset was present at both the
-     *                start and the end of the time period defined by
-     *                compare_duration and reference_time.
-     * If compare_duration is not specified, then the only possible state_change
-     * is "UNUSED", which will be the state_change set for all assets present at
-     * read_time.
-     * If this field is set then `state_change` must be a specified field in
-     * `group_by`.
-     * 
- * - * .google.protobuf.Duration compare_duration = 4; - * @return Whether the compareDuration field is set. - */ - public boolean hasCompareDuration() { - return compareDurationBuilder_ != null || compareDuration_ != null; - } - /** - *
-     * When compare_duration is set, the GroupResult's "state_change" property is
-     * updated to indicate whether the asset was added, removed, or remained
-     * present during the compare_duration period of time that precedes the
-     * read_time. This is the time between (read_time - compare_duration) and
-     * read_time.
-     * The state change value is derived based on the presence of the asset at the
-     * two points in time. Intermediate state changes between the two times don't
-     * affect the result. For example, the results aren't affected if the asset is
-     * removed and re-created again.
-     * Possible "state_change" values when compare_duration is specified:
-     * * "ADDED":   indicates that the asset was not present at the start of
-     *                compare_duration, but present at reference_time.
-     * * "REMOVED": indicates that the asset was present at the start of
-     *                compare_duration, but not present at reference_time.
-     * * "ACTIVE":  indicates that the asset was present at both the
-     *                start and the end of the time period defined by
-     *                compare_duration and reference_time.
-     * If compare_duration is not specified, then the only possible state_change
-     * is "UNUSED", which will be the state_change set for all assets present at
-     * read_time.
-     * If this field is set then `state_change` must be a specified field in
-     * `group_by`.
-     * 
- * - * .google.protobuf.Duration compare_duration = 4; - * @return The compareDuration. - */ - public com.google.protobuf.Duration getCompareDuration() { - if (compareDurationBuilder_ == null) { - return compareDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : compareDuration_; - } else { - return compareDurationBuilder_.getMessage(); - } - } - /** - *
-     * When compare_duration is set, the GroupResult's "state_change" property is
-     * updated to indicate whether the asset was added, removed, or remained
-     * present during the compare_duration period of time that precedes the
-     * read_time. This is the time between (read_time - compare_duration) and
-     * read_time.
-     * The state change value is derived based on the presence of the asset at the
-     * two points in time. Intermediate state changes between the two times don't
-     * affect the result. For example, the results aren't affected if the asset is
-     * removed and re-created again.
-     * Possible "state_change" values when compare_duration is specified:
-     * * "ADDED":   indicates that the asset was not present at the start of
-     *                compare_duration, but present at reference_time.
-     * * "REMOVED": indicates that the asset was present at the start of
-     *                compare_duration, but not present at reference_time.
-     * * "ACTIVE":  indicates that the asset was present at both the
-     *                start and the end of the time period defined by
-     *                compare_duration and reference_time.
-     * If compare_duration is not specified, then the only possible state_change
-     * is "UNUSED", which will be the state_change set for all assets present at
-     * read_time.
-     * If this field is set then `state_change` must be a specified field in
-     * `group_by`.
-     * 
- * - * .google.protobuf.Duration compare_duration = 4; - */ - public Builder setCompareDuration(com.google.protobuf.Duration value) { - if (compareDurationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - compareDuration_ = value; - onChanged(); - } else { - compareDurationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * When compare_duration is set, the GroupResult's "state_change" property is
-     * updated to indicate whether the asset was added, removed, or remained
-     * present during the compare_duration period of time that precedes the
-     * read_time. This is the time between (read_time - compare_duration) and
-     * read_time.
-     * The state change value is derived based on the presence of the asset at the
-     * two points in time. Intermediate state changes between the two times don't
-     * affect the result. For example, the results aren't affected if the asset is
-     * removed and re-created again.
-     * Possible "state_change" values when compare_duration is specified:
-     * * "ADDED":   indicates that the asset was not present at the start of
-     *                compare_duration, but present at reference_time.
-     * * "REMOVED": indicates that the asset was present at the start of
-     *                compare_duration, but not present at reference_time.
-     * * "ACTIVE":  indicates that the asset was present at both the
-     *                start and the end of the time period defined by
-     *                compare_duration and reference_time.
-     * If compare_duration is not specified, then the only possible state_change
-     * is "UNUSED", which will be the state_change set for all assets present at
-     * read_time.
-     * If this field is set then `state_change` must be a specified field in
-     * `group_by`.
-     * 
- * - * .google.protobuf.Duration compare_duration = 4; - */ - public Builder setCompareDuration( - com.google.protobuf.Duration.Builder builderForValue) { - if (compareDurationBuilder_ == null) { - compareDuration_ = builderForValue.build(); - onChanged(); - } else { - compareDurationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * When compare_duration is set, the GroupResult's "state_change" property is
-     * updated to indicate whether the asset was added, removed, or remained
-     * present during the compare_duration period of time that precedes the
-     * read_time. This is the time between (read_time - compare_duration) and
-     * read_time.
-     * The state change value is derived based on the presence of the asset at the
-     * two points in time. Intermediate state changes between the two times don't
-     * affect the result. For example, the results aren't affected if the asset is
-     * removed and re-created again.
-     * Possible "state_change" values when compare_duration is specified:
-     * * "ADDED":   indicates that the asset was not present at the start of
-     *                compare_duration, but present at reference_time.
-     * * "REMOVED": indicates that the asset was present at the start of
-     *                compare_duration, but not present at reference_time.
-     * * "ACTIVE":  indicates that the asset was present at both the
-     *                start and the end of the time period defined by
-     *                compare_duration and reference_time.
-     * If compare_duration is not specified, then the only possible state_change
-     * is "UNUSED", which will be the state_change set for all assets present at
-     * read_time.
-     * If this field is set then `state_change` must be a specified field in
-     * `group_by`.
-     * 
- * - * .google.protobuf.Duration compare_duration = 4; - */ - public Builder mergeCompareDuration(com.google.protobuf.Duration value) { - if (compareDurationBuilder_ == null) { - if (compareDuration_ != null) { - compareDuration_ = - com.google.protobuf.Duration.newBuilder(compareDuration_).mergeFrom(value).buildPartial(); - } else { - compareDuration_ = value; - } - onChanged(); - } else { - compareDurationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * When compare_duration is set, the GroupResult's "state_change" property is
-     * updated to indicate whether the asset was added, removed, or remained
-     * present during the compare_duration period of time that precedes the
-     * read_time. This is the time between (read_time - compare_duration) and
-     * read_time.
-     * The state change value is derived based on the presence of the asset at the
-     * two points in time. Intermediate state changes between the two times don't
-     * affect the result. For example, the results aren't affected if the asset is
-     * removed and re-created again.
-     * Possible "state_change" values when compare_duration is specified:
-     * * "ADDED":   indicates that the asset was not present at the start of
-     *                compare_duration, but present at reference_time.
-     * * "REMOVED": indicates that the asset was present at the start of
-     *                compare_duration, but not present at reference_time.
-     * * "ACTIVE":  indicates that the asset was present at both the
-     *                start and the end of the time period defined by
-     *                compare_duration and reference_time.
-     * If compare_duration is not specified, then the only possible state_change
-     * is "UNUSED", which will be the state_change set for all assets present at
-     * read_time.
-     * If this field is set then `state_change` must be a specified field in
-     * `group_by`.
-     * 
- * - * .google.protobuf.Duration compare_duration = 4; - */ - public Builder clearCompareDuration() { - if (compareDurationBuilder_ == null) { - compareDuration_ = null; - onChanged(); - } else { - compareDuration_ = null; - compareDurationBuilder_ = null; - } - - return this; - } - /** - *
-     * When compare_duration is set, the GroupResult's "state_change" property is
-     * updated to indicate whether the asset was added, removed, or remained
-     * present during the compare_duration period of time that precedes the
-     * read_time. This is the time between (read_time - compare_duration) and
-     * read_time.
-     * The state change value is derived based on the presence of the asset at the
-     * two points in time. Intermediate state changes between the two times don't
-     * affect the result. For example, the results aren't affected if the asset is
-     * removed and re-created again.
-     * Possible "state_change" values when compare_duration is specified:
-     * * "ADDED":   indicates that the asset was not present at the start of
-     *                compare_duration, but present at reference_time.
-     * * "REMOVED": indicates that the asset was present at the start of
-     *                compare_duration, but not present at reference_time.
-     * * "ACTIVE":  indicates that the asset was present at both the
-     *                start and the end of the time period defined by
-     *                compare_duration and reference_time.
-     * If compare_duration is not specified, then the only possible state_change
-     * is "UNUSED", which will be the state_change set for all assets present at
-     * read_time.
-     * If this field is set then `state_change` must be a specified field in
-     * `group_by`.
-     * 
- * - * .google.protobuf.Duration compare_duration = 4; - */ - public com.google.protobuf.Duration.Builder getCompareDurationBuilder() { - - onChanged(); - return getCompareDurationFieldBuilder().getBuilder(); - } - /** - *
-     * When compare_duration is set, the GroupResult's "state_change" property is
-     * updated to indicate whether the asset was added, removed, or remained
-     * present during the compare_duration period of time that precedes the
-     * read_time. This is the time between (read_time - compare_duration) and
-     * read_time.
-     * The state change value is derived based on the presence of the asset at the
-     * two points in time. Intermediate state changes between the two times don't
-     * affect the result. For example, the results aren't affected if the asset is
-     * removed and re-created again.
-     * Possible "state_change" values when compare_duration is specified:
-     * * "ADDED":   indicates that the asset was not present at the start of
-     *                compare_duration, but present at reference_time.
-     * * "REMOVED": indicates that the asset was present at the start of
-     *                compare_duration, but not present at reference_time.
-     * * "ACTIVE":  indicates that the asset was present at both the
-     *                start and the end of the time period defined by
-     *                compare_duration and reference_time.
-     * If compare_duration is not specified, then the only possible state_change
-     * is "UNUSED", which will be the state_change set for all assets present at
-     * read_time.
-     * If this field is set then `state_change` must be a specified field in
-     * `group_by`.
-     * 
- * - * .google.protobuf.Duration compare_duration = 4; - */ - public com.google.protobuf.DurationOrBuilder getCompareDurationOrBuilder() { - if (compareDurationBuilder_ != null) { - return compareDurationBuilder_.getMessageOrBuilder(); - } else { - return compareDuration_ == null ? - com.google.protobuf.Duration.getDefaultInstance() : compareDuration_; - } - } - /** - *
-     * When compare_duration is set, the GroupResult's "state_change" property is
-     * updated to indicate whether the asset was added, removed, or remained
-     * present during the compare_duration period of time that precedes the
-     * read_time. This is the time between (read_time - compare_duration) and
-     * read_time.
-     * The state change value is derived based on the presence of the asset at the
-     * two points in time. Intermediate state changes between the two times don't
-     * affect the result. For example, the results aren't affected if the asset is
-     * removed and re-created again.
-     * Possible "state_change" values when compare_duration is specified:
-     * * "ADDED":   indicates that the asset was not present at the start of
-     *                compare_duration, but present at reference_time.
-     * * "REMOVED": indicates that the asset was present at the start of
-     *                compare_duration, but not present at reference_time.
-     * * "ACTIVE":  indicates that the asset was present at both the
-     *                start and the end of the time period defined by
-     *                compare_duration and reference_time.
-     * If compare_duration is not specified, then the only possible state_change
-     * is "UNUSED", which will be the state_change set for all assets present at
-     * read_time.
-     * If this field is set then `state_change` must be a specified field in
-     * `group_by`.
-     * 
- * - * .google.protobuf.Duration compare_duration = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getCompareDurationFieldBuilder() { - if (compareDurationBuilder_ == null) { - compareDurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - getCompareDuration(), - getParentForChildren(), - isClean()); - compareDuration_ = null; - } - return compareDurationBuilder_; - } - - private com.google.protobuf.Timestamp readTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; - /** - *
-     * Time used as a reference point when filtering assets. The filter is limited
-     * to assets existing at the supplied time and their values are those at that
-     * specific time. Absence of this field will default to the API's version of
-     * NOW.
-     * 
- * - * .google.protobuf.Timestamp read_time = 5; - * @return Whether the readTime field is set. - */ - public boolean hasReadTime() { - return readTimeBuilder_ != null || readTime_ != null; - } - /** - *
-     * Time used as a reference point when filtering assets. The filter is limited
-     * to assets existing at the supplied time and their values are those at that
-     * specific time. Absence of this field will default to the API's version of
-     * NOW.
-     * 
- * - * .google.protobuf.Timestamp read_time = 5; - * @return The readTime. - */ - public com.google.protobuf.Timestamp getReadTime() { - if (readTimeBuilder_ == null) { - return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } else { - return readTimeBuilder_.getMessage(); - } - } - /** - *
-     * Time used as a reference point when filtering assets. The filter is limited
-     * to assets existing at the supplied time and their values are those at that
-     * specific time. Absence of this field will default to the API's version of
-     * NOW.
-     * 
- * - * .google.protobuf.Timestamp read_time = 5; - */ - public Builder setReadTime(com.google.protobuf.Timestamp value) { - if (readTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - readTime_ = value; - onChanged(); - } else { - readTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Time used as a reference point when filtering assets. The filter is limited
-     * to assets existing at the supplied time and their values are those at that
-     * specific time. Absence of this field will default to the API's version of
-     * NOW.
-     * 
- * - * .google.protobuf.Timestamp read_time = 5; - */ - public Builder setReadTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (readTimeBuilder_ == null) { - readTime_ = builderForValue.build(); - onChanged(); - } else { - readTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Time used as a reference point when filtering assets. The filter is limited
-     * to assets existing at the supplied time and their values are those at that
-     * specific time. Absence of this field will default to the API's version of
-     * NOW.
-     * 
- * - * .google.protobuf.Timestamp read_time = 5; - */ - public Builder mergeReadTime(com.google.protobuf.Timestamp value) { - if (readTimeBuilder_ == null) { - if (readTime_ != null) { - readTime_ = - com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial(); - } else { - readTime_ = value; - } - onChanged(); - } else { - readTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Time used as a reference point when filtering assets. The filter is limited
-     * to assets existing at the supplied time and their values are those at that
-     * specific time. Absence of this field will default to the API's version of
-     * NOW.
-     * 
- * - * .google.protobuf.Timestamp read_time = 5; - */ - public Builder clearReadTime() { - if (readTimeBuilder_ == null) { - readTime_ = null; - onChanged(); - } else { - readTime_ = null; - readTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Time used as a reference point when filtering assets. The filter is limited
-     * to assets existing at the supplied time and their values are those at that
-     * specific time. Absence of this field will default to the API's version of
-     * NOW.
-     * 
- * - * .google.protobuf.Timestamp read_time = 5; - */ - public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { - - onChanged(); - return getReadTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Time used as a reference point when filtering assets. The filter is limited
-     * to assets existing at the supplied time and their values are those at that
-     * specific time. Absence of this field will default to the API's version of
-     * NOW.
-     * 
- * - * .google.protobuf.Timestamp read_time = 5; - */ - public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { - if (readTimeBuilder_ != null) { - return readTimeBuilder_.getMessageOrBuilder(); - } else { - return readTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } - } - /** - *
-     * Time used as a reference point when filtering assets. The filter is limited
-     * to assets existing at the supplied time and their values are those at that
-     * specific time. Absence of this field will default to the API's version of
-     * NOW.
-     * 
- * - * .google.protobuf.Timestamp read_time = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getReadTimeFieldBuilder() { - if (readTimeBuilder_ == null) { - readTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getReadTime(), - getParentForChildren(), - isClean()); - readTime_ = null; - } - return readTimeBuilder_; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * The value returned by the last `GroupAssetsResponse`; indicates
-     * that this is a continuation of a prior `GroupAssets` call, and that the
-     * system should return the next page of data.
-     * 
- * - * string page_token = 7; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The value returned by the last `GroupAssetsResponse`; indicates
-     * that this is a continuation of a prior `GroupAssets` call, and that the
-     * system should return the next page of data.
-     * 
- * - * string page_token = 7; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The value returned by the last `GroupAssetsResponse`; indicates
-     * that this is a continuation of a prior `GroupAssets` call, and that the
-     * system should return the next page of data.
-     * 
- * - * string page_token = 7; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * The value returned by the last `GroupAssetsResponse`; indicates
-     * that this is a continuation of a prior `GroupAssets` call, and that the
-     * system should return the next page of data.
-     * 
- * - * string page_token = 7; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * The value returned by the last `GroupAssetsResponse`; indicates
-     * that this is a continuation of a prior `GroupAssets` call, and that the
-     * system should return the next page of data.
-     * 
- * - * string page_token = 7; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * The maximum number of results to return in a single response. Default is
-     * 10, minimum is 1, maximum is 1000.
-     * 
- * - * int32 page_size = 8; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * The maximum number of results to return in a single response. Default is
-     * 10, minimum is 1, maximum is 1000.
-     * 
- * - * int32 page_size = 8; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The maximum number of results to return in a single response. Default is
-     * 10, minimum is 1, maximum is 1000.
-     * 
- * - * int32 page_size = 8; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.GroupAssetsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.GroupAssetsRequest) - private static final com.google.cloud.securitycenter.v1.GroupAssetsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.GroupAssetsRequest(); - } - - public static com.google.cloud.securitycenter.v1.GroupAssetsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GroupAssetsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GroupAssetsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GroupAssetsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupAssetsRequestOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupAssetsRequestOrBuilder.java deleted file mode 100644 index e24e974e8bf8..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupAssetsRequestOrBuilder.java +++ /dev/null @@ -1,352 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -public interface GroupAssetsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.GroupAssetsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Name of the organization to groupBy. Its format is
-   * "organizations/[organization_id], folders/[folder_id], or
-   * projects/[project_id]".
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. Name of the organization to groupBy. Its format is
-   * "organizations/[organization_id], folders/[folder_id], or
-   * projects/[project_id]".
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Expression that defines the filter to apply across assets.
-   * The expression is a list of zero or more restrictions combined via logical
-   * operators `AND` and `OR`.
-   * Parentheses are supported, and `OR` has higher precedence than `AND`.
-   * Restrictions have the form `<field> <operator> <value>` and may have a `-`
-   * character in front of them to indicate negation. The fields map to those
-   * defined in the Asset resource. Examples include:
-   * * name
-   * * security_center_properties.resource_name
-   * * resource_properties.a_property
-   * * security_marks.marks.marka
-   * The supported operators are:
-   * * `=` for all value types.
-   * * `>`, `<`, `>=`, `<=` for integer values.
-   * * `:`, meaning substring matching, for strings.
-   * The supported value types are:
-   * * string literals in quotes.
-   * * integer literals without quotes.
-   * * boolean literals `true` and `false` without quotes.
-   * The following field and operator combinations are supported:
-   * * name: `=`
-   * * update_time: `=`, `>`, `<`, `>=`, `<=`
-   *   Usage: This should be milliseconds since epoch or an RFC3339 string.
-   *   Examples:
-   *     `update_time = "2019-06-10T16:07:18-07:00"`
-   *     `update_time = 1560208038000`
-   * * create_time: `=`, `>`, `<`, `>=`, `<=`
-   *   Usage: This should be milliseconds since epoch or an RFC3339 string.
-   *   Examples:
-   *     `create_time = "2019-06-10T16:07:18-07:00"`
-   *     `create_time = 1560208038000`
-   * * iam_policy.policy_blob: `=`, `:`
-   * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=`
-   * * security_marks.marks: `=`, `:`
-   * * security_center_properties.resource_name: `=`, `:`
-   * * security_center_properties.resource_display_name: `=`, `:`
-   * * security_center_properties.resource_type: `=`, `:`
-   * * security_center_properties.resource_parent: `=`, `:`
-   * * security_center_properties.resource_parent_display_name: `=`, `:`
-   * * security_center_properties.resource_project: `=`, `:`
-   * * security_center_properties.resource_project_display_name: `=`, `:`
-   * * security_center_properties.resource_owners: `=`, `:`
-   * For example, `resource_properties.size = 100` is a valid filter string.
-   * Use a partial match on the empty string to filter based on a property
-   * existing: `resource_properties.my_property : ""`
-   * Use a negated partial match on the empty string to filter based on a
-   * property not existing: `-resource_properties.my_property : ""`
-   * 
- * - * string filter = 2; - * @return The filter. - */ - java.lang.String getFilter(); - /** - *
-   * Expression that defines the filter to apply across assets.
-   * The expression is a list of zero or more restrictions combined via logical
-   * operators `AND` and `OR`.
-   * Parentheses are supported, and `OR` has higher precedence than `AND`.
-   * Restrictions have the form `<field> <operator> <value>` and may have a `-`
-   * character in front of them to indicate negation. The fields map to those
-   * defined in the Asset resource. Examples include:
-   * * name
-   * * security_center_properties.resource_name
-   * * resource_properties.a_property
-   * * security_marks.marks.marka
-   * The supported operators are:
-   * * `=` for all value types.
-   * * `>`, `<`, `>=`, `<=` for integer values.
-   * * `:`, meaning substring matching, for strings.
-   * The supported value types are:
-   * * string literals in quotes.
-   * * integer literals without quotes.
-   * * boolean literals `true` and `false` without quotes.
-   * The following field and operator combinations are supported:
-   * * name: `=`
-   * * update_time: `=`, `>`, `<`, `>=`, `<=`
-   *   Usage: This should be milliseconds since epoch or an RFC3339 string.
-   *   Examples:
-   *     `update_time = "2019-06-10T16:07:18-07:00"`
-   *     `update_time = 1560208038000`
-   * * create_time: `=`, `>`, `<`, `>=`, `<=`
-   *   Usage: This should be milliseconds since epoch or an RFC3339 string.
-   *   Examples:
-   *     `create_time = "2019-06-10T16:07:18-07:00"`
-   *     `create_time = 1560208038000`
-   * * iam_policy.policy_blob: `=`, `:`
-   * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=`
-   * * security_marks.marks: `=`, `:`
-   * * security_center_properties.resource_name: `=`, `:`
-   * * security_center_properties.resource_display_name: `=`, `:`
-   * * security_center_properties.resource_type: `=`, `:`
-   * * security_center_properties.resource_parent: `=`, `:`
-   * * security_center_properties.resource_parent_display_name: `=`, `:`
-   * * security_center_properties.resource_project: `=`, `:`
-   * * security_center_properties.resource_project_display_name: `=`, `:`
-   * * security_center_properties.resource_owners: `=`, `:`
-   * For example, `resource_properties.size = 100` is a valid filter string.
-   * Use a partial match on the empty string to filter based on a property
-   * existing: `resource_properties.my_property : ""`
-   * Use a negated partial match on the empty string to filter based on a
-   * property not existing: `-resource_properties.my_property : ""`
-   * 
- * - * string filter = 2; - * @return The bytes for filter. - */ - com.google.protobuf.ByteString - getFilterBytes(); - - /** - *
-   * Required. Expression that defines what assets fields to use for grouping. The string
-   * value should follow SQL syntax: comma separated list of fields. For
-   * example:
-   * "security_center_properties.resource_project,security_center_properties.project".
-   * The following fields are supported when compare_duration is not set:
-   * * security_center_properties.resource_project
-   * * security_center_properties.resource_project_display_name
-   * * security_center_properties.resource_type
-   * * security_center_properties.resource_parent
-   * * security_center_properties.resource_parent_display_name
-   * The following fields are supported when compare_duration is set:
-   * * security_center_properties.resource_type
-   * * security_center_properties.resource_project_display_name
-   * * security_center_properties.resource_parent_display_name
-   * 
- * - * string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The groupBy. - */ - java.lang.String getGroupBy(); - /** - *
-   * Required. Expression that defines what assets fields to use for grouping. The string
-   * value should follow SQL syntax: comma separated list of fields. For
-   * example:
-   * "security_center_properties.resource_project,security_center_properties.project".
-   * The following fields are supported when compare_duration is not set:
-   * * security_center_properties.resource_project
-   * * security_center_properties.resource_project_display_name
-   * * security_center_properties.resource_type
-   * * security_center_properties.resource_parent
-   * * security_center_properties.resource_parent_display_name
-   * The following fields are supported when compare_duration is set:
-   * * security_center_properties.resource_type
-   * * security_center_properties.resource_project_display_name
-   * * security_center_properties.resource_parent_display_name
-   * 
- * - * string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for groupBy. - */ - com.google.protobuf.ByteString - getGroupByBytes(); - - /** - *
-   * When compare_duration is set, the GroupResult's "state_change" property is
-   * updated to indicate whether the asset was added, removed, or remained
-   * present during the compare_duration period of time that precedes the
-   * read_time. This is the time between (read_time - compare_duration) and
-   * read_time.
-   * The state change value is derived based on the presence of the asset at the
-   * two points in time. Intermediate state changes between the two times don't
-   * affect the result. For example, the results aren't affected if the asset is
-   * removed and re-created again.
-   * Possible "state_change" values when compare_duration is specified:
-   * * "ADDED":   indicates that the asset was not present at the start of
-   *                compare_duration, but present at reference_time.
-   * * "REMOVED": indicates that the asset was present at the start of
-   *                compare_duration, but not present at reference_time.
-   * * "ACTIVE":  indicates that the asset was present at both the
-   *                start and the end of the time period defined by
-   *                compare_duration and reference_time.
-   * If compare_duration is not specified, then the only possible state_change
-   * is "UNUSED", which will be the state_change set for all assets present at
-   * read_time.
-   * If this field is set then `state_change` must be a specified field in
-   * `group_by`.
-   * 
- * - * .google.protobuf.Duration compare_duration = 4; - * @return Whether the compareDuration field is set. - */ - boolean hasCompareDuration(); - /** - *
-   * When compare_duration is set, the GroupResult's "state_change" property is
-   * updated to indicate whether the asset was added, removed, or remained
-   * present during the compare_duration period of time that precedes the
-   * read_time. This is the time between (read_time - compare_duration) and
-   * read_time.
-   * The state change value is derived based on the presence of the asset at the
-   * two points in time. Intermediate state changes between the two times don't
-   * affect the result. For example, the results aren't affected if the asset is
-   * removed and re-created again.
-   * Possible "state_change" values when compare_duration is specified:
-   * * "ADDED":   indicates that the asset was not present at the start of
-   *                compare_duration, but present at reference_time.
-   * * "REMOVED": indicates that the asset was present at the start of
-   *                compare_duration, but not present at reference_time.
-   * * "ACTIVE":  indicates that the asset was present at both the
-   *                start and the end of the time period defined by
-   *                compare_duration and reference_time.
-   * If compare_duration is not specified, then the only possible state_change
-   * is "UNUSED", which will be the state_change set for all assets present at
-   * read_time.
-   * If this field is set then `state_change` must be a specified field in
-   * `group_by`.
-   * 
- * - * .google.protobuf.Duration compare_duration = 4; - * @return The compareDuration. - */ - com.google.protobuf.Duration getCompareDuration(); - /** - *
-   * When compare_duration is set, the GroupResult's "state_change" property is
-   * updated to indicate whether the asset was added, removed, or remained
-   * present during the compare_duration period of time that precedes the
-   * read_time. This is the time between (read_time - compare_duration) and
-   * read_time.
-   * The state change value is derived based on the presence of the asset at the
-   * two points in time. Intermediate state changes between the two times don't
-   * affect the result. For example, the results aren't affected if the asset is
-   * removed and re-created again.
-   * Possible "state_change" values when compare_duration is specified:
-   * * "ADDED":   indicates that the asset was not present at the start of
-   *                compare_duration, but present at reference_time.
-   * * "REMOVED": indicates that the asset was present at the start of
-   *                compare_duration, but not present at reference_time.
-   * * "ACTIVE":  indicates that the asset was present at both the
-   *                start and the end of the time period defined by
-   *                compare_duration and reference_time.
-   * If compare_duration is not specified, then the only possible state_change
-   * is "UNUSED", which will be the state_change set for all assets present at
-   * read_time.
-   * If this field is set then `state_change` must be a specified field in
-   * `group_by`.
-   * 
- * - * .google.protobuf.Duration compare_duration = 4; - */ - com.google.protobuf.DurationOrBuilder getCompareDurationOrBuilder(); - - /** - *
-   * Time used as a reference point when filtering assets. The filter is limited
-   * to assets existing at the supplied time and their values are those at that
-   * specific time. Absence of this field will default to the API's version of
-   * NOW.
-   * 
- * - * .google.protobuf.Timestamp read_time = 5; - * @return Whether the readTime field is set. - */ - boolean hasReadTime(); - /** - *
-   * Time used as a reference point when filtering assets. The filter is limited
-   * to assets existing at the supplied time and their values are those at that
-   * specific time. Absence of this field will default to the API's version of
-   * NOW.
-   * 
- * - * .google.protobuf.Timestamp read_time = 5; - * @return The readTime. - */ - com.google.protobuf.Timestamp getReadTime(); - /** - *
-   * Time used as a reference point when filtering assets. The filter is limited
-   * to assets existing at the supplied time and their values are those at that
-   * specific time. Absence of this field will default to the API's version of
-   * NOW.
-   * 
- * - * .google.protobuf.Timestamp read_time = 5; - */ - com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder(); - - /** - *
-   * The value returned by the last `GroupAssetsResponse`; indicates
-   * that this is a continuation of a prior `GroupAssets` call, and that the
-   * system should return the next page of data.
-   * 
- * - * string page_token = 7; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * The value returned by the last `GroupAssetsResponse`; indicates
-   * that this is a continuation of a prior `GroupAssets` call, and that the
-   * system should return the next page of data.
-   * 
- * - * string page_token = 7; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); - - /** - *
-   * The maximum number of results to return in a single response. Default is
-   * 10, minimum is 1, maximum is 1000.
-   * 
- * - * int32 page_size = 8; - * @return The pageSize. - */ - int getPageSize(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupAssetsResponse.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupAssetsResponse.java deleted file mode 100644 index bb81d58912fd..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupAssetsResponse.java +++ /dev/null @@ -1,1407 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Response message for grouping by assets.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.GroupAssetsResponse} - */ -public final class GroupAssetsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.GroupAssetsResponse) - GroupAssetsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use GroupAssetsResponse.newBuilder() to construct. - private GroupAssetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GroupAssetsResponse() { - groupByResults_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GroupAssetsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GroupAssetsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - groupByResults_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - groupByResults_.add( - input.readMessage(com.google.cloud.securitycenter.v1.GroupResult.parser(), extensionRegistry)); - break; - } - case 18: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (readTime_ != null) { - subBuilder = readTime_.toBuilder(); - } - readTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(readTime_); - readTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - case 32: { - - totalSize_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - groupByResults_ = java.util.Collections.unmodifiableList(groupByResults_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GroupAssetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GroupAssetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.GroupAssetsResponse.class, com.google.cloud.securitycenter.v1.GroupAssetsResponse.Builder.class); - } - - public static final int GROUP_BY_RESULTS_FIELD_NUMBER = 1; - private java.util.List groupByResults_; - /** - *
-   * Group results. There exists an element for each existing unique
-   * combination of property/values. The element contains a count for the number
-   * of times those specific property/values appear.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - @java.lang.Override - public java.util.List getGroupByResultsList() { - return groupByResults_; - } - /** - *
-   * Group results. There exists an element for each existing unique
-   * combination of property/values. The element contains a count for the number
-   * of times those specific property/values appear.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - @java.lang.Override - public java.util.List - getGroupByResultsOrBuilderList() { - return groupByResults_; - } - /** - *
-   * Group results. There exists an element for each existing unique
-   * combination of property/values. The element contains a count for the number
-   * of times those specific property/values appear.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - @java.lang.Override - public int getGroupByResultsCount() { - return groupByResults_.size(); - } - /** - *
-   * Group results. There exists an element for each existing unique
-   * combination of property/values. The element contains a count for the number
-   * of times those specific property/values appear.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.GroupResult getGroupByResults(int index) { - return groupByResults_.get(index); - } - /** - *
-   * Group results. There exists an element for each existing unique
-   * combination of property/values. The element contains a count for the number
-   * of times those specific property/values appear.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.GroupResultOrBuilder getGroupByResultsOrBuilder( - int index) { - return groupByResults_.get(index); - } - - public static final int READ_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp readTime_; - /** - *
-   * Time used for executing the groupBy request.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return Whether the readTime field is set. - */ - @java.lang.Override - public boolean hasReadTime() { - return readTime_ != null; - } - /** - *
-   * Time used for executing the groupBy request.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return The readTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getReadTime() { - return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } - /** - *
-   * Time used for executing the groupBy request.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { - return getReadTime(); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results.
-   * 
- * - * string next_page_token = 3; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results.
-   * 
- * - * string next_page_token = 3; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TOTAL_SIZE_FIELD_NUMBER = 4; - private int totalSize_; - /** - *
-   * The total number of results matching the query.
-   * 
- * - * int32 total_size = 4; - * @return The totalSize. - */ - @java.lang.Override - public int getTotalSize() { - return totalSize_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < groupByResults_.size(); i++) { - output.writeMessage(1, groupByResults_.get(i)); - } - if (readTime_ != null) { - output.writeMessage(2, getReadTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nextPageToken_); - } - if (totalSize_ != 0) { - output.writeInt32(4, totalSize_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < groupByResults_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, groupByResults_.get(i)); - } - if (readTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getReadTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nextPageToken_); - } - if (totalSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(4, totalSize_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.GroupAssetsResponse)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.GroupAssetsResponse other = (com.google.cloud.securitycenter.v1.GroupAssetsResponse) obj; - - if (!getGroupByResultsList() - .equals(other.getGroupByResultsList())) return false; - if (hasReadTime() != other.hasReadTime()) return false; - if (hasReadTime()) { - if (!getReadTime() - .equals(other.getReadTime())) return false; - } - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (getTotalSize() - != other.getTotalSize()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getGroupByResultsCount() > 0) { - hash = (37 * hash) + GROUP_BY_RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getGroupByResultsList().hashCode(); - } - if (hasReadTime()) { - hash = (37 * hash) + READ_TIME_FIELD_NUMBER; - hash = (53 * hash) + getReadTime().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (37 * hash) + TOTAL_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getTotalSize(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.GroupAssetsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.GroupAssetsResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GroupAssetsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.GroupAssetsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GroupAssetsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.GroupAssetsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GroupAssetsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.GroupAssetsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GroupAssetsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.GroupAssetsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GroupAssetsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.GroupAssetsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.GroupAssetsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response message for grouping by assets.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.GroupAssetsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.GroupAssetsResponse) - com.google.cloud.securitycenter.v1.GroupAssetsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GroupAssetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GroupAssetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.GroupAssetsResponse.class, com.google.cloud.securitycenter.v1.GroupAssetsResponse.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.GroupAssetsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getGroupByResultsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (groupByResultsBuilder_ == null) { - groupByResults_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - groupByResultsBuilder_.clear(); - } - if (readTimeBuilder_ == null) { - readTime_ = null; - } else { - readTime_ = null; - readTimeBuilder_ = null; - } - nextPageToken_ = ""; - - totalSize_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GroupAssetsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GroupAssetsResponse getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.GroupAssetsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GroupAssetsResponse build() { - com.google.cloud.securitycenter.v1.GroupAssetsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GroupAssetsResponse buildPartial() { - com.google.cloud.securitycenter.v1.GroupAssetsResponse result = new com.google.cloud.securitycenter.v1.GroupAssetsResponse(this); - int from_bitField0_ = bitField0_; - if (groupByResultsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - groupByResults_ = java.util.Collections.unmodifiableList(groupByResults_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.groupByResults_ = groupByResults_; - } else { - result.groupByResults_ = groupByResultsBuilder_.build(); - } - if (readTimeBuilder_ == null) { - result.readTime_ = readTime_; - } else { - result.readTime_ = readTimeBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - result.totalSize_ = totalSize_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.GroupAssetsResponse) { - return mergeFrom((com.google.cloud.securitycenter.v1.GroupAssetsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.GroupAssetsResponse other) { - if (other == com.google.cloud.securitycenter.v1.GroupAssetsResponse.getDefaultInstance()) return this; - if (groupByResultsBuilder_ == null) { - if (!other.groupByResults_.isEmpty()) { - if (groupByResults_.isEmpty()) { - groupByResults_ = other.groupByResults_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureGroupByResultsIsMutable(); - groupByResults_.addAll(other.groupByResults_); - } - onChanged(); - } - } else { - if (!other.groupByResults_.isEmpty()) { - if (groupByResultsBuilder_.isEmpty()) { - groupByResultsBuilder_.dispose(); - groupByResultsBuilder_ = null; - groupByResults_ = other.groupByResults_; - bitField0_ = (bitField0_ & ~0x00000001); - groupByResultsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getGroupByResultsFieldBuilder() : null; - } else { - groupByResultsBuilder_.addAllMessages(other.groupByResults_); - } - } - } - if (other.hasReadTime()) { - mergeReadTime(other.getReadTime()); - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - if (other.getTotalSize() != 0) { - setTotalSize(other.getTotalSize()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.GroupAssetsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.GroupAssetsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List groupByResults_ = - java.util.Collections.emptyList(); - private void ensureGroupByResultsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - groupByResults_ = new java.util.ArrayList(groupByResults_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.GroupResult, com.google.cloud.securitycenter.v1.GroupResult.Builder, com.google.cloud.securitycenter.v1.GroupResultOrBuilder> groupByResultsBuilder_; - - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public java.util.List getGroupByResultsList() { - if (groupByResultsBuilder_ == null) { - return java.util.Collections.unmodifiableList(groupByResults_); - } else { - return groupByResultsBuilder_.getMessageList(); - } - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public int getGroupByResultsCount() { - if (groupByResultsBuilder_ == null) { - return groupByResults_.size(); - } else { - return groupByResultsBuilder_.getCount(); - } - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public com.google.cloud.securitycenter.v1.GroupResult getGroupByResults(int index) { - if (groupByResultsBuilder_ == null) { - return groupByResults_.get(index); - } else { - return groupByResultsBuilder_.getMessage(index); - } - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public Builder setGroupByResults( - int index, com.google.cloud.securitycenter.v1.GroupResult value) { - if (groupByResultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureGroupByResultsIsMutable(); - groupByResults_.set(index, value); - onChanged(); - } else { - groupByResultsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public Builder setGroupByResults( - int index, com.google.cloud.securitycenter.v1.GroupResult.Builder builderForValue) { - if (groupByResultsBuilder_ == null) { - ensureGroupByResultsIsMutable(); - groupByResults_.set(index, builderForValue.build()); - onChanged(); - } else { - groupByResultsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public Builder addGroupByResults(com.google.cloud.securitycenter.v1.GroupResult value) { - if (groupByResultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureGroupByResultsIsMutable(); - groupByResults_.add(value); - onChanged(); - } else { - groupByResultsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public Builder addGroupByResults( - int index, com.google.cloud.securitycenter.v1.GroupResult value) { - if (groupByResultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureGroupByResultsIsMutable(); - groupByResults_.add(index, value); - onChanged(); - } else { - groupByResultsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public Builder addGroupByResults( - com.google.cloud.securitycenter.v1.GroupResult.Builder builderForValue) { - if (groupByResultsBuilder_ == null) { - ensureGroupByResultsIsMutable(); - groupByResults_.add(builderForValue.build()); - onChanged(); - } else { - groupByResultsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public Builder addGroupByResults( - int index, com.google.cloud.securitycenter.v1.GroupResult.Builder builderForValue) { - if (groupByResultsBuilder_ == null) { - ensureGroupByResultsIsMutable(); - groupByResults_.add(index, builderForValue.build()); - onChanged(); - } else { - groupByResultsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public Builder addAllGroupByResults( - java.lang.Iterable values) { - if (groupByResultsBuilder_ == null) { - ensureGroupByResultsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, groupByResults_); - onChanged(); - } else { - groupByResultsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public Builder clearGroupByResults() { - if (groupByResultsBuilder_ == null) { - groupByResults_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - groupByResultsBuilder_.clear(); - } - return this; - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public Builder removeGroupByResults(int index) { - if (groupByResultsBuilder_ == null) { - ensureGroupByResultsIsMutable(); - groupByResults_.remove(index); - onChanged(); - } else { - groupByResultsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public com.google.cloud.securitycenter.v1.GroupResult.Builder getGroupByResultsBuilder( - int index) { - return getGroupByResultsFieldBuilder().getBuilder(index); - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public com.google.cloud.securitycenter.v1.GroupResultOrBuilder getGroupByResultsOrBuilder( - int index) { - if (groupByResultsBuilder_ == null) { - return groupByResults_.get(index); } else { - return groupByResultsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public java.util.List - getGroupByResultsOrBuilderList() { - if (groupByResultsBuilder_ != null) { - return groupByResultsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(groupByResults_); - } - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public com.google.cloud.securitycenter.v1.GroupResult.Builder addGroupByResultsBuilder() { - return getGroupByResultsFieldBuilder().addBuilder( - com.google.cloud.securitycenter.v1.GroupResult.getDefaultInstance()); - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public com.google.cloud.securitycenter.v1.GroupResult.Builder addGroupByResultsBuilder( - int index) { - return getGroupByResultsFieldBuilder().addBuilder( - index, com.google.cloud.securitycenter.v1.GroupResult.getDefaultInstance()); - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public java.util.List - getGroupByResultsBuilderList() { - return getGroupByResultsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.GroupResult, com.google.cloud.securitycenter.v1.GroupResult.Builder, com.google.cloud.securitycenter.v1.GroupResultOrBuilder> - getGroupByResultsFieldBuilder() { - if (groupByResultsBuilder_ == null) { - groupByResultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.GroupResult, com.google.cloud.securitycenter.v1.GroupResult.Builder, com.google.cloud.securitycenter.v1.GroupResultOrBuilder>( - groupByResults_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - groupByResults_ = null; - } - return groupByResultsBuilder_; - } - - private com.google.protobuf.Timestamp readTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; - /** - *
-     * Time used for executing the groupBy request.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return Whether the readTime field is set. - */ - public boolean hasReadTime() { - return readTimeBuilder_ != null || readTime_ != null; - } - /** - *
-     * Time used for executing the groupBy request.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return The readTime. - */ - public com.google.protobuf.Timestamp getReadTime() { - if (readTimeBuilder_ == null) { - return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } else { - return readTimeBuilder_.getMessage(); - } - } - /** - *
-     * Time used for executing the groupBy request.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public Builder setReadTime(com.google.protobuf.Timestamp value) { - if (readTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - readTime_ = value; - onChanged(); - } else { - readTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Time used for executing the groupBy request.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public Builder setReadTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (readTimeBuilder_ == null) { - readTime_ = builderForValue.build(); - onChanged(); - } else { - readTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Time used for executing the groupBy request.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public Builder mergeReadTime(com.google.protobuf.Timestamp value) { - if (readTimeBuilder_ == null) { - if (readTime_ != null) { - readTime_ = - com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial(); - } else { - readTime_ = value; - } - onChanged(); - } else { - readTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Time used for executing the groupBy request.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public Builder clearReadTime() { - if (readTimeBuilder_ == null) { - readTime_ = null; - onChanged(); - } else { - readTime_ = null; - readTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Time used for executing the groupBy request.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { - - onChanged(); - return getReadTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Time used for executing the groupBy request.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { - if (readTimeBuilder_ != null) { - return readTimeBuilder_.getMessageOrBuilder(); - } else { - return readTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } - } - /** - *
-     * Time used for executing the groupBy request.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getReadTimeFieldBuilder() { - if (readTimeBuilder_ == null) { - readTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getReadTime(), - getParentForChildren(), - isClean()); - readTime_ = null; - } - return readTimeBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results.
-     * 
- * - * string next_page_token = 3; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results.
-     * 
- * - * string next_page_token = 3; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results.
-     * 
- * - * string next_page_token = 3; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results.
-     * 
- * - * string next_page_token = 3; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results.
-     * 
- * - * string next_page_token = 3; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - - private int totalSize_ ; - /** - *
-     * The total number of results matching the query.
-     * 
- * - * int32 total_size = 4; - * @return The totalSize. - */ - @java.lang.Override - public int getTotalSize() { - return totalSize_; - } - /** - *
-     * The total number of results matching the query.
-     * 
- * - * int32 total_size = 4; - * @param value The totalSize to set. - * @return This builder for chaining. - */ - public Builder setTotalSize(int value) { - - totalSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The total number of results matching the query.
-     * 
- * - * int32 total_size = 4; - * @return This builder for chaining. - */ - public Builder clearTotalSize() { - - totalSize_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.GroupAssetsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.GroupAssetsResponse) - private static final com.google.cloud.securitycenter.v1.GroupAssetsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.GroupAssetsResponse(); - } - - public static com.google.cloud.securitycenter.v1.GroupAssetsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GroupAssetsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GroupAssetsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GroupAssetsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupAssetsResponseOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupAssetsResponseOrBuilder.java deleted file mode 100644 index 8e10534269a8..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupAssetsResponseOrBuilder.java +++ /dev/null @@ -1,122 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -public interface GroupAssetsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.GroupAssetsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Group results. There exists an element for each existing unique
-   * combination of property/values. The element contains a count for the number
-   * of times those specific property/values appear.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - java.util.List - getGroupByResultsList(); - /** - *
-   * Group results. There exists an element for each existing unique
-   * combination of property/values. The element contains a count for the number
-   * of times those specific property/values appear.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - com.google.cloud.securitycenter.v1.GroupResult getGroupByResults(int index); - /** - *
-   * Group results. There exists an element for each existing unique
-   * combination of property/values. The element contains a count for the number
-   * of times those specific property/values appear.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - int getGroupByResultsCount(); - /** - *
-   * Group results. There exists an element for each existing unique
-   * combination of property/values. The element contains a count for the number
-   * of times those specific property/values appear.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - java.util.List - getGroupByResultsOrBuilderList(); - /** - *
-   * Group results. There exists an element for each existing unique
-   * combination of property/values. The element contains a count for the number
-   * of times those specific property/values appear.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - com.google.cloud.securitycenter.v1.GroupResultOrBuilder getGroupByResultsOrBuilder( - int index); - - /** - *
-   * Time used for executing the groupBy request.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return Whether the readTime field is set. - */ - boolean hasReadTime(); - /** - *
-   * Time used for executing the groupBy request.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return The readTime. - */ - com.google.protobuf.Timestamp getReadTime(); - /** - *
-   * Time used for executing the groupBy request.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder(); - - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results.
-   * 
- * - * string next_page_token = 3; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results.
-   * 
- * - * string next_page_token = 3; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); - - /** - *
-   * The total number of results matching the query.
-   * 
- * - * int32 total_size = 4; - * @return The totalSize. - */ - int getTotalSize(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupFindingsRequest.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupFindingsRequest.java deleted file mode 100644 index f9ddb9b92fe8..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupFindingsRequest.java +++ /dev/null @@ -1,2431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Request message for grouping by findings.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.GroupFindingsRequest} - */ -public final class GroupFindingsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.GroupFindingsRequest) - GroupFindingsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GroupFindingsRequest.newBuilder() to construct. - private GroupFindingsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GroupFindingsRequest() { - parent_ = ""; - filter_ = ""; - groupBy_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GroupFindingsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GroupFindingsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - groupBy_ = s; - break; - } - case 34: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (readTime_ != null) { - subBuilder = readTime_.toBuilder(); - } - readTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(readTime_); - readTime_ = subBuilder.buildPartial(); - } - - break; - } - case 42: { - com.google.protobuf.Duration.Builder subBuilder = null; - if (compareDuration_ != null) { - subBuilder = compareDuration_.toBuilder(); - } - compareDuration_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(compareDuration_); - compareDuration_ = subBuilder.buildPartial(); - } - - break; - } - case 58: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 64: { - - pageSize_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GroupFindingsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GroupFindingsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.GroupFindingsRequest.class, com.google.cloud.securitycenter.v1.GroupFindingsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. Name of the source to groupBy. Its format is
-   * "organizations/[organization_id]/sources/[source_id]",
-   * folders/[folder_id]/sources/[source_id], or
-   * projects/[project_id]/sources/[source_id]. To groupBy across all sources
-   * provide a source_id of `-`. For example:
-   * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-,
-   * or projects/{project_id}/sources/-
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. Name of the source to groupBy. Its format is
-   * "organizations/[organization_id]/sources/[source_id]",
-   * folders/[folder_id]/sources/[source_id], or
-   * projects/[project_id]/sources/[source_id]. To groupBy across all sources
-   * provide a source_id of `-`. For example:
-   * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-,
-   * or projects/{project_id}/sources/-
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 2; - private volatile java.lang.Object filter_; - /** - *
-   * Expression that defines the filter to apply across findings.
-   * The expression is a list of one or more restrictions combined via logical
-   * operators `AND` and `OR`.
-   * Parentheses are supported, and `OR` has higher precedence than `AND`.
-   * Restrictions have the form `<field> <operator> <value>` and may have a `-`
-   * character in front of them to indicate negation. Examples include:
-   *  * name
-   *  * source_properties.a_property
-   *  * security_marks.marks.marka
-   * The supported operators are:
-   * * `=` for all value types.
-   * * `>`, `<`, `>=`, `<=` for integer values.
-   * * `:`, meaning substring matching, for strings.
-   * The supported value types are:
-   * * string literals in quotes.
-   * * integer literals without quotes.
-   * * boolean literals `true` and `false` without quotes.
-   * The following field and operator combinations are supported:
-   * * name: `=`
-   * * parent: `=`, `:`
-   * * resource_name: `=`, `:`
-   * * state: `=`, `:`
-   * * category: `=`, `:`
-   * * external_uri: `=`, `:`
-   * * event_time: `=`, `>`, `<`, `>=`, `<=`
-   *   Usage: This should be milliseconds since epoch or an RFC3339 string.
-   *   Examples:
-   *     `event_time = "2019-06-10T16:07:18-07:00"`
-   *     `event_time = 1560208038000`
-   * * severity: `=`, `:`
-   * * workflow_state: `=`, `:`
-   * * security_marks.marks: `=`, `:`
-   * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=`
-   *   For example, `source_properties.size = 100` is a valid filter string.
-   *   Use a partial match on the empty string to filter based on a property
-   *   existing: `source_properties.my_property : ""`
-   *   Use a negated partial match on the empty string to filter based on a
-   *   property not existing: `-source_properties.my_property : ""`
-   * * resource:
-   *   * resource.name: `=`, `:`
-   *   * resource.parent_name: `=`, `:`
-   *   * resource.parent_display_name: `=`, `:`
-   *   * resource.project_name: `=`, `:`
-   *   * resource.project_display_name: `=`, `:`
-   *   * resource.type: `=`, `:`
-   * 
- * - * string filter = 2; - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - *
-   * Expression that defines the filter to apply across findings.
-   * The expression is a list of one or more restrictions combined via logical
-   * operators `AND` and `OR`.
-   * Parentheses are supported, and `OR` has higher precedence than `AND`.
-   * Restrictions have the form `<field> <operator> <value>` and may have a `-`
-   * character in front of them to indicate negation. Examples include:
-   *  * name
-   *  * source_properties.a_property
-   *  * security_marks.marks.marka
-   * The supported operators are:
-   * * `=` for all value types.
-   * * `>`, `<`, `>=`, `<=` for integer values.
-   * * `:`, meaning substring matching, for strings.
-   * The supported value types are:
-   * * string literals in quotes.
-   * * integer literals without quotes.
-   * * boolean literals `true` and `false` without quotes.
-   * The following field and operator combinations are supported:
-   * * name: `=`
-   * * parent: `=`, `:`
-   * * resource_name: `=`, `:`
-   * * state: `=`, `:`
-   * * category: `=`, `:`
-   * * external_uri: `=`, `:`
-   * * event_time: `=`, `>`, `<`, `>=`, `<=`
-   *   Usage: This should be milliseconds since epoch or an RFC3339 string.
-   *   Examples:
-   *     `event_time = "2019-06-10T16:07:18-07:00"`
-   *     `event_time = 1560208038000`
-   * * severity: `=`, `:`
-   * * workflow_state: `=`, `:`
-   * * security_marks.marks: `=`, `:`
-   * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=`
-   *   For example, `source_properties.size = 100` is a valid filter string.
-   *   Use a partial match on the empty string to filter based on a property
-   *   existing: `source_properties.my_property : ""`
-   *   Use a negated partial match on the empty string to filter based on a
-   *   property not existing: `-source_properties.my_property : ""`
-   * * resource:
-   *   * resource.name: `=`, `:`
-   *   * resource.parent_name: `=`, `:`
-   *   * resource.parent_display_name: `=`, `:`
-   *   * resource.project_name: `=`, `:`
-   *   * resource.project_display_name: `=`, `:`
-   *   * resource.type: `=`, `:`
-   * 
- * - * string filter = 2; - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int GROUP_BY_FIELD_NUMBER = 3; - private volatile java.lang.Object 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
-   * * severity
-   * The following fields are supported when compare_duration is set:
-   * * state_change
-   * 
- * - * string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The groupBy. - */ - @java.lang.Override - public java.lang.String getGroupBy() { - java.lang.Object ref = groupBy_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - groupBy_ = s; - return s; - } - } - /** - *
-   * 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
-   * * severity
-   * The following fields are supported when compare_duration is set:
-   * * state_change
-   * 
- * - * string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for groupBy. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getGroupByBytes() { - java.lang.Object ref = groupBy_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - groupBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int READ_TIME_FIELD_NUMBER = 4; - private com.google.protobuf.Timestamp readTime_; - /** - *
-   * Time used as a reference point when filtering findings. The filter is
-   * limited to findings existing at the supplied time and their values are
-   * those at that specific time. Absence of this field will default to the
-   * API's version of NOW.
-   * 
- * - * .google.protobuf.Timestamp read_time = 4; - * @return Whether the readTime field is set. - */ - @java.lang.Override - public boolean hasReadTime() { - return readTime_ != null; - } - /** - *
-   * Time used as a reference point when filtering findings. The filter is
-   * limited to findings existing at the supplied time and their values are
-   * those at that specific time. Absence of this field will default to the
-   * API's version of NOW.
-   * 
- * - * .google.protobuf.Timestamp read_time = 4; - * @return The readTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getReadTime() { - return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } - /** - *
-   * Time used as a reference point when filtering findings. The filter is
-   * limited to findings existing at the supplied time and their values are
-   * those at that specific time. Absence of this field will default to the
-   * API's version of NOW.
-   * 
- * - * .google.protobuf.Timestamp read_time = 4; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { - return getReadTime(); - } - - public static final int COMPARE_DURATION_FIELD_NUMBER = 5; - private com.google.protobuf.Duration compareDuration_; - /** - *
-   * When compare_duration is set, the GroupResult's "state_change" attribute is
-   * updated to indicate whether the finding had its state changed, the
-   * finding's state remained unchanged, or if the finding was added during the
-   * compare_duration period of time that precedes the read_time. This is the
-   * time between (read_time - compare_duration) and read_time.
-   * The state_change value is derived based on the presence and state of the
-   * finding at the two points in time. Intermediate state changes between the
-   * two times don't affect the result. For example, the results aren't affected
-   * if the finding is made inactive and then active again.
-   * Possible "state_change" values when compare_duration is specified:
-   * * "CHANGED":   indicates that the finding was present and matched the given
-   *                  filter at the start of compare_duration, but changed its
-   *                  state at read_time.
-   * * "UNCHANGED": indicates that the finding was present and matched the given
-   *                  filter at the start of compare_duration and did not change
-   *                  state at read_time.
-   * * "ADDED":     indicates that the finding did not match the given filter or
-   *                  was not present at the start of compare_duration, but was
-   *                  present at read_time.
-   * * "REMOVED":   indicates that the finding was present and matched the
-   *                  filter at the start of compare_duration, but did not match
-   *                  the filter at read_time.
-   * If compare_duration is not specified, then the only possible state_change
-   * is "UNUSED",  which will be the state_change set for all findings present
-   * at read_time.
-   * If this field is set then `state_change` must be a specified field in
-   * `group_by`.
-   * 
- * - * .google.protobuf.Duration compare_duration = 5; - * @return Whether the compareDuration field is set. - */ - @java.lang.Override - public boolean hasCompareDuration() { - return compareDuration_ != null; - } - /** - *
-   * When compare_duration is set, the GroupResult's "state_change" attribute is
-   * updated to indicate whether the finding had its state changed, the
-   * finding's state remained unchanged, or if the finding was added during the
-   * compare_duration period of time that precedes the read_time. This is the
-   * time between (read_time - compare_duration) and read_time.
-   * The state_change value is derived based on the presence and state of the
-   * finding at the two points in time. Intermediate state changes between the
-   * two times don't affect the result. For example, the results aren't affected
-   * if the finding is made inactive and then active again.
-   * Possible "state_change" values when compare_duration is specified:
-   * * "CHANGED":   indicates that the finding was present and matched the given
-   *                  filter at the start of compare_duration, but changed its
-   *                  state at read_time.
-   * * "UNCHANGED": indicates that the finding was present and matched the given
-   *                  filter at the start of compare_duration and did not change
-   *                  state at read_time.
-   * * "ADDED":     indicates that the finding did not match the given filter or
-   *                  was not present at the start of compare_duration, but was
-   *                  present at read_time.
-   * * "REMOVED":   indicates that the finding was present and matched the
-   *                  filter at the start of compare_duration, but did not match
-   *                  the filter at read_time.
-   * If compare_duration is not specified, then the only possible state_change
-   * is "UNUSED",  which will be the state_change set for all findings present
-   * at read_time.
-   * If this field is set then `state_change` must be a specified field in
-   * `group_by`.
-   * 
- * - * .google.protobuf.Duration compare_duration = 5; - * @return The compareDuration. - */ - @java.lang.Override - public com.google.protobuf.Duration getCompareDuration() { - return compareDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : compareDuration_; - } - /** - *
-   * When compare_duration is set, the GroupResult's "state_change" attribute is
-   * updated to indicate whether the finding had its state changed, the
-   * finding's state remained unchanged, or if the finding was added during the
-   * compare_duration period of time that precedes the read_time. This is the
-   * time between (read_time - compare_duration) and read_time.
-   * The state_change value is derived based on the presence and state of the
-   * finding at the two points in time. Intermediate state changes between the
-   * two times don't affect the result. For example, the results aren't affected
-   * if the finding is made inactive and then active again.
-   * Possible "state_change" values when compare_duration is specified:
-   * * "CHANGED":   indicates that the finding was present and matched the given
-   *                  filter at the start of compare_duration, but changed its
-   *                  state at read_time.
-   * * "UNCHANGED": indicates that the finding was present and matched the given
-   *                  filter at the start of compare_duration and did not change
-   *                  state at read_time.
-   * * "ADDED":     indicates that the finding did not match the given filter or
-   *                  was not present at the start of compare_duration, but was
-   *                  present at read_time.
-   * * "REMOVED":   indicates that the finding was present and matched the
-   *                  filter at the start of compare_duration, but did not match
-   *                  the filter at read_time.
-   * If compare_duration is not specified, then the only possible state_change
-   * is "UNUSED",  which will be the state_change set for all findings present
-   * at read_time.
-   * If this field is set then `state_change` must be a specified field in
-   * `group_by`.
-   * 
- * - * .google.protobuf.Duration compare_duration = 5; - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getCompareDurationOrBuilder() { - return getCompareDuration(); - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 7; - private volatile java.lang.Object pageToken_; - /** - *
-   * The value returned by the last `GroupFindingsResponse`; indicates
-   * that this is a continuation of a prior `GroupFindings` call, and
-   * that the system should return the next page of data.
-   * 
- * - * string page_token = 7; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * The value returned by the last `GroupFindingsResponse`; indicates
-   * that this is a continuation of a prior `GroupFindings` call, and
-   * that the system should return the next page of data.
-   * 
- * - * string page_token = 7; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 8; - private int pageSize_; - /** - *
-   * The maximum number of results to return in a single response. Default is
-   * 10, minimum is 1, maximum is 1000.
-   * 
- * - * int32 page_size = 8; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(groupBy_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, groupBy_); - } - if (readTime_ != null) { - output.writeMessage(4, getReadTime()); - } - if (compareDuration_ != null) { - output.writeMessage(5, getCompareDuration()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, pageToken_); - } - if (pageSize_ != 0) { - output.writeInt32(8, pageSize_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(groupBy_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, groupBy_); - } - if (readTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getReadTime()); - } - if (compareDuration_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getCompareDuration()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, pageToken_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(8, pageSize_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.GroupFindingsRequest)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.GroupFindingsRequest other = (com.google.cloud.securitycenter.v1.GroupFindingsRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!getFilter() - .equals(other.getFilter())) return false; - if (!getGroupBy() - .equals(other.getGroupBy())) return false; - if (hasReadTime() != other.hasReadTime()) return false; - if (hasReadTime()) { - if (!getReadTime() - .equals(other.getReadTime())) return false; - } - if (hasCompareDuration() != other.hasCompareDuration()) return false; - if (hasCompareDuration()) { - if (!getCompareDuration() - .equals(other.getCompareDuration())) return false; - } - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + GROUP_BY_FIELD_NUMBER; - hash = (53 * hash) + getGroupBy().hashCode(); - if (hasReadTime()) { - hash = (37 * hash) + READ_TIME_FIELD_NUMBER; - hash = (53 * hash) + getReadTime().hashCode(); - } - if (hasCompareDuration()) { - hash = (37 * hash) + COMPARE_DURATION_FIELD_NUMBER; - hash = (53 * hash) + getCompareDuration().hashCode(); - } - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.GroupFindingsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.GroupFindingsRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GroupFindingsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.GroupFindingsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GroupFindingsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.GroupFindingsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GroupFindingsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.GroupFindingsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GroupFindingsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.GroupFindingsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GroupFindingsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.GroupFindingsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.GroupFindingsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for grouping by findings.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.GroupFindingsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.GroupFindingsRequest) - com.google.cloud.securitycenter.v1.GroupFindingsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GroupFindingsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GroupFindingsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.GroupFindingsRequest.class, com.google.cloud.securitycenter.v1.GroupFindingsRequest.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.GroupFindingsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - filter_ = ""; - - groupBy_ = ""; - - if (readTimeBuilder_ == null) { - readTime_ = null; - } else { - readTime_ = null; - readTimeBuilder_ = null; - } - if (compareDurationBuilder_ == null) { - compareDuration_ = null; - } else { - compareDuration_ = null; - compareDurationBuilder_ = null; - } - pageToken_ = ""; - - pageSize_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GroupFindingsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GroupFindingsRequest getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.GroupFindingsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GroupFindingsRequest build() { - com.google.cloud.securitycenter.v1.GroupFindingsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GroupFindingsRequest buildPartial() { - com.google.cloud.securitycenter.v1.GroupFindingsRequest result = new com.google.cloud.securitycenter.v1.GroupFindingsRequest(this); - result.parent_ = parent_; - result.filter_ = filter_; - result.groupBy_ = groupBy_; - if (readTimeBuilder_ == null) { - result.readTime_ = readTime_; - } else { - result.readTime_ = readTimeBuilder_.build(); - } - if (compareDurationBuilder_ == null) { - result.compareDuration_ = compareDuration_; - } else { - result.compareDuration_ = compareDurationBuilder_.build(); - } - result.pageToken_ = pageToken_; - result.pageSize_ = pageSize_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.GroupFindingsRequest) { - return mergeFrom((com.google.cloud.securitycenter.v1.GroupFindingsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.GroupFindingsRequest other) { - if (other == com.google.cloud.securitycenter.v1.GroupFindingsRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - onChanged(); - } - if (!other.getGroupBy().isEmpty()) { - groupBy_ = other.groupBy_; - onChanged(); - } - if (other.hasReadTime()) { - mergeReadTime(other.getReadTime()); - } - if (other.hasCompareDuration()) { - mergeCompareDuration(other.getCompareDuration()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.GroupFindingsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.GroupFindingsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. Name of the source to groupBy. Its format is
-     * "organizations/[organization_id]/sources/[source_id]",
-     * folders/[folder_id]/sources/[source_id], or
-     * projects/[project_id]/sources/[source_id]. To groupBy across all sources
-     * provide a source_id of `-`. For example:
-     * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-,
-     * or projects/{project_id}/sources/-
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Name of the source to groupBy. Its format is
-     * "organizations/[organization_id]/sources/[source_id]",
-     * folders/[folder_id]/sources/[source_id], or
-     * projects/[project_id]/sources/[source_id]. To groupBy across all sources
-     * provide a source_id of `-`. For example:
-     * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-,
-     * or projects/{project_id}/sources/-
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Name of the source to groupBy. Its format is
-     * "organizations/[organization_id]/sources/[source_id]",
-     * folders/[folder_id]/sources/[source_id], or
-     * projects/[project_id]/sources/[source_id]. To groupBy across all sources
-     * provide a source_id of `-`. For example:
-     * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-,
-     * or projects/{project_id}/sources/-
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Name of the source to groupBy. Its format is
-     * "organizations/[organization_id]/sources/[source_id]",
-     * folders/[folder_id]/sources/[source_id], or
-     * projects/[project_id]/sources/[source_id]. To groupBy across all sources
-     * provide a source_id of `-`. For example:
-     * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-,
-     * or projects/{project_id}/sources/-
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. Name of the source to groupBy. Its format is
-     * "organizations/[organization_id]/sources/[source_id]",
-     * folders/[folder_id]/sources/[source_id], or
-     * projects/[project_id]/sources/[source_id]. To groupBy across all sources
-     * provide a source_id of `-`. For example:
-     * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-,
-     * or projects/{project_id}/sources/-
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - *
-     * Expression that defines the filter to apply across findings.
-     * The expression is a list of one or more restrictions combined via logical
-     * operators `AND` and `OR`.
-     * Parentheses are supported, and `OR` has higher precedence than `AND`.
-     * Restrictions have the form `<field> <operator> <value>` and may have a `-`
-     * character in front of them to indicate negation. Examples include:
-     *  * name
-     *  * source_properties.a_property
-     *  * security_marks.marks.marka
-     * The supported operators are:
-     * * `=` for all value types.
-     * * `>`, `<`, `>=`, `<=` for integer values.
-     * * `:`, meaning substring matching, for strings.
-     * The supported value types are:
-     * * string literals in quotes.
-     * * integer literals without quotes.
-     * * boolean literals `true` and `false` without quotes.
-     * The following field and operator combinations are supported:
-     * * name: `=`
-     * * parent: `=`, `:`
-     * * resource_name: `=`, `:`
-     * * state: `=`, `:`
-     * * category: `=`, `:`
-     * * external_uri: `=`, `:`
-     * * event_time: `=`, `>`, `<`, `>=`, `<=`
-     *   Usage: This should be milliseconds since epoch or an RFC3339 string.
-     *   Examples:
-     *     `event_time = "2019-06-10T16:07:18-07:00"`
-     *     `event_time = 1560208038000`
-     * * severity: `=`, `:`
-     * * workflow_state: `=`, `:`
-     * * security_marks.marks: `=`, `:`
-     * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=`
-     *   For example, `source_properties.size = 100` is a valid filter string.
-     *   Use a partial match on the empty string to filter based on a property
-     *   existing: `source_properties.my_property : ""`
-     *   Use a negated partial match on the empty string to filter based on a
-     *   property not existing: `-source_properties.my_property : ""`
-     * * resource:
-     *   * resource.name: `=`, `:`
-     *   * resource.parent_name: `=`, `:`
-     *   * resource.parent_display_name: `=`, `:`
-     *   * resource.project_name: `=`, `:`
-     *   * resource.project_display_name: `=`, `:`
-     *   * resource.type: `=`, `:`
-     * 
- * - * string filter = 2; - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Expression that defines the filter to apply across findings.
-     * The expression is a list of one or more restrictions combined via logical
-     * operators `AND` and `OR`.
-     * Parentheses are supported, and `OR` has higher precedence than `AND`.
-     * Restrictions have the form `<field> <operator> <value>` and may have a `-`
-     * character in front of them to indicate negation. Examples include:
-     *  * name
-     *  * source_properties.a_property
-     *  * security_marks.marks.marka
-     * The supported operators are:
-     * * `=` for all value types.
-     * * `>`, `<`, `>=`, `<=` for integer values.
-     * * `:`, meaning substring matching, for strings.
-     * The supported value types are:
-     * * string literals in quotes.
-     * * integer literals without quotes.
-     * * boolean literals `true` and `false` without quotes.
-     * The following field and operator combinations are supported:
-     * * name: `=`
-     * * parent: `=`, `:`
-     * * resource_name: `=`, `:`
-     * * state: `=`, `:`
-     * * category: `=`, `:`
-     * * external_uri: `=`, `:`
-     * * event_time: `=`, `>`, `<`, `>=`, `<=`
-     *   Usage: This should be milliseconds since epoch or an RFC3339 string.
-     *   Examples:
-     *     `event_time = "2019-06-10T16:07:18-07:00"`
-     *     `event_time = 1560208038000`
-     * * severity: `=`, `:`
-     * * workflow_state: `=`, `:`
-     * * security_marks.marks: `=`, `:`
-     * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=`
-     *   For example, `source_properties.size = 100` is a valid filter string.
-     *   Use a partial match on the empty string to filter based on a property
-     *   existing: `source_properties.my_property : ""`
-     *   Use a negated partial match on the empty string to filter based on a
-     *   property not existing: `-source_properties.my_property : ""`
-     * * resource:
-     *   * resource.name: `=`, `:`
-     *   * resource.parent_name: `=`, `:`
-     *   * resource.parent_display_name: `=`, `:`
-     *   * resource.project_name: `=`, `:`
-     *   * resource.project_display_name: `=`, `:`
-     *   * resource.type: `=`, `:`
-     * 
- * - * string filter = 2; - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Expression that defines the filter to apply across findings.
-     * The expression is a list of one or more restrictions combined via logical
-     * operators `AND` and `OR`.
-     * Parentheses are supported, and `OR` has higher precedence than `AND`.
-     * Restrictions have the form `<field> <operator> <value>` and may have a `-`
-     * character in front of them to indicate negation. Examples include:
-     *  * name
-     *  * source_properties.a_property
-     *  * security_marks.marks.marka
-     * The supported operators are:
-     * * `=` for all value types.
-     * * `>`, `<`, `>=`, `<=` for integer values.
-     * * `:`, meaning substring matching, for strings.
-     * The supported value types are:
-     * * string literals in quotes.
-     * * integer literals without quotes.
-     * * boolean literals `true` and `false` without quotes.
-     * The following field and operator combinations are supported:
-     * * name: `=`
-     * * parent: `=`, `:`
-     * * resource_name: `=`, `:`
-     * * state: `=`, `:`
-     * * category: `=`, `:`
-     * * external_uri: `=`, `:`
-     * * event_time: `=`, `>`, `<`, `>=`, `<=`
-     *   Usage: This should be milliseconds since epoch or an RFC3339 string.
-     *   Examples:
-     *     `event_time = "2019-06-10T16:07:18-07:00"`
-     *     `event_time = 1560208038000`
-     * * severity: `=`, `:`
-     * * workflow_state: `=`, `:`
-     * * security_marks.marks: `=`, `:`
-     * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=`
-     *   For example, `source_properties.size = 100` is a valid filter string.
-     *   Use a partial match on the empty string to filter based on a property
-     *   existing: `source_properties.my_property : ""`
-     *   Use a negated partial match on the empty string to filter based on a
-     *   property not existing: `-source_properties.my_property : ""`
-     * * resource:
-     *   * resource.name: `=`, `:`
-     *   * resource.parent_name: `=`, `:`
-     *   * resource.parent_display_name: `=`, `:`
-     *   * resource.project_name: `=`, `:`
-     *   * resource.project_display_name: `=`, `:`
-     *   * resource.type: `=`, `:`
-     * 
- * - * string filter = 2; - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - filter_ = value; - onChanged(); - return this; - } - /** - *
-     * Expression that defines the filter to apply across findings.
-     * The expression is a list of one or more restrictions combined via logical
-     * operators `AND` and `OR`.
-     * Parentheses are supported, and `OR` has higher precedence than `AND`.
-     * Restrictions have the form `<field> <operator> <value>` and may have a `-`
-     * character in front of them to indicate negation. Examples include:
-     *  * name
-     *  * source_properties.a_property
-     *  * security_marks.marks.marka
-     * The supported operators are:
-     * * `=` for all value types.
-     * * `>`, `<`, `>=`, `<=` for integer values.
-     * * `:`, meaning substring matching, for strings.
-     * The supported value types are:
-     * * string literals in quotes.
-     * * integer literals without quotes.
-     * * boolean literals `true` and `false` without quotes.
-     * The following field and operator combinations are supported:
-     * * name: `=`
-     * * parent: `=`, `:`
-     * * resource_name: `=`, `:`
-     * * state: `=`, `:`
-     * * category: `=`, `:`
-     * * external_uri: `=`, `:`
-     * * event_time: `=`, `>`, `<`, `>=`, `<=`
-     *   Usage: This should be milliseconds since epoch or an RFC3339 string.
-     *   Examples:
-     *     `event_time = "2019-06-10T16:07:18-07:00"`
-     *     `event_time = 1560208038000`
-     * * severity: `=`, `:`
-     * * workflow_state: `=`, `:`
-     * * security_marks.marks: `=`, `:`
-     * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=`
-     *   For example, `source_properties.size = 100` is a valid filter string.
-     *   Use a partial match on the empty string to filter based on a property
-     *   existing: `source_properties.my_property : ""`
-     *   Use a negated partial match on the empty string to filter based on a
-     *   property not existing: `-source_properties.my_property : ""`
-     * * resource:
-     *   * resource.name: `=`, `:`
-     *   * resource.parent_name: `=`, `:`
-     *   * resource.parent_display_name: `=`, `:`
-     *   * resource.project_name: `=`, `:`
-     *   * resource.project_display_name: `=`, `:`
-     *   * resource.type: `=`, `:`
-     * 
- * - * string filter = 2; - * @return This builder for chaining. - */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - *
-     * Expression that defines the filter to apply across findings.
-     * The expression is a list of one or more restrictions combined via logical
-     * operators `AND` and `OR`.
-     * Parentheses are supported, and `OR` has higher precedence than `AND`.
-     * Restrictions have the form `<field> <operator> <value>` and may have a `-`
-     * character in front of them to indicate negation. Examples include:
-     *  * name
-     *  * source_properties.a_property
-     *  * security_marks.marks.marka
-     * The supported operators are:
-     * * `=` for all value types.
-     * * `>`, `<`, `>=`, `<=` for integer values.
-     * * `:`, meaning substring matching, for strings.
-     * The supported value types are:
-     * * string literals in quotes.
-     * * integer literals without quotes.
-     * * boolean literals `true` and `false` without quotes.
-     * The following field and operator combinations are supported:
-     * * name: `=`
-     * * parent: `=`, `:`
-     * * resource_name: `=`, `:`
-     * * state: `=`, `:`
-     * * category: `=`, `:`
-     * * external_uri: `=`, `:`
-     * * event_time: `=`, `>`, `<`, `>=`, `<=`
-     *   Usage: This should be milliseconds since epoch or an RFC3339 string.
-     *   Examples:
-     *     `event_time = "2019-06-10T16:07:18-07:00"`
-     *     `event_time = 1560208038000`
-     * * severity: `=`, `:`
-     * * workflow_state: `=`, `:`
-     * * security_marks.marks: `=`, `:`
-     * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=`
-     *   For example, `source_properties.size = 100` is a valid filter string.
-     *   Use a partial match on the empty string to filter based on a property
-     *   existing: `source_properties.my_property : ""`
-     *   Use a negated partial match on the empty string to filter based on a
-     *   property not existing: `-source_properties.my_property : ""`
-     * * resource:
-     *   * resource.name: `=`, `:`
-     *   * resource.parent_name: `=`, `:`
-     *   * resource.parent_display_name: `=`, `:`
-     *   * resource.project_name: `=`, `:`
-     *   * resource.project_display_name: `=`, `:`
-     *   * resource.type: `=`, `:`
-     * 
- * - * string filter = 2; - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - filter_ = value; - onChanged(); - return this; - } - - private java.lang.Object 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
-     * * severity
-     * The following fields are supported when compare_duration is set:
-     * * state_change
-     * 
- * - * string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The groupBy. - */ - public java.lang.String getGroupBy() { - java.lang.Object ref = groupBy_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - groupBy_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * 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
-     * * severity
-     * The following fields are supported when compare_duration is set:
-     * * state_change
-     * 
- * - * string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for groupBy. - */ - public com.google.protobuf.ByteString - getGroupByBytes() { - java.lang.Object ref = groupBy_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - groupBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * 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
-     * * severity
-     * The following fields are supported when compare_duration is set:
-     * * state_change
-     * 
- * - * string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param value The groupBy to set. - * @return This builder for chaining. - */ - public Builder setGroupBy( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - groupBy_ = value; - onChanged(); - return this; - } - /** - *
-     * 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
-     * * severity
-     * The following fields are supported when compare_duration is set:
-     * * state_change
-     * 
- * - * string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearGroupBy() { - - groupBy_ = getDefaultInstance().getGroupBy(); - onChanged(); - return this; - } - /** - *
-     * 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
-     * * severity
-     * The following fields are supported when compare_duration is set:
-     * * state_change
-     * 
- * - * string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for groupBy to set. - * @return This builder for chaining. - */ - public Builder setGroupByBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - groupBy_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp readTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; - /** - *
-     * Time used as a reference point when filtering findings. The filter is
-     * limited to findings existing at the supplied time and their values are
-     * those at that specific time. Absence of this field will default to the
-     * API's version of NOW.
-     * 
- * - * .google.protobuf.Timestamp read_time = 4; - * @return Whether the readTime field is set. - */ - public boolean hasReadTime() { - return readTimeBuilder_ != null || readTime_ != null; - } - /** - *
-     * Time used as a reference point when filtering findings. The filter is
-     * limited to findings existing at the supplied time and their values are
-     * those at that specific time. Absence of this field will default to the
-     * API's version of NOW.
-     * 
- * - * .google.protobuf.Timestamp read_time = 4; - * @return The readTime. - */ - public com.google.protobuf.Timestamp getReadTime() { - if (readTimeBuilder_ == null) { - return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } else { - return readTimeBuilder_.getMessage(); - } - } - /** - *
-     * Time used as a reference point when filtering findings. The filter is
-     * limited to findings existing at the supplied time and their values are
-     * those at that specific time. Absence of this field will default to the
-     * API's version of NOW.
-     * 
- * - * .google.protobuf.Timestamp read_time = 4; - */ - public Builder setReadTime(com.google.protobuf.Timestamp value) { - if (readTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - readTime_ = value; - onChanged(); - } else { - readTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Time used as a reference point when filtering findings. The filter is
-     * limited to findings existing at the supplied time and their values are
-     * those at that specific time. Absence of this field will default to the
-     * API's version of NOW.
-     * 
- * - * .google.protobuf.Timestamp read_time = 4; - */ - public Builder setReadTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (readTimeBuilder_ == null) { - readTime_ = builderForValue.build(); - onChanged(); - } else { - readTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Time used as a reference point when filtering findings. The filter is
-     * limited to findings existing at the supplied time and their values are
-     * those at that specific time. Absence of this field will default to the
-     * API's version of NOW.
-     * 
- * - * .google.protobuf.Timestamp read_time = 4; - */ - public Builder mergeReadTime(com.google.protobuf.Timestamp value) { - if (readTimeBuilder_ == null) { - if (readTime_ != null) { - readTime_ = - com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial(); - } else { - readTime_ = value; - } - onChanged(); - } else { - readTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Time used as a reference point when filtering findings. The filter is
-     * limited to findings existing at the supplied time and their values are
-     * those at that specific time. Absence of this field will default to the
-     * API's version of NOW.
-     * 
- * - * .google.protobuf.Timestamp read_time = 4; - */ - public Builder clearReadTime() { - if (readTimeBuilder_ == null) { - readTime_ = null; - onChanged(); - } else { - readTime_ = null; - readTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Time used as a reference point when filtering findings. The filter is
-     * limited to findings existing at the supplied time and their values are
-     * those at that specific time. Absence of this field will default to the
-     * API's version of NOW.
-     * 
- * - * .google.protobuf.Timestamp read_time = 4; - */ - public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { - - onChanged(); - return getReadTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Time used as a reference point when filtering findings. The filter is
-     * limited to findings existing at the supplied time and their values are
-     * those at that specific time. Absence of this field will default to the
-     * API's version of NOW.
-     * 
- * - * .google.protobuf.Timestamp read_time = 4; - */ - public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { - if (readTimeBuilder_ != null) { - return readTimeBuilder_.getMessageOrBuilder(); - } else { - return readTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } - } - /** - *
-     * Time used as a reference point when filtering findings. The filter is
-     * limited to findings existing at the supplied time and their values are
-     * those at that specific time. Absence of this field will default to the
-     * API's version of NOW.
-     * 
- * - * .google.protobuf.Timestamp read_time = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getReadTimeFieldBuilder() { - if (readTimeBuilder_ == null) { - readTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getReadTime(), - getParentForChildren(), - isClean()); - readTime_ = null; - } - return readTimeBuilder_; - } - - private com.google.protobuf.Duration compareDuration_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> compareDurationBuilder_; - /** - *
-     * When compare_duration is set, the GroupResult's "state_change" attribute is
-     * updated to indicate whether the finding had its state changed, the
-     * finding's state remained unchanged, or if the finding was added during the
-     * compare_duration period of time that precedes the read_time. This is the
-     * time between (read_time - compare_duration) and read_time.
-     * The state_change value is derived based on the presence and state of the
-     * finding at the two points in time. Intermediate state changes between the
-     * two times don't affect the result. For example, the results aren't affected
-     * if the finding is made inactive and then active again.
-     * Possible "state_change" values when compare_duration is specified:
-     * * "CHANGED":   indicates that the finding was present and matched the given
-     *                  filter at the start of compare_duration, but changed its
-     *                  state at read_time.
-     * * "UNCHANGED": indicates that the finding was present and matched the given
-     *                  filter at the start of compare_duration and did not change
-     *                  state at read_time.
-     * * "ADDED":     indicates that the finding did not match the given filter or
-     *                  was not present at the start of compare_duration, but was
-     *                  present at read_time.
-     * * "REMOVED":   indicates that the finding was present and matched the
-     *                  filter at the start of compare_duration, but did not match
-     *                  the filter at read_time.
-     * If compare_duration is not specified, then the only possible state_change
-     * is "UNUSED",  which will be the state_change set for all findings present
-     * at read_time.
-     * If this field is set then `state_change` must be a specified field in
-     * `group_by`.
-     * 
- * - * .google.protobuf.Duration compare_duration = 5; - * @return Whether the compareDuration field is set. - */ - public boolean hasCompareDuration() { - return compareDurationBuilder_ != null || compareDuration_ != null; - } - /** - *
-     * When compare_duration is set, the GroupResult's "state_change" attribute is
-     * updated to indicate whether the finding had its state changed, the
-     * finding's state remained unchanged, or if the finding was added during the
-     * compare_duration period of time that precedes the read_time. This is the
-     * time between (read_time - compare_duration) and read_time.
-     * The state_change value is derived based on the presence and state of the
-     * finding at the two points in time. Intermediate state changes between the
-     * two times don't affect the result. For example, the results aren't affected
-     * if the finding is made inactive and then active again.
-     * Possible "state_change" values when compare_duration is specified:
-     * * "CHANGED":   indicates that the finding was present and matched the given
-     *                  filter at the start of compare_duration, but changed its
-     *                  state at read_time.
-     * * "UNCHANGED": indicates that the finding was present and matched the given
-     *                  filter at the start of compare_duration and did not change
-     *                  state at read_time.
-     * * "ADDED":     indicates that the finding did not match the given filter or
-     *                  was not present at the start of compare_duration, but was
-     *                  present at read_time.
-     * * "REMOVED":   indicates that the finding was present and matched the
-     *                  filter at the start of compare_duration, but did not match
-     *                  the filter at read_time.
-     * If compare_duration is not specified, then the only possible state_change
-     * is "UNUSED",  which will be the state_change set for all findings present
-     * at read_time.
-     * If this field is set then `state_change` must be a specified field in
-     * `group_by`.
-     * 
- * - * .google.protobuf.Duration compare_duration = 5; - * @return The compareDuration. - */ - public com.google.protobuf.Duration getCompareDuration() { - if (compareDurationBuilder_ == null) { - return compareDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : compareDuration_; - } else { - return compareDurationBuilder_.getMessage(); - } - } - /** - *
-     * When compare_duration is set, the GroupResult's "state_change" attribute is
-     * updated to indicate whether the finding had its state changed, the
-     * finding's state remained unchanged, or if the finding was added during the
-     * compare_duration period of time that precedes the read_time. This is the
-     * time between (read_time - compare_duration) and read_time.
-     * The state_change value is derived based on the presence and state of the
-     * finding at the two points in time. Intermediate state changes between the
-     * two times don't affect the result. For example, the results aren't affected
-     * if the finding is made inactive and then active again.
-     * Possible "state_change" values when compare_duration is specified:
-     * * "CHANGED":   indicates that the finding was present and matched the given
-     *                  filter at the start of compare_duration, but changed its
-     *                  state at read_time.
-     * * "UNCHANGED": indicates that the finding was present and matched the given
-     *                  filter at the start of compare_duration and did not change
-     *                  state at read_time.
-     * * "ADDED":     indicates that the finding did not match the given filter or
-     *                  was not present at the start of compare_duration, but was
-     *                  present at read_time.
-     * * "REMOVED":   indicates that the finding was present and matched the
-     *                  filter at the start of compare_duration, but did not match
-     *                  the filter at read_time.
-     * If compare_duration is not specified, then the only possible state_change
-     * is "UNUSED",  which will be the state_change set for all findings present
-     * at read_time.
-     * If this field is set then `state_change` must be a specified field in
-     * `group_by`.
-     * 
- * - * .google.protobuf.Duration compare_duration = 5; - */ - public Builder setCompareDuration(com.google.protobuf.Duration value) { - if (compareDurationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - compareDuration_ = value; - onChanged(); - } else { - compareDurationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * When compare_duration is set, the GroupResult's "state_change" attribute is
-     * updated to indicate whether the finding had its state changed, the
-     * finding's state remained unchanged, or if the finding was added during the
-     * compare_duration period of time that precedes the read_time. This is the
-     * time between (read_time - compare_duration) and read_time.
-     * The state_change value is derived based on the presence and state of the
-     * finding at the two points in time. Intermediate state changes between the
-     * two times don't affect the result. For example, the results aren't affected
-     * if the finding is made inactive and then active again.
-     * Possible "state_change" values when compare_duration is specified:
-     * * "CHANGED":   indicates that the finding was present and matched the given
-     *                  filter at the start of compare_duration, but changed its
-     *                  state at read_time.
-     * * "UNCHANGED": indicates that the finding was present and matched the given
-     *                  filter at the start of compare_duration and did not change
-     *                  state at read_time.
-     * * "ADDED":     indicates that the finding did not match the given filter or
-     *                  was not present at the start of compare_duration, but was
-     *                  present at read_time.
-     * * "REMOVED":   indicates that the finding was present and matched the
-     *                  filter at the start of compare_duration, but did not match
-     *                  the filter at read_time.
-     * If compare_duration is not specified, then the only possible state_change
-     * is "UNUSED",  which will be the state_change set for all findings present
-     * at read_time.
-     * If this field is set then `state_change` must be a specified field in
-     * `group_by`.
-     * 
- * - * .google.protobuf.Duration compare_duration = 5; - */ - public Builder setCompareDuration( - com.google.protobuf.Duration.Builder builderForValue) { - if (compareDurationBuilder_ == null) { - compareDuration_ = builderForValue.build(); - onChanged(); - } else { - compareDurationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * When compare_duration is set, the GroupResult's "state_change" attribute is
-     * updated to indicate whether the finding had its state changed, the
-     * finding's state remained unchanged, or if the finding was added during the
-     * compare_duration period of time that precedes the read_time. This is the
-     * time between (read_time - compare_duration) and read_time.
-     * The state_change value is derived based on the presence and state of the
-     * finding at the two points in time. Intermediate state changes between the
-     * two times don't affect the result. For example, the results aren't affected
-     * if the finding is made inactive and then active again.
-     * Possible "state_change" values when compare_duration is specified:
-     * * "CHANGED":   indicates that the finding was present and matched the given
-     *                  filter at the start of compare_duration, but changed its
-     *                  state at read_time.
-     * * "UNCHANGED": indicates that the finding was present and matched the given
-     *                  filter at the start of compare_duration and did not change
-     *                  state at read_time.
-     * * "ADDED":     indicates that the finding did not match the given filter or
-     *                  was not present at the start of compare_duration, but was
-     *                  present at read_time.
-     * * "REMOVED":   indicates that the finding was present and matched the
-     *                  filter at the start of compare_duration, but did not match
-     *                  the filter at read_time.
-     * If compare_duration is not specified, then the only possible state_change
-     * is "UNUSED",  which will be the state_change set for all findings present
-     * at read_time.
-     * If this field is set then `state_change` must be a specified field in
-     * `group_by`.
-     * 
- * - * .google.protobuf.Duration compare_duration = 5; - */ - public Builder mergeCompareDuration(com.google.protobuf.Duration value) { - if (compareDurationBuilder_ == null) { - if (compareDuration_ != null) { - compareDuration_ = - com.google.protobuf.Duration.newBuilder(compareDuration_).mergeFrom(value).buildPartial(); - } else { - compareDuration_ = value; - } - onChanged(); - } else { - compareDurationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * When compare_duration is set, the GroupResult's "state_change" attribute is
-     * updated to indicate whether the finding had its state changed, the
-     * finding's state remained unchanged, or if the finding was added during the
-     * compare_duration period of time that precedes the read_time. This is the
-     * time between (read_time - compare_duration) and read_time.
-     * The state_change value is derived based on the presence and state of the
-     * finding at the two points in time. Intermediate state changes between the
-     * two times don't affect the result. For example, the results aren't affected
-     * if the finding is made inactive and then active again.
-     * Possible "state_change" values when compare_duration is specified:
-     * * "CHANGED":   indicates that the finding was present and matched the given
-     *                  filter at the start of compare_duration, but changed its
-     *                  state at read_time.
-     * * "UNCHANGED": indicates that the finding was present and matched the given
-     *                  filter at the start of compare_duration and did not change
-     *                  state at read_time.
-     * * "ADDED":     indicates that the finding did not match the given filter or
-     *                  was not present at the start of compare_duration, but was
-     *                  present at read_time.
-     * * "REMOVED":   indicates that the finding was present and matched the
-     *                  filter at the start of compare_duration, but did not match
-     *                  the filter at read_time.
-     * If compare_duration is not specified, then the only possible state_change
-     * is "UNUSED",  which will be the state_change set for all findings present
-     * at read_time.
-     * If this field is set then `state_change` must be a specified field in
-     * `group_by`.
-     * 
- * - * .google.protobuf.Duration compare_duration = 5; - */ - public Builder clearCompareDuration() { - if (compareDurationBuilder_ == null) { - compareDuration_ = null; - onChanged(); - } else { - compareDuration_ = null; - compareDurationBuilder_ = null; - } - - return this; - } - /** - *
-     * When compare_duration is set, the GroupResult's "state_change" attribute is
-     * updated to indicate whether the finding had its state changed, the
-     * finding's state remained unchanged, or if the finding was added during the
-     * compare_duration period of time that precedes the read_time. This is the
-     * time between (read_time - compare_duration) and read_time.
-     * The state_change value is derived based on the presence and state of the
-     * finding at the two points in time. Intermediate state changes between the
-     * two times don't affect the result. For example, the results aren't affected
-     * if the finding is made inactive and then active again.
-     * Possible "state_change" values when compare_duration is specified:
-     * * "CHANGED":   indicates that the finding was present and matched the given
-     *                  filter at the start of compare_duration, but changed its
-     *                  state at read_time.
-     * * "UNCHANGED": indicates that the finding was present and matched the given
-     *                  filter at the start of compare_duration and did not change
-     *                  state at read_time.
-     * * "ADDED":     indicates that the finding did not match the given filter or
-     *                  was not present at the start of compare_duration, but was
-     *                  present at read_time.
-     * * "REMOVED":   indicates that the finding was present and matched the
-     *                  filter at the start of compare_duration, but did not match
-     *                  the filter at read_time.
-     * If compare_duration is not specified, then the only possible state_change
-     * is "UNUSED",  which will be the state_change set for all findings present
-     * at read_time.
-     * If this field is set then `state_change` must be a specified field in
-     * `group_by`.
-     * 
- * - * .google.protobuf.Duration compare_duration = 5; - */ - public com.google.protobuf.Duration.Builder getCompareDurationBuilder() { - - onChanged(); - return getCompareDurationFieldBuilder().getBuilder(); - } - /** - *
-     * When compare_duration is set, the GroupResult's "state_change" attribute is
-     * updated to indicate whether the finding had its state changed, the
-     * finding's state remained unchanged, or if the finding was added during the
-     * compare_duration period of time that precedes the read_time. This is the
-     * time between (read_time - compare_duration) and read_time.
-     * The state_change value is derived based on the presence and state of the
-     * finding at the two points in time. Intermediate state changes between the
-     * two times don't affect the result. For example, the results aren't affected
-     * if the finding is made inactive and then active again.
-     * Possible "state_change" values when compare_duration is specified:
-     * * "CHANGED":   indicates that the finding was present and matched the given
-     *                  filter at the start of compare_duration, but changed its
-     *                  state at read_time.
-     * * "UNCHANGED": indicates that the finding was present and matched the given
-     *                  filter at the start of compare_duration and did not change
-     *                  state at read_time.
-     * * "ADDED":     indicates that the finding did not match the given filter or
-     *                  was not present at the start of compare_duration, but was
-     *                  present at read_time.
-     * * "REMOVED":   indicates that the finding was present and matched the
-     *                  filter at the start of compare_duration, but did not match
-     *                  the filter at read_time.
-     * If compare_duration is not specified, then the only possible state_change
-     * is "UNUSED",  which will be the state_change set for all findings present
-     * at read_time.
-     * If this field is set then `state_change` must be a specified field in
-     * `group_by`.
-     * 
- * - * .google.protobuf.Duration compare_duration = 5; - */ - public com.google.protobuf.DurationOrBuilder getCompareDurationOrBuilder() { - if (compareDurationBuilder_ != null) { - return compareDurationBuilder_.getMessageOrBuilder(); - } else { - return compareDuration_ == null ? - com.google.protobuf.Duration.getDefaultInstance() : compareDuration_; - } - } - /** - *
-     * When compare_duration is set, the GroupResult's "state_change" attribute is
-     * updated to indicate whether the finding had its state changed, the
-     * finding's state remained unchanged, or if the finding was added during the
-     * compare_duration period of time that precedes the read_time. This is the
-     * time between (read_time - compare_duration) and read_time.
-     * The state_change value is derived based on the presence and state of the
-     * finding at the two points in time. Intermediate state changes between the
-     * two times don't affect the result. For example, the results aren't affected
-     * if the finding is made inactive and then active again.
-     * Possible "state_change" values when compare_duration is specified:
-     * * "CHANGED":   indicates that the finding was present and matched the given
-     *                  filter at the start of compare_duration, but changed its
-     *                  state at read_time.
-     * * "UNCHANGED": indicates that the finding was present and matched the given
-     *                  filter at the start of compare_duration and did not change
-     *                  state at read_time.
-     * * "ADDED":     indicates that the finding did not match the given filter or
-     *                  was not present at the start of compare_duration, but was
-     *                  present at read_time.
-     * * "REMOVED":   indicates that the finding was present and matched the
-     *                  filter at the start of compare_duration, but did not match
-     *                  the filter at read_time.
-     * If compare_duration is not specified, then the only possible state_change
-     * is "UNUSED",  which will be the state_change set for all findings present
-     * at read_time.
-     * If this field is set then `state_change` must be a specified field in
-     * `group_by`.
-     * 
- * - * .google.protobuf.Duration compare_duration = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getCompareDurationFieldBuilder() { - if (compareDurationBuilder_ == null) { - compareDurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - getCompareDuration(), - getParentForChildren(), - isClean()); - compareDuration_ = null; - } - return compareDurationBuilder_; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * The value returned by the last `GroupFindingsResponse`; indicates
-     * that this is a continuation of a prior `GroupFindings` call, and
-     * that the system should return the next page of data.
-     * 
- * - * string page_token = 7; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The value returned by the last `GroupFindingsResponse`; indicates
-     * that this is a continuation of a prior `GroupFindings` call, and
-     * that the system should return the next page of data.
-     * 
- * - * string page_token = 7; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The value returned by the last `GroupFindingsResponse`; indicates
-     * that this is a continuation of a prior `GroupFindings` call, and
-     * that the system should return the next page of data.
-     * 
- * - * string page_token = 7; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * The value returned by the last `GroupFindingsResponse`; indicates
-     * that this is a continuation of a prior `GroupFindings` call, and
-     * that the system should return the next page of data.
-     * 
- * - * string page_token = 7; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * The value returned by the last `GroupFindingsResponse`; indicates
-     * that this is a continuation of a prior `GroupFindings` call, and
-     * that the system should return the next page of data.
-     * 
- * - * string page_token = 7; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * The maximum number of results to return in a single response. Default is
-     * 10, minimum is 1, maximum is 1000.
-     * 
- * - * int32 page_size = 8; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * The maximum number of results to return in a single response. Default is
-     * 10, minimum is 1, maximum is 1000.
-     * 
- * - * int32 page_size = 8; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The maximum number of results to return in a single response. Default is
-     * 10, minimum is 1, maximum is 1000.
-     * 
- * - * int32 page_size = 8; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.GroupFindingsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.GroupFindingsRequest) - private static final com.google.cloud.securitycenter.v1.GroupFindingsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.GroupFindingsRequest(); - } - - public static com.google.cloud.securitycenter.v1.GroupFindingsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GroupFindingsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GroupFindingsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GroupFindingsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupFindingsRequestOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupFindingsRequestOrBuilder.java deleted file mode 100644 index ee68356228b0..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupFindingsRequestOrBuilder.java +++ /dev/null @@ -1,365 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -public interface GroupFindingsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.GroupFindingsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Name of the source to groupBy. Its format is
-   * "organizations/[organization_id]/sources/[source_id]",
-   * folders/[folder_id]/sources/[source_id], or
-   * projects/[project_id]/sources/[source_id]. To groupBy across all sources
-   * provide a source_id of `-`. For example:
-   * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-,
-   * or projects/{project_id}/sources/-
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. Name of the source to groupBy. Its format is
-   * "organizations/[organization_id]/sources/[source_id]",
-   * folders/[folder_id]/sources/[source_id], or
-   * projects/[project_id]/sources/[source_id]. To groupBy across all sources
-   * provide a source_id of `-`. For example:
-   * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-,
-   * or projects/{project_id}/sources/-
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Expression that defines the filter to apply across findings.
-   * The expression is a list of one or more restrictions combined via logical
-   * operators `AND` and `OR`.
-   * Parentheses are supported, and `OR` has higher precedence than `AND`.
-   * Restrictions have the form `<field> <operator> <value>` and may have a `-`
-   * character in front of them to indicate negation. Examples include:
-   *  * name
-   *  * source_properties.a_property
-   *  * security_marks.marks.marka
-   * The supported operators are:
-   * * `=` for all value types.
-   * * `>`, `<`, `>=`, `<=` for integer values.
-   * * `:`, meaning substring matching, for strings.
-   * The supported value types are:
-   * * string literals in quotes.
-   * * integer literals without quotes.
-   * * boolean literals `true` and `false` without quotes.
-   * The following field and operator combinations are supported:
-   * * name: `=`
-   * * parent: `=`, `:`
-   * * resource_name: `=`, `:`
-   * * state: `=`, `:`
-   * * category: `=`, `:`
-   * * external_uri: `=`, `:`
-   * * event_time: `=`, `>`, `<`, `>=`, `<=`
-   *   Usage: This should be milliseconds since epoch or an RFC3339 string.
-   *   Examples:
-   *     `event_time = "2019-06-10T16:07:18-07:00"`
-   *     `event_time = 1560208038000`
-   * * severity: `=`, `:`
-   * * workflow_state: `=`, `:`
-   * * security_marks.marks: `=`, `:`
-   * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=`
-   *   For example, `source_properties.size = 100` is a valid filter string.
-   *   Use a partial match on the empty string to filter based on a property
-   *   existing: `source_properties.my_property : ""`
-   *   Use a negated partial match on the empty string to filter based on a
-   *   property not existing: `-source_properties.my_property : ""`
-   * * resource:
-   *   * resource.name: `=`, `:`
-   *   * resource.parent_name: `=`, `:`
-   *   * resource.parent_display_name: `=`, `:`
-   *   * resource.project_name: `=`, `:`
-   *   * resource.project_display_name: `=`, `:`
-   *   * resource.type: `=`, `:`
-   * 
- * - * string filter = 2; - * @return The filter. - */ - java.lang.String getFilter(); - /** - *
-   * Expression that defines the filter to apply across findings.
-   * The expression is a list of one or more restrictions combined via logical
-   * operators `AND` and `OR`.
-   * Parentheses are supported, and `OR` has higher precedence than `AND`.
-   * Restrictions have the form `<field> <operator> <value>` and may have a `-`
-   * character in front of them to indicate negation. Examples include:
-   *  * name
-   *  * source_properties.a_property
-   *  * security_marks.marks.marka
-   * The supported operators are:
-   * * `=` for all value types.
-   * * `>`, `<`, `>=`, `<=` for integer values.
-   * * `:`, meaning substring matching, for strings.
-   * The supported value types are:
-   * * string literals in quotes.
-   * * integer literals without quotes.
-   * * boolean literals `true` and `false` without quotes.
-   * The following field and operator combinations are supported:
-   * * name: `=`
-   * * parent: `=`, `:`
-   * * resource_name: `=`, `:`
-   * * state: `=`, `:`
-   * * category: `=`, `:`
-   * * external_uri: `=`, `:`
-   * * event_time: `=`, `>`, `<`, `>=`, `<=`
-   *   Usage: This should be milliseconds since epoch or an RFC3339 string.
-   *   Examples:
-   *     `event_time = "2019-06-10T16:07:18-07:00"`
-   *     `event_time = 1560208038000`
-   * * severity: `=`, `:`
-   * * workflow_state: `=`, `:`
-   * * security_marks.marks: `=`, `:`
-   * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=`
-   *   For example, `source_properties.size = 100` is a valid filter string.
-   *   Use a partial match on the empty string to filter based on a property
-   *   existing: `source_properties.my_property : ""`
-   *   Use a negated partial match on the empty string to filter based on a
-   *   property not existing: `-source_properties.my_property : ""`
-   * * resource:
-   *   * resource.name: `=`, `:`
-   *   * resource.parent_name: `=`, `:`
-   *   * resource.parent_display_name: `=`, `:`
-   *   * resource.project_name: `=`, `:`
-   *   * resource.project_display_name: `=`, `:`
-   *   * resource.type: `=`, `:`
-   * 
- * - * string filter = 2; - * @return The bytes for filter. - */ - com.google.protobuf.ByteString - getFilterBytes(); - - /** - *
-   * 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
-   * * severity
-   * The following fields are supported when compare_duration is set:
-   * * state_change
-   * 
- * - * string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The groupBy. - */ - java.lang.String getGroupBy(); - /** - *
-   * 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
-   * * severity
-   * The following fields are supported when compare_duration is set:
-   * * state_change
-   * 
- * - * string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for groupBy. - */ - com.google.protobuf.ByteString - getGroupByBytes(); - - /** - *
-   * Time used as a reference point when filtering findings. The filter is
-   * limited to findings existing at the supplied time and their values are
-   * those at that specific time. Absence of this field will default to the
-   * API's version of NOW.
-   * 
- * - * .google.protobuf.Timestamp read_time = 4; - * @return Whether the readTime field is set. - */ - boolean hasReadTime(); - /** - *
-   * Time used as a reference point when filtering findings. The filter is
-   * limited to findings existing at the supplied time and their values are
-   * those at that specific time. Absence of this field will default to the
-   * API's version of NOW.
-   * 
- * - * .google.protobuf.Timestamp read_time = 4; - * @return The readTime. - */ - com.google.protobuf.Timestamp getReadTime(); - /** - *
-   * Time used as a reference point when filtering findings. The filter is
-   * limited to findings existing at the supplied time and their values are
-   * those at that specific time. Absence of this field will default to the
-   * API's version of NOW.
-   * 
- * - * .google.protobuf.Timestamp read_time = 4; - */ - com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder(); - - /** - *
-   * When compare_duration is set, the GroupResult's "state_change" attribute is
-   * updated to indicate whether the finding had its state changed, the
-   * finding's state remained unchanged, or if the finding was added during the
-   * compare_duration period of time that precedes the read_time. This is the
-   * time between (read_time - compare_duration) and read_time.
-   * The state_change value is derived based on the presence and state of the
-   * finding at the two points in time. Intermediate state changes between the
-   * two times don't affect the result. For example, the results aren't affected
-   * if the finding is made inactive and then active again.
-   * Possible "state_change" values when compare_duration is specified:
-   * * "CHANGED":   indicates that the finding was present and matched the given
-   *                  filter at the start of compare_duration, but changed its
-   *                  state at read_time.
-   * * "UNCHANGED": indicates that the finding was present and matched the given
-   *                  filter at the start of compare_duration and did not change
-   *                  state at read_time.
-   * * "ADDED":     indicates that the finding did not match the given filter or
-   *                  was not present at the start of compare_duration, but was
-   *                  present at read_time.
-   * * "REMOVED":   indicates that the finding was present and matched the
-   *                  filter at the start of compare_duration, but did not match
-   *                  the filter at read_time.
-   * If compare_duration is not specified, then the only possible state_change
-   * is "UNUSED",  which will be the state_change set for all findings present
-   * at read_time.
-   * If this field is set then `state_change` must be a specified field in
-   * `group_by`.
-   * 
- * - * .google.protobuf.Duration compare_duration = 5; - * @return Whether the compareDuration field is set. - */ - boolean hasCompareDuration(); - /** - *
-   * When compare_duration is set, the GroupResult's "state_change" attribute is
-   * updated to indicate whether the finding had its state changed, the
-   * finding's state remained unchanged, or if the finding was added during the
-   * compare_duration period of time that precedes the read_time. This is the
-   * time between (read_time - compare_duration) and read_time.
-   * The state_change value is derived based on the presence and state of the
-   * finding at the two points in time. Intermediate state changes between the
-   * two times don't affect the result. For example, the results aren't affected
-   * if the finding is made inactive and then active again.
-   * Possible "state_change" values when compare_duration is specified:
-   * * "CHANGED":   indicates that the finding was present and matched the given
-   *                  filter at the start of compare_duration, but changed its
-   *                  state at read_time.
-   * * "UNCHANGED": indicates that the finding was present and matched the given
-   *                  filter at the start of compare_duration and did not change
-   *                  state at read_time.
-   * * "ADDED":     indicates that the finding did not match the given filter or
-   *                  was not present at the start of compare_duration, but was
-   *                  present at read_time.
-   * * "REMOVED":   indicates that the finding was present and matched the
-   *                  filter at the start of compare_duration, but did not match
-   *                  the filter at read_time.
-   * If compare_duration is not specified, then the only possible state_change
-   * is "UNUSED",  which will be the state_change set for all findings present
-   * at read_time.
-   * If this field is set then `state_change` must be a specified field in
-   * `group_by`.
-   * 
- * - * .google.protobuf.Duration compare_duration = 5; - * @return The compareDuration. - */ - com.google.protobuf.Duration getCompareDuration(); - /** - *
-   * When compare_duration is set, the GroupResult's "state_change" attribute is
-   * updated to indicate whether the finding had its state changed, the
-   * finding's state remained unchanged, or if the finding was added during the
-   * compare_duration period of time that precedes the read_time. This is the
-   * time between (read_time - compare_duration) and read_time.
-   * The state_change value is derived based on the presence and state of the
-   * finding at the two points in time. Intermediate state changes between the
-   * two times don't affect the result. For example, the results aren't affected
-   * if the finding is made inactive and then active again.
-   * Possible "state_change" values when compare_duration is specified:
-   * * "CHANGED":   indicates that the finding was present and matched the given
-   *                  filter at the start of compare_duration, but changed its
-   *                  state at read_time.
-   * * "UNCHANGED": indicates that the finding was present and matched the given
-   *                  filter at the start of compare_duration and did not change
-   *                  state at read_time.
-   * * "ADDED":     indicates that the finding did not match the given filter or
-   *                  was not present at the start of compare_duration, but was
-   *                  present at read_time.
-   * * "REMOVED":   indicates that the finding was present and matched the
-   *                  filter at the start of compare_duration, but did not match
-   *                  the filter at read_time.
-   * If compare_duration is not specified, then the only possible state_change
-   * is "UNUSED",  which will be the state_change set for all findings present
-   * at read_time.
-   * If this field is set then `state_change` must be a specified field in
-   * `group_by`.
-   * 
- * - * .google.protobuf.Duration compare_duration = 5; - */ - com.google.protobuf.DurationOrBuilder getCompareDurationOrBuilder(); - - /** - *
-   * The value returned by the last `GroupFindingsResponse`; indicates
-   * that this is a continuation of a prior `GroupFindings` call, and
-   * that the system should return the next page of data.
-   * 
- * - * string page_token = 7; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * The value returned by the last `GroupFindingsResponse`; indicates
-   * that this is a continuation of a prior `GroupFindings` call, and
-   * that the system should return the next page of data.
-   * 
- * - * string page_token = 7; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); - - /** - *
-   * The maximum number of results to return in a single response. Default is
-   * 10, minimum is 1, maximum is 1000.
-   * 
- * - * int32 page_size = 8; - * @return The pageSize. - */ - int getPageSize(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupFindingsResponse.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupFindingsResponse.java deleted file mode 100644 index 2471a641e7af..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupFindingsResponse.java +++ /dev/null @@ -1,1407 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Response message for group by findings.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.GroupFindingsResponse} - */ -public final class GroupFindingsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.GroupFindingsResponse) - GroupFindingsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use GroupFindingsResponse.newBuilder() to construct. - private GroupFindingsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GroupFindingsResponse() { - groupByResults_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GroupFindingsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GroupFindingsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - groupByResults_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - groupByResults_.add( - input.readMessage(com.google.cloud.securitycenter.v1.GroupResult.parser(), extensionRegistry)); - break; - } - case 18: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (readTime_ != null) { - subBuilder = readTime_.toBuilder(); - } - readTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(readTime_); - readTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - case 32: { - - totalSize_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - groupByResults_ = java.util.Collections.unmodifiableList(groupByResults_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GroupFindingsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GroupFindingsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.GroupFindingsResponse.class, com.google.cloud.securitycenter.v1.GroupFindingsResponse.Builder.class); - } - - public static final int GROUP_BY_RESULTS_FIELD_NUMBER = 1; - private java.util.List groupByResults_; - /** - *
-   * Group results. There exists an element for each existing unique
-   * combination of property/values. The element contains a count for the number
-   * of times those specific property/values appear.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - @java.lang.Override - public java.util.List getGroupByResultsList() { - return groupByResults_; - } - /** - *
-   * Group results. There exists an element for each existing unique
-   * combination of property/values. The element contains a count for the number
-   * of times those specific property/values appear.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - @java.lang.Override - public java.util.List - getGroupByResultsOrBuilderList() { - return groupByResults_; - } - /** - *
-   * Group results. There exists an element for each existing unique
-   * combination of property/values. The element contains a count for the number
-   * of times those specific property/values appear.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - @java.lang.Override - public int getGroupByResultsCount() { - return groupByResults_.size(); - } - /** - *
-   * Group results. There exists an element for each existing unique
-   * combination of property/values. The element contains a count for the number
-   * of times those specific property/values appear.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.GroupResult getGroupByResults(int index) { - return groupByResults_.get(index); - } - /** - *
-   * Group results. There exists an element for each existing unique
-   * combination of property/values. The element contains a count for the number
-   * of times those specific property/values appear.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.GroupResultOrBuilder getGroupByResultsOrBuilder( - int index) { - return groupByResults_.get(index); - } - - public static final int READ_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp readTime_; - /** - *
-   * Time used for executing the groupBy request.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return Whether the readTime field is set. - */ - @java.lang.Override - public boolean hasReadTime() { - return readTime_ != null; - } - /** - *
-   * Time used for executing the groupBy request.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return The readTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getReadTime() { - return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } - /** - *
-   * Time used for executing the groupBy request.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { - return getReadTime(); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results.
-   * 
- * - * string next_page_token = 3; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results.
-   * 
- * - * string next_page_token = 3; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TOTAL_SIZE_FIELD_NUMBER = 4; - private int totalSize_; - /** - *
-   * The total number of results matching the query.
-   * 
- * - * int32 total_size = 4; - * @return The totalSize. - */ - @java.lang.Override - public int getTotalSize() { - return totalSize_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < groupByResults_.size(); i++) { - output.writeMessage(1, groupByResults_.get(i)); - } - if (readTime_ != null) { - output.writeMessage(2, getReadTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nextPageToken_); - } - if (totalSize_ != 0) { - output.writeInt32(4, totalSize_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < groupByResults_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, groupByResults_.get(i)); - } - if (readTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getReadTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nextPageToken_); - } - if (totalSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(4, totalSize_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.GroupFindingsResponse)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.GroupFindingsResponse other = (com.google.cloud.securitycenter.v1.GroupFindingsResponse) obj; - - if (!getGroupByResultsList() - .equals(other.getGroupByResultsList())) return false; - if (hasReadTime() != other.hasReadTime()) return false; - if (hasReadTime()) { - if (!getReadTime() - .equals(other.getReadTime())) return false; - } - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (getTotalSize() - != other.getTotalSize()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getGroupByResultsCount() > 0) { - hash = (37 * hash) + GROUP_BY_RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getGroupByResultsList().hashCode(); - } - if (hasReadTime()) { - hash = (37 * hash) + READ_TIME_FIELD_NUMBER; - hash = (53 * hash) + getReadTime().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (37 * hash) + TOTAL_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getTotalSize(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.GroupFindingsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.GroupFindingsResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GroupFindingsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.GroupFindingsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GroupFindingsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.GroupFindingsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GroupFindingsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.GroupFindingsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GroupFindingsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.GroupFindingsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GroupFindingsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.GroupFindingsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.GroupFindingsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response message for group by findings.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.GroupFindingsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.GroupFindingsResponse) - com.google.cloud.securitycenter.v1.GroupFindingsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GroupFindingsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GroupFindingsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.GroupFindingsResponse.class, com.google.cloud.securitycenter.v1.GroupFindingsResponse.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.GroupFindingsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getGroupByResultsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (groupByResultsBuilder_ == null) { - groupByResults_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - groupByResultsBuilder_.clear(); - } - if (readTimeBuilder_ == null) { - readTime_ = null; - } else { - readTime_ = null; - readTimeBuilder_ = null; - } - nextPageToken_ = ""; - - totalSize_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GroupFindingsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GroupFindingsResponse getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.GroupFindingsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GroupFindingsResponse build() { - com.google.cloud.securitycenter.v1.GroupFindingsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GroupFindingsResponse buildPartial() { - com.google.cloud.securitycenter.v1.GroupFindingsResponse result = new com.google.cloud.securitycenter.v1.GroupFindingsResponse(this); - int from_bitField0_ = bitField0_; - if (groupByResultsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - groupByResults_ = java.util.Collections.unmodifiableList(groupByResults_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.groupByResults_ = groupByResults_; - } else { - result.groupByResults_ = groupByResultsBuilder_.build(); - } - if (readTimeBuilder_ == null) { - result.readTime_ = readTime_; - } else { - result.readTime_ = readTimeBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - result.totalSize_ = totalSize_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.GroupFindingsResponse) { - return mergeFrom((com.google.cloud.securitycenter.v1.GroupFindingsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.GroupFindingsResponse other) { - if (other == com.google.cloud.securitycenter.v1.GroupFindingsResponse.getDefaultInstance()) return this; - if (groupByResultsBuilder_ == null) { - if (!other.groupByResults_.isEmpty()) { - if (groupByResults_.isEmpty()) { - groupByResults_ = other.groupByResults_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureGroupByResultsIsMutable(); - groupByResults_.addAll(other.groupByResults_); - } - onChanged(); - } - } else { - if (!other.groupByResults_.isEmpty()) { - if (groupByResultsBuilder_.isEmpty()) { - groupByResultsBuilder_.dispose(); - groupByResultsBuilder_ = null; - groupByResults_ = other.groupByResults_; - bitField0_ = (bitField0_ & ~0x00000001); - groupByResultsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getGroupByResultsFieldBuilder() : null; - } else { - groupByResultsBuilder_.addAllMessages(other.groupByResults_); - } - } - } - if (other.hasReadTime()) { - mergeReadTime(other.getReadTime()); - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - if (other.getTotalSize() != 0) { - setTotalSize(other.getTotalSize()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.GroupFindingsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.GroupFindingsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List groupByResults_ = - java.util.Collections.emptyList(); - private void ensureGroupByResultsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - groupByResults_ = new java.util.ArrayList(groupByResults_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.GroupResult, com.google.cloud.securitycenter.v1.GroupResult.Builder, com.google.cloud.securitycenter.v1.GroupResultOrBuilder> groupByResultsBuilder_; - - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public java.util.List getGroupByResultsList() { - if (groupByResultsBuilder_ == null) { - return java.util.Collections.unmodifiableList(groupByResults_); - } else { - return groupByResultsBuilder_.getMessageList(); - } - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public int getGroupByResultsCount() { - if (groupByResultsBuilder_ == null) { - return groupByResults_.size(); - } else { - return groupByResultsBuilder_.getCount(); - } - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public com.google.cloud.securitycenter.v1.GroupResult getGroupByResults(int index) { - if (groupByResultsBuilder_ == null) { - return groupByResults_.get(index); - } else { - return groupByResultsBuilder_.getMessage(index); - } - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public Builder setGroupByResults( - int index, com.google.cloud.securitycenter.v1.GroupResult value) { - if (groupByResultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureGroupByResultsIsMutable(); - groupByResults_.set(index, value); - onChanged(); - } else { - groupByResultsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public Builder setGroupByResults( - int index, com.google.cloud.securitycenter.v1.GroupResult.Builder builderForValue) { - if (groupByResultsBuilder_ == null) { - ensureGroupByResultsIsMutable(); - groupByResults_.set(index, builderForValue.build()); - onChanged(); - } else { - groupByResultsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public Builder addGroupByResults(com.google.cloud.securitycenter.v1.GroupResult value) { - if (groupByResultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureGroupByResultsIsMutable(); - groupByResults_.add(value); - onChanged(); - } else { - groupByResultsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public Builder addGroupByResults( - int index, com.google.cloud.securitycenter.v1.GroupResult value) { - if (groupByResultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureGroupByResultsIsMutable(); - groupByResults_.add(index, value); - onChanged(); - } else { - groupByResultsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public Builder addGroupByResults( - com.google.cloud.securitycenter.v1.GroupResult.Builder builderForValue) { - if (groupByResultsBuilder_ == null) { - ensureGroupByResultsIsMutable(); - groupByResults_.add(builderForValue.build()); - onChanged(); - } else { - groupByResultsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public Builder addGroupByResults( - int index, com.google.cloud.securitycenter.v1.GroupResult.Builder builderForValue) { - if (groupByResultsBuilder_ == null) { - ensureGroupByResultsIsMutable(); - groupByResults_.add(index, builderForValue.build()); - onChanged(); - } else { - groupByResultsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public Builder addAllGroupByResults( - java.lang.Iterable values) { - if (groupByResultsBuilder_ == null) { - ensureGroupByResultsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, groupByResults_); - onChanged(); - } else { - groupByResultsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public Builder clearGroupByResults() { - if (groupByResultsBuilder_ == null) { - groupByResults_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - groupByResultsBuilder_.clear(); - } - return this; - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public Builder removeGroupByResults(int index) { - if (groupByResultsBuilder_ == null) { - ensureGroupByResultsIsMutable(); - groupByResults_.remove(index); - onChanged(); - } else { - groupByResultsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public com.google.cloud.securitycenter.v1.GroupResult.Builder getGroupByResultsBuilder( - int index) { - return getGroupByResultsFieldBuilder().getBuilder(index); - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public com.google.cloud.securitycenter.v1.GroupResultOrBuilder getGroupByResultsOrBuilder( - int index) { - if (groupByResultsBuilder_ == null) { - return groupByResults_.get(index); } else { - return groupByResultsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public java.util.List - getGroupByResultsOrBuilderList() { - if (groupByResultsBuilder_ != null) { - return groupByResultsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(groupByResults_); - } - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public com.google.cloud.securitycenter.v1.GroupResult.Builder addGroupByResultsBuilder() { - return getGroupByResultsFieldBuilder().addBuilder( - com.google.cloud.securitycenter.v1.GroupResult.getDefaultInstance()); - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public com.google.cloud.securitycenter.v1.GroupResult.Builder addGroupByResultsBuilder( - int index) { - return getGroupByResultsFieldBuilder().addBuilder( - index, com.google.cloud.securitycenter.v1.GroupResult.getDefaultInstance()); - } - /** - *
-     * Group results. There exists an element for each existing unique
-     * combination of property/values. The element contains a count for the number
-     * of times those specific property/values appear.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - public java.util.List - getGroupByResultsBuilderList() { - return getGroupByResultsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.GroupResult, com.google.cloud.securitycenter.v1.GroupResult.Builder, com.google.cloud.securitycenter.v1.GroupResultOrBuilder> - getGroupByResultsFieldBuilder() { - if (groupByResultsBuilder_ == null) { - groupByResultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.GroupResult, com.google.cloud.securitycenter.v1.GroupResult.Builder, com.google.cloud.securitycenter.v1.GroupResultOrBuilder>( - groupByResults_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - groupByResults_ = null; - } - return groupByResultsBuilder_; - } - - private com.google.protobuf.Timestamp readTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; - /** - *
-     * Time used for executing the groupBy request.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return Whether the readTime field is set. - */ - public boolean hasReadTime() { - return readTimeBuilder_ != null || readTime_ != null; - } - /** - *
-     * Time used for executing the groupBy request.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return The readTime. - */ - public com.google.protobuf.Timestamp getReadTime() { - if (readTimeBuilder_ == null) { - return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } else { - return readTimeBuilder_.getMessage(); - } - } - /** - *
-     * Time used for executing the groupBy request.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public Builder setReadTime(com.google.protobuf.Timestamp value) { - if (readTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - readTime_ = value; - onChanged(); - } else { - readTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Time used for executing the groupBy request.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public Builder setReadTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (readTimeBuilder_ == null) { - readTime_ = builderForValue.build(); - onChanged(); - } else { - readTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Time used for executing the groupBy request.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public Builder mergeReadTime(com.google.protobuf.Timestamp value) { - if (readTimeBuilder_ == null) { - if (readTime_ != null) { - readTime_ = - com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial(); - } else { - readTime_ = value; - } - onChanged(); - } else { - readTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Time used for executing the groupBy request.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public Builder clearReadTime() { - if (readTimeBuilder_ == null) { - readTime_ = null; - onChanged(); - } else { - readTime_ = null; - readTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Time used for executing the groupBy request.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { - - onChanged(); - return getReadTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Time used for executing the groupBy request.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { - if (readTimeBuilder_ != null) { - return readTimeBuilder_.getMessageOrBuilder(); - } else { - return readTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } - } - /** - *
-     * Time used for executing the groupBy request.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getReadTimeFieldBuilder() { - if (readTimeBuilder_ == null) { - readTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getReadTime(), - getParentForChildren(), - isClean()); - readTime_ = null; - } - return readTimeBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results.
-     * 
- * - * string next_page_token = 3; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results.
-     * 
- * - * string next_page_token = 3; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results.
-     * 
- * - * string next_page_token = 3; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results.
-     * 
- * - * string next_page_token = 3; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results.
-     * 
- * - * string next_page_token = 3; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - - private int totalSize_ ; - /** - *
-     * The total number of results matching the query.
-     * 
- * - * int32 total_size = 4; - * @return The totalSize. - */ - @java.lang.Override - public int getTotalSize() { - return totalSize_; - } - /** - *
-     * The total number of results matching the query.
-     * 
- * - * int32 total_size = 4; - * @param value The totalSize to set. - * @return This builder for chaining. - */ - public Builder setTotalSize(int value) { - - totalSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The total number of results matching the query.
-     * 
- * - * int32 total_size = 4; - * @return This builder for chaining. - */ - public Builder clearTotalSize() { - - totalSize_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.GroupFindingsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.GroupFindingsResponse) - private static final com.google.cloud.securitycenter.v1.GroupFindingsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.GroupFindingsResponse(); - } - - public static com.google.cloud.securitycenter.v1.GroupFindingsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GroupFindingsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GroupFindingsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GroupFindingsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupFindingsResponseOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupFindingsResponseOrBuilder.java deleted file mode 100644 index c283f526218e..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupFindingsResponseOrBuilder.java +++ /dev/null @@ -1,122 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -public interface GroupFindingsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.GroupFindingsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Group results. There exists an element for each existing unique
-   * combination of property/values. The element contains a count for the number
-   * of times those specific property/values appear.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - java.util.List - getGroupByResultsList(); - /** - *
-   * Group results. There exists an element for each existing unique
-   * combination of property/values. The element contains a count for the number
-   * of times those specific property/values appear.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - com.google.cloud.securitycenter.v1.GroupResult getGroupByResults(int index); - /** - *
-   * Group results. There exists an element for each existing unique
-   * combination of property/values. The element contains a count for the number
-   * of times those specific property/values appear.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - int getGroupByResultsCount(); - /** - *
-   * Group results. There exists an element for each existing unique
-   * combination of property/values. The element contains a count for the number
-   * of times those specific property/values appear.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - java.util.List - getGroupByResultsOrBuilderList(); - /** - *
-   * Group results. There exists an element for each existing unique
-   * combination of property/values. The element contains a count for the number
-   * of times those specific property/values appear.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - com.google.cloud.securitycenter.v1.GroupResultOrBuilder getGroupByResultsOrBuilder( - int index); - - /** - *
-   * Time used for executing the groupBy request.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return Whether the readTime field is set. - */ - boolean hasReadTime(); - /** - *
-   * Time used for executing the groupBy request.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return The readTime. - */ - com.google.protobuf.Timestamp getReadTime(); - /** - *
-   * Time used for executing the groupBy request.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder(); - - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results.
-   * 
- * - * string next_page_token = 3; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results.
-   * 
- * - * string next_page_token = 3; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); - - /** - *
-   * The total number of results matching the query.
-   * 
- * - * int32 total_size = 4; - * @return The totalSize. - */ - int getTotalSize(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupResult.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupResult.java deleted file mode 100644 index c5c7e4947f96..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupResult.java +++ /dev/null @@ -1,843 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Result containing the properties and count of a groupBy request.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.GroupResult} - */ -public final class GroupResult extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.GroupResult) - GroupResultOrBuilder { -private static final long serialVersionUID = 0L; - // Use GroupResult.newBuilder() to construct. - private GroupResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GroupResult() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GroupResult(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GroupResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - properties_ = com.google.protobuf.MapField.newMapField( - PropertiesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - properties__ = input.readMessage( - PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - properties_.getMutableMap().put( - properties__.getKey(), properties__.getValue()); - break; - } - case 16: { - - count_ = input.readInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GroupResult_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 1: - return internalGetProperties(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GroupResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.GroupResult.class, com.google.cloud.securitycenter.v1.GroupResult.Builder.class); - } - - public static final int PROPERTIES_FIELD_NUMBER = 1; - private static final class PropertiesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.protobuf.Value> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GroupResult_PropertiesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.protobuf.Value.getDefaultInstance()); - } - private com.google.protobuf.MapField< - java.lang.String, com.google.protobuf.Value> properties_; - private com.google.protobuf.MapField - internalGetProperties() { - if (properties_ == null) { - return com.google.protobuf.MapField.emptyMapField( - PropertiesDefaultEntryHolder.defaultEntry); - } - return properties_; - } - - public int getPropertiesCount() { - return internalGetProperties().getMap().size(); - } - /** - *
-   * Properties matching the groupBy fields in the request.
-   * 
- * - * map<string, .google.protobuf.Value> properties = 1; - */ - - @java.lang.Override - public boolean containsProperties( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetProperties().getMap().containsKey(key); - } - /** - * Use {@link #getPropertiesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getProperties() { - return getPropertiesMap(); - } - /** - *
-   * Properties matching the groupBy fields in the request.
-   * 
- * - * map<string, .google.protobuf.Value> properties = 1; - */ - @java.lang.Override - - public java.util.Map getPropertiesMap() { - return internalGetProperties().getMap(); - } - /** - *
-   * Properties matching the groupBy fields in the request.
-   * 
- * - * map<string, .google.protobuf.Value> properties = 1; - */ - @java.lang.Override - - public com.google.protobuf.Value getPropertiesOrDefault( - java.lang.String key, - com.google.protobuf.Value defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetProperties().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Properties matching the groupBy fields in the request.
-   * 
- * - * map<string, .google.protobuf.Value> properties = 1; - */ - @java.lang.Override - - public com.google.protobuf.Value getPropertiesOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetProperties().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int COUNT_FIELD_NUMBER = 2; - private long count_; - /** - *
-   * Total count of resources for the given properties.
-   * 
- * - * int64 count = 2; - * @return The count. - */ - @java.lang.Override - public long getCount() { - return count_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetProperties(), - PropertiesDefaultEntryHolder.defaultEntry, - 1); - if (count_ != 0L) { - output.writeInt64(2, count_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetProperties().getMap().entrySet()) { - com.google.protobuf.MapEntry - properties__ = PropertiesDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, properties__); - } - if (count_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, count_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.GroupResult)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.GroupResult other = (com.google.cloud.securitycenter.v1.GroupResult) obj; - - if (!internalGetProperties().equals( - other.internalGetProperties())) return false; - if (getCount() - != other.getCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (!internalGetProperties().getMap().isEmpty()) { - hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; - hash = (53 * hash) + internalGetProperties().hashCode(); - } - hash = (37 * hash) + COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getCount()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.GroupResult parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.GroupResult parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GroupResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.GroupResult parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GroupResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.GroupResult parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GroupResult parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.GroupResult parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GroupResult parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.GroupResult parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.GroupResult parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.GroupResult parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.GroupResult prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Result containing the properties and count of a groupBy request.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.GroupResult} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.GroupResult) - com.google.cloud.securitycenter.v1.GroupResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GroupResult_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 1: - return internalGetProperties(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 1: - return internalGetMutableProperties(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GroupResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.GroupResult.class, com.google.cloud.securitycenter.v1.GroupResult.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.GroupResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - internalGetMutableProperties().clear(); - count_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.SecuritycenterService.internal_static_google_cloud_securitycenter_v1_GroupResult_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GroupResult getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.GroupResult.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GroupResult build() { - com.google.cloud.securitycenter.v1.GroupResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GroupResult buildPartial() { - com.google.cloud.securitycenter.v1.GroupResult result = new com.google.cloud.securitycenter.v1.GroupResult(this); - int from_bitField0_ = bitField0_; - result.properties_ = internalGetProperties(); - result.properties_.makeImmutable(); - result.count_ = count_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.GroupResult) { - return mergeFrom((com.google.cloud.securitycenter.v1.GroupResult)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.GroupResult other) { - if (other == com.google.cloud.securitycenter.v1.GroupResult.getDefaultInstance()) return this; - internalGetMutableProperties().mergeFrom( - other.internalGetProperties()); - if (other.getCount() != 0L) { - setCount(other.getCount()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.GroupResult parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.GroupResult) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.MapField< - java.lang.String, com.google.protobuf.Value> properties_; - private com.google.protobuf.MapField - internalGetProperties() { - if (properties_ == null) { - return com.google.protobuf.MapField.emptyMapField( - PropertiesDefaultEntryHolder.defaultEntry); - } - return properties_; - } - private com.google.protobuf.MapField - internalGetMutableProperties() { - onChanged();; - if (properties_ == null) { - properties_ = com.google.protobuf.MapField.newMapField( - PropertiesDefaultEntryHolder.defaultEntry); - } - if (!properties_.isMutable()) { - properties_ = properties_.copy(); - } - return properties_; - } - - public int getPropertiesCount() { - return internalGetProperties().getMap().size(); - } - /** - *
-     * Properties matching the groupBy fields in the request.
-     * 
- * - * map<string, .google.protobuf.Value> properties = 1; - */ - - @java.lang.Override - public boolean containsProperties( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetProperties().getMap().containsKey(key); - } - /** - * Use {@link #getPropertiesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getProperties() { - return getPropertiesMap(); - } - /** - *
-     * Properties matching the groupBy fields in the request.
-     * 
- * - * map<string, .google.protobuf.Value> properties = 1; - */ - @java.lang.Override - - public java.util.Map getPropertiesMap() { - return internalGetProperties().getMap(); - } - /** - *
-     * Properties matching the groupBy fields in the request.
-     * 
- * - * map<string, .google.protobuf.Value> properties = 1; - */ - @java.lang.Override - - public com.google.protobuf.Value getPropertiesOrDefault( - java.lang.String key, - com.google.protobuf.Value defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetProperties().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * Properties matching the groupBy fields in the request.
-     * 
- * - * map<string, .google.protobuf.Value> properties = 1; - */ - @java.lang.Override - - public com.google.protobuf.Value getPropertiesOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetProperties().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearProperties() { - internalGetMutableProperties().getMutableMap() - .clear(); - return this; - } - /** - *
-     * Properties matching the groupBy fields in the request.
-     * 
- * - * map<string, .google.protobuf.Value> properties = 1; - */ - - public Builder removeProperties( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableProperties().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableProperties() { - return internalGetMutableProperties().getMutableMap(); - } - /** - *
-     * Properties matching the groupBy fields in the request.
-     * 
- * - * map<string, .google.protobuf.Value> properties = 1; - */ - public Builder putProperties( - java.lang.String key, - com.google.protobuf.Value value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { - throw new NullPointerException("map value"); -} - - internalGetMutableProperties().getMutableMap() - .put(key, value); - return this; - } - /** - *
-     * Properties matching the groupBy fields in the request.
-     * 
- * - * map<string, .google.protobuf.Value> properties = 1; - */ - - public Builder putAllProperties( - java.util.Map values) { - internalGetMutableProperties().getMutableMap() - .putAll(values); - return this; - } - - private long count_ ; - /** - *
-     * Total count of resources for the given properties.
-     * 
- * - * int64 count = 2; - * @return The count. - */ - @java.lang.Override - public long getCount() { - return count_; - } - /** - *
-     * Total count of resources for the given properties.
-     * 
- * - * int64 count = 2; - * @param value The count to set. - * @return This builder for chaining. - */ - public Builder setCount(long value) { - - count_ = value; - onChanged(); - return this; - } - /** - *
-     * Total count of resources for the given properties.
-     * 
- * - * int64 count = 2; - * @return This builder for chaining. - */ - public Builder clearCount() { - - count_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.GroupResult) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.GroupResult) - private static final com.google.cloud.securitycenter.v1.GroupResult DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.GroupResult(); - } - - public static com.google.cloud.securitycenter.v1.GroupResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GroupResult parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GroupResult(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.GroupResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupResultOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupResultOrBuilder.java deleted file mode 100644 index cf6bc3f339b3..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GroupResultOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -package com.google.cloud.securitycenter.v1; - -public interface GroupResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.GroupResult) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Properties matching the groupBy fields in the request.
-   * 
- * - * map<string, .google.protobuf.Value> properties = 1; - */ - int getPropertiesCount(); - /** - *
-   * Properties matching the groupBy fields in the request.
-   * 
- * - * map<string, .google.protobuf.Value> properties = 1; - */ - boolean containsProperties( - java.lang.String key); - /** - * Use {@link #getPropertiesMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getProperties(); - /** - *
-   * Properties matching the groupBy fields in the request.
-   * 
- * - * map<string, .google.protobuf.Value> properties = 1; - */ - java.util.Map - getPropertiesMap(); - /** - *
-   * Properties matching the groupBy fields in the request.
-   * 
- * - * map<string, .google.protobuf.Value> properties = 1; - */ - - /* nullable */ -com.google.protobuf.Value getPropertiesOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Value defaultValue); - /** - *
-   * Properties matching the groupBy fields in the request.
-   * 
- * - * map<string, .google.protobuf.Value> properties = 1; - */ - - com.google.protobuf.Value getPropertiesOrThrow( - java.lang.String key); - - /** - *
-   * Total count of resources for the given properties.
-   * 
- * - * int64 count = 2; - * @return The count. - */ - long getCount(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/IamBinding.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/IamBinding.java deleted file mode 100644 index c1648a2bbc7e..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/IamBinding.java +++ /dev/null @@ -1,1046 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/iam_binding.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Represents a particular IAM binding, which captures a member's role addition,
- * removal, or state.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.IamBinding} - */ -public final class IamBinding extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.IamBinding) - IamBindingOrBuilder { -private static final long serialVersionUID = 0L; - // Use IamBinding.newBuilder() to construct. - private IamBinding(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private IamBinding() { - action_ = 0; - role_ = ""; - member_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new IamBinding(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private IamBinding( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - action_ = rawValue; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - role_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - member_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.IamBindingProto.internal_static_google_cloud_securitycenter_v1_IamBinding_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.IamBindingProto.internal_static_google_cloud_securitycenter_v1_IamBinding_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.IamBinding.class, com.google.cloud.securitycenter.v1.IamBinding.Builder.class); - } - - /** - *
-   * The type of action performed on a Binding in a policy.
-   * 
- * - * Protobuf enum {@code google.cloud.securitycenter.v1.IamBinding.Action} - */ - public enum Action - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unspecified.
-     * 
- * - * ACTION_UNSPECIFIED = 0; - */ - ACTION_UNSPECIFIED(0), - /** - *
-     * Addition of a Binding.
-     * 
- * - * ADD = 1; - */ - ADD(1), - /** - *
-     * Removal of a Binding.
-     * 
- * - * REMOVE = 2; - */ - REMOVE(2), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unspecified.
-     * 
- * - * ACTION_UNSPECIFIED = 0; - */ - public static final int ACTION_UNSPECIFIED_VALUE = 0; - /** - *
-     * Addition of a Binding.
-     * 
- * - * ADD = 1; - */ - public static final int ADD_VALUE = 1; - /** - *
-     * Removal of a Binding.
-     * 
- * - * REMOVE = 2; - */ - public static final int REMOVE_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Action valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Action forNumber(int value) { - switch (value) { - case 0: return ACTION_UNSPECIFIED; - case 1: return ADD; - case 2: return REMOVE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Action> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Action findValueByNumber(int number) { - return Action.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.IamBinding.getDescriptor().getEnumTypes().get(0); - } - - private static final Action[] VALUES = values(); - - public static Action valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Action(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v1.IamBinding.Action) - } - - public static final int ACTION_FIELD_NUMBER = 1; - private int action_; - /** - *
-   * The action that was performed on a Binding.
-   * 
- * - * .google.cloud.securitycenter.v1.IamBinding.Action action = 1; - * @return The enum numeric value on the wire for action. - */ - @java.lang.Override public int getActionValue() { - return action_; - } - /** - *
-   * The action that was performed on a Binding.
-   * 
- * - * .google.cloud.securitycenter.v1.IamBinding.Action action = 1; - * @return The action. - */ - @java.lang.Override public com.google.cloud.securitycenter.v1.IamBinding.Action getAction() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.IamBinding.Action result = com.google.cloud.securitycenter.v1.IamBinding.Action.valueOf(action_); - return result == null ? com.google.cloud.securitycenter.v1.IamBinding.Action.UNRECOGNIZED : result; - } - - public static final int ROLE_FIELD_NUMBER = 2; - private volatile java.lang.Object role_; - /** - *
-   * Role that is assigned to "members".
-   * For example, "roles/viewer", "roles/editor", or "roles/owner".
-   * 
- * - * string role = 2; - * @return The role. - */ - @java.lang.Override - public java.lang.String getRole() { - java.lang.Object ref = role_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - role_ = s; - return s; - } - } - /** - *
-   * Role that is assigned to "members".
-   * For example, "roles/viewer", "roles/editor", or "roles/owner".
-   * 
- * - * string role = 2; - * @return The bytes for role. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRoleBytes() { - java.lang.Object ref = role_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - role_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MEMBER_FIELD_NUMBER = 3; - private volatile java.lang.Object member_; - /** - *
-   * A single identity requesting access for a Cloud Platform resource,
-   * e.g. "foo@google.com".
-   * 
- * - * string member = 3; - * @return The member. - */ - @java.lang.Override - public java.lang.String getMember() { - java.lang.Object ref = member_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - member_ = s; - return s; - } - } - /** - *
-   * A single identity requesting access for a Cloud Platform resource,
-   * e.g. "foo@google.com".
-   * 
- * - * string member = 3; - * @return The bytes for member. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMemberBytes() { - java.lang.Object ref = member_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - member_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (action_ != com.google.cloud.securitycenter.v1.IamBinding.Action.ACTION_UNSPECIFIED.getNumber()) { - output.writeEnum(1, action_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(role_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, role_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(member_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, member_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (action_ != com.google.cloud.securitycenter.v1.IamBinding.Action.ACTION_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, action_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(role_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, role_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(member_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, member_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.IamBinding)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.IamBinding other = (com.google.cloud.securitycenter.v1.IamBinding) obj; - - if (action_ != other.action_) return false; - if (!getRole() - .equals(other.getRole())) return false; - if (!getMember() - .equals(other.getMember())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ACTION_FIELD_NUMBER; - hash = (53 * hash) + action_; - hash = (37 * hash) + ROLE_FIELD_NUMBER; - hash = (53 * hash) + getRole().hashCode(); - hash = (37 * hash) + MEMBER_FIELD_NUMBER; - hash = (53 * hash) + getMember().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.IamBinding parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.IamBinding parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.IamBinding parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.IamBinding parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.IamBinding parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.IamBinding parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.IamBinding parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.IamBinding parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.IamBinding parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.IamBinding parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.IamBinding parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.IamBinding parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.IamBinding prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Represents a particular IAM binding, which captures a member's role addition,
-   * removal, or state.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.IamBinding} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.IamBinding) - com.google.cloud.securitycenter.v1.IamBindingOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.IamBindingProto.internal_static_google_cloud_securitycenter_v1_IamBinding_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.IamBindingProto.internal_static_google_cloud_securitycenter_v1_IamBinding_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.IamBinding.class, com.google.cloud.securitycenter.v1.IamBinding.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.IamBinding.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - action_ = 0; - - role_ = ""; - - member_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.IamBindingProto.internal_static_google_cloud_securitycenter_v1_IamBinding_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.IamBinding getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.IamBinding.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.IamBinding build() { - com.google.cloud.securitycenter.v1.IamBinding result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.IamBinding buildPartial() { - com.google.cloud.securitycenter.v1.IamBinding result = new com.google.cloud.securitycenter.v1.IamBinding(this); - result.action_ = action_; - result.role_ = role_; - result.member_ = member_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.IamBinding) { - return mergeFrom((com.google.cloud.securitycenter.v1.IamBinding)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.IamBinding other) { - if (other == com.google.cloud.securitycenter.v1.IamBinding.getDefaultInstance()) return this; - if (other.action_ != 0) { - setActionValue(other.getActionValue()); - } - if (!other.getRole().isEmpty()) { - role_ = other.role_; - onChanged(); - } - if (!other.getMember().isEmpty()) { - member_ = other.member_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.IamBinding parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.IamBinding) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int action_ = 0; - /** - *
-     * The action that was performed on a Binding.
-     * 
- * - * .google.cloud.securitycenter.v1.IamBinding.Action action = 1; - * @return The enum numeric value on the wire for action. - */ - @java.lang.Override public int getActionValue() { - return action_; - } - /** - *
-     * The action that was performed on a Binding.
-     * 
- * - * .google.cloud.securitycenter.v1.IamBinding.Action action = 1; - * @param value The enum numeric value on the wire for action to set. - * @return This builder for chaining. - */ - public Builder setActionValue(int value) { - - action_ = value; - onChanged(); - return this; - } - /** - *
-     * The action that was performed on a Binding.
-     * 
- * - * .google.cloud.securitycenter.v1.IamBinding.Action action = 1; - * @return The action. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.IamBinding.Action getAction() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.IamBinding.Action result = com.google.cloud.securitycenter.v1.IamBinding.Action.valueOf(action_); - return result == null ? com.google.cloud.securitycenter.v1.IamBinding.Action.UNRECOGNIZED : result; - } - /** - *
-     * The action that was performed on a Binding.
-     * 
- * - * .google.cloud.securitycenter.v1.IamBinding.Action action = 1; - * @param value The action to set. - * @return This builder for chaining. - */ - public Builder setAction(com.google.cloud.securitycenter.v1.IamBinding.Action value) { - if (value == null) { - throw new NullPointerException(); - } - - action_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The action that was performed on a Binding.
-     * 
- * - * .google.cloud.securitycenter.v1.IamBinding.Action action = 1; - * @return This builder for chaining. - */ - public Builder clearAction() { - - action_ = 0; - onChanged(); - return this; - } - - private java.lang.Object role_ = ""; - /** - *
-     * Role that is assigned to "members".
-     * For example, "roles/viewer", "roles/editor", or "roles/owner".
-     * 
- * - * string role = 2; - * @return The role. - */ - public java.lang.String getRole() { - java.lang.Object ref = role_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - role_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Role that is assigned to "members".
-     * For example, "roles/viewer", "roles/editor", or "roles/owner".
-     * 
- * - * string role = 2; - * @return The bytes for role. - */ - public com.google.protobuf.ByteString - getRoleBytes() { - java.lang.Object ref = role_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - role_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Role that is assigned to "members".
-     * For example, "roles/viewer", "roles/editor", or "roles/owner".
-     * 
- * - * string role = 2; - * @param value The role to set. - * @return This builder for chaining. - */ - public Builder setRole( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - role_ = value; - onChanged(); - return this; - } - /** - *
-     * Role that is assigned to "members".
-     * For example, "roles/viewer", "roles/editor", or "roles/owner".
-     * 
- * - * string role = 2; - * @return This builder for chaining. - */ - public Builder clearRole() { - - role_ = getDefaultInstance().getRole(); - onChanged(); - return this; - } - /** - *
-     * Role that is assigned to "members".
-     * For example, "roles/viewer", "roles/editor", or "roles/owner".
-     * 
- * - * string role = 2; - * @param value The bytes for role to set. - * @return This builder for chaining. - */ - public Builder setRoleBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - role_ = value; - onChanged(); - return this; - } - - private java.lang.Object member_ = ""; - /** - *
-     * A single identity requesting access for a Cloud Platform resource,
-     * e.g. "foo@google.com".
-     * 
- * - * string member = 3; - * @return The member. - */ - public java.lang.String getMember() { - java.lang.Object ref = member_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - member_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A single identity requesting access for a Cloud Platform resource,
-     * e.g. "foo@google.com".
-     * 
- * - * string member = 3; - * @return The bytes for member. - */ - public com.google.protobuf.ByteString - getMemberBytes() { - java.lang.Object ref = member_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - member_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A single identity requesting access for a Cloud Platform resource,
-     * e.g. "foo@google.com".
-     * 
- * - * string member = 3; - * @param value The member to set. - * @return This builder for chaining. - */ - public Builder setMember( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - member_ = value; - onChanged(); - return this; - } - /** - *
-     * A single identity requesting access for a Cloud Platform resource,
-     * e.g. "foo@google.com".
-     * 
- * - * string member = 3; - * @return This builder for chaining. - */ - public Builder clearMember() { - - member_ = getDefaultInstance().getMember(); - onChanged(); - return this; - } - /** - *
-     * A single identity requesting access for a Cloud Platform resource,
-     * e.g. "foo@google.com".
-     * 
- * - * string member = 3; - * @param value The bytes for member to set. - * @return This builder for chaining. - */ - public Builder setMemberBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - member_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.IamBinding) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.IamBinding) - private static final com.google.cloud.securitycenter.v1.IamBinding DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.IamBinding(); - } - - public static com.google.cloud.securitycenter.v1.IamBinding getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IamBinding parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new IamBinding(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.IamBinding getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/IamBindingOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/IamBindingOrBuilder.java deleted file mode 100644 index 5a36e59aa7ea..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/IamBindingOrBuilder.java +++ /dev/null @@ -1,72 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/iam_binding.proto - -package com.google.cloud.securitycenter.v1; - -public interface IamBindingOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.IamBinding) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The action that was performed on a Binding.
-   * 
- * - * .google.cloud.securitycenter.v1.IamBinding.Action action = 1; - * @return The enum numeric value on the wire for action. - */ - int getActionValue(); - /** - *
-   * The action that was performed on a Binding.
-   * 
- * - * .google.cloud.securitycenter.v1.IamBinding.Action action = 1; - * @return The action. - */ - com.google.cloud.securitycenter.v1.IamBinding.Action getAction(); - - /** - *
-   * Role that is assigned to "members".
-   * For example, "roles/viewer", "roles/editor", or "roles/owner".
-   * 
- * - * string role = 2; - * @return The role. - */ - java.lang.String getRole(); - /** - *
-   * Role that is assigned to "members".
-   * For example, "roles/viewer", "roles/editor", or "roles/owner".
-   * 
- * - * string role = 2; - * @return The bytes for role. - */ - com.google.protobuf.ByteString - getRoleBytes(); - - /** - *
-   * A single identity requesting access for a Cloud Platform resource,
-   * e.g. "foo@google.com".
-   * 
- * - * string member = 3; - * @return The member. - */ - java.lang.String getMember(); - /** - *
-   * A single identity requesting access for a Cloud Platform resource,
-   * e.g. "foo@google.com".
-   * 
- * - * string member = 3; - * @return The bytes for member. - */ - com.google.protobuf.ByteString - getMemberBytes(); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/IamBindingProto.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/IamBindingProto.java deleted file mode 100644 index eb64b7e0ba30..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/IamBindingProto.java +++ /dev/null @@ -1,58 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/iam_binding.proto - -package com.google.cloud.securitycenter.v1; - -public final class IamBindingProto { - private IamBindingProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_IamBinding_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_IamBinding_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n0google/cloud/securitycenter/v1/iam_bin" + - "ding.proto\022\036google.cloud.securitycenter." + - "v1\"\244\001\n\nIamBinding\022A\n\006action\030\001 \001(\01621.goog" + - "le.cloud.securitycenter.v1.IamBinding.Ac" + - "tion\022\014\n\004role\030\002 \001(\t\022\016\n\006member\030\003 \001(\t\"5\n\006Ac" + - "tion\022\026\n\022ACTION_UNSPECIFIED\020\000\022\007\n\003ADD\020\001\022\n\n" + - "\006REMOVE\020\002B\353\001\n\"com.google.cloud.securityc" + - "enter.v1B\017IamBindingProtoP\001ZLgoogle.gola" + - "ng.org/genproto/googleapis/cloud/securit" + - "ycenter/v1;securitycenter\252\002\036Google.Cloud" + - ".SecurityCenter.V1\312\002\036Google\\Cloud\\Securi" + - "tyCenter\\V1\352\002!Google::Cloud::SecurityCen" + - "ter::V1b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_google_cloud_securitycenter_v1_IamBinding_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_securitycenter_v1_IamBinding_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_IamBinding_descriptor, - new java.lang.String[] { "Action", "Role", "Member", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Indicator.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Indicator.java deleted file mode 100644 index bb7197ff1147..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Indicator.java +++ /dev/null @@ -1,5175 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/indicator.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Represents what's commonly known as an Indicator of compromise (IoC) in
- * computer forensics. This is an artifact observed on a network or in an
- * operating system that, with high confidence, indicates a computer intrusion.
- * Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Indicator} - */ -public final class Indicator extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Indicator) - IndicatorOrBuilder { -private static final long serialVersionUID = 0L; - // Use Indicator.newBuilder() to construct. - private Indicator(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Indicator() { - ipAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; - domains_ = com.google.protobuf.LazyStringArrayList.EMPTY; - signatures_ = java.util.Collections.emptyList(); - uris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Indicator(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Indicator( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - ipAddresses_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - ipAddresses_.add(s); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - domains_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - domains_.add(s); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - signatures_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - signatures_.add( - input.readMessage(com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.parser(), extensionRegistry)); - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - uris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - uris_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - ipAddresses_ = ipAddresses_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - domains_ = domains_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - signatures_ = java.util.Collections.unmodifiableList(signatures_); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - uris_ = uris_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.IndicatorProto.internal_static_google_cloud_securitycenter_v1_Indicator_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.IndicatorProto.internal_static_google_cloud_securitycenter_v1_Indicator_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Indicator.class, com.google.cloud.securitycenter.v1.Indicator.Builder.class); - } - - public interface ProcessSignatureOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Indicator.ProcessSignature) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Signature indicating that a binary family was matched.
-     * 
- * - * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; - * @return Whether the memoryHashSignature field is set. - */ - boolean hasMemoryHashSignature(); - /** - *
-     * Signature indicating that a binary family was matched.
-     * 
- * - * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; - * @return The memoryHashSignature. - */ - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature getMemoryHashSignature(); - /** - *
-     * Signature indicating that a binary family was matched.
-     * 
- * - * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; - */ - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignatureOrBuilder getMemoryHashSignatureOrBuilder(); - - /** - *
-     * Signature indicating that a YARA rule was matched.
-     * 
- * - * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; - * @return Whether the yaraRuleSignature field is set. - */ - boolean hasYaraRuleSignature(); - /** - *
-     * Signature indicating that a YARA rule was matched.
-     * 
- * - * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; - * @return The yaraRuleSignature. - */ - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature getYaraRuleSignature(); - /** - *
-     * Signature indicating that a YARA rule was matched.
-     * 
- * - * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; - */ - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignatureOrBuilder getYaraRuleSignatureOrBuilder(); - - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.SignatureCase getSignatureCase(); - } - /** - *
-   * Indicates what signature matched this process.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Indicator.ProcessSignature} - */ - public static final class ProcessSignature extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Indicator.ProcessSignature) - ProcessSignatureOrBuilder { - private static final long serialVersionUID = 0L; - // Use ProcessSignature.newBuilder() to construct. - private ProcessSignature(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ProcessSignature() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ProcessSignature(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ProcessSignature( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 50: { - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Builder subBuilder = null; - if (signatureCase_ == 6) { - subBuilder = ((com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) signature_).toBuilder(); - } - signature_ = - input.readMessage(com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) signature_); - signature_ = subBuilder.buildPartial(); - } - signatureCase_ = 6; - break; - } - case 58: { - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.Builder subBuilder = null; - if (signatureCase_ == 7) { - subBuilder = ((com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) signature_).toBuilder(); - } - signature_ = - input.readMessage(com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) signature_); - signature_ = subBuilder.buildPartial(); - } - signatureCase_ = 7; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.IndicatorProto.internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.IndicatorProto.internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.class, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.Builder.class); - } - - public interface MemoryHashSignatureOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) - com.google.protobuf.MessageOrBuilder { - - /** - *
-       * The binary family.
-       * 
- * - * string binary_family = 1; - * @return The binaryFamily. - */ - java.lang.String getBinaryFamily(); - /** - *
-       * The binary family.
-       * 
- * - * string binary_family = 1; - * @return The bytes for binaryFamily. - */ - com.google.protobuf.ByteString - getBinaryFamilyBytes(); - - /** - *
-       * The list of memory hash detections contributing to the binary family
-       * match.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; - */ - java.util.List - getDetectionsList(); - /** - *
-       * The list of memory hash detections contributing to the binary family
-       * match.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; - */ - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection getDetections(int index); - /** - *
-       * The list of memory hash detections contributing to the binary family
-       * match.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; - */ - int getDetectionsCount(); - /** - *
-       * The list of memory hash detections contributing to the binary family
-       * match.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; - */ - java.util.List - getDetectionsOrBuilderList(); - /** - *
-       * The list of memory hash detections contributing to the binary family
-       * match.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; - */ - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.DetectionOrBuilder getDetectionsOrBuilder( - int index); - } - /** - *
-     * A signature corresponding to memory page hashes.
-     * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature} - */ - public static final class MemoryHashSignature extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) - MemoryHashSignatureOrBuilder { - private static final long serialVersionUID = 0L; - // Use MemoryHashSignature.newBuilder() to construct. - private MemoryHashSignature(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private MemoryHashSignature() { - binaryFamily_ = ""; - detections_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new MemoryHashSignature(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private MemoryHashSignature( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - binaryFamily_ = s; - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - detections_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - detections_.add( - input.readMessage(com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - detections_ = java.util.Collections.unmodifiableList(detections_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.IndicatorProto.internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.IndicatorProto.internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.class, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Builder.class); - } - - public interface DetectionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection) - com.google.protobuf.MessageOrBuilder { - - /** - *
-         * The name of the binary associated with the memory hash
-         * signature detection.
-         * 
- * - * string binary = 2; - * @return The binary. - */ - java.lang.String getBinary(); - /** - *
-         * The name of the binary associated with the memory hash
-         * signature detection.
-         * 
- * - * string binary = 2; - * @return The bytes for binary. - */ - com.google.protobuf.ByteString - getBinaryBytes(); - - /** - *
-         * The percentage of memory page hashes in the signature
-         * that were matched.
-         * 
- * - * double percent_pages_matched = 3; - * @return The percentPagesMatched. - */ - double getPercentPagesMatched(); - } - /** - *
-       * Memory hash detection contributing to the binary family match.
-       * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection} - */ - public static final class Detection extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection) - DetectionOrBuilder { - private static final long serialVersionUID = 0L; - // Use Detection.newBuilder() to construct. - private Detection(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Detection() { - binary_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Detection(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Detection( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - binary_ = s; - break; - } - case 25: { - - percentPagesMatched_ = input.readDouble(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.IndicatorProto.internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_Detection_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.IndicatorProto.internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_Detection_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.class, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.Builder.class); - } - - public static final int BINARY_FIELD_NUMBER = 2; - private volatile java.lang.Object binary_; - /** - *
-         * The name of the binary associated with the memory hash
-         * signature detection.
-         * 
- * - * string binary = 2; - * @return The binary. - */ - @java.lang.Override - public java.lang.String getBinary() { - java.lang.Object ref = binary_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - binary_ = s; - return s; - } - } - /** - *
-         * The name of the binary associated with the memory hash
-         * signature detection.
-         * 
- * - * string binary = 2; - * @return The bytes for binary. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getBinaryBytes() { - java.lang.Object ref = binary_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - binary_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PERCENT_PAGES_MATCHED_FIELD_NUMBER = 3; - private double percentPagesMatched_; - /** - *
-         * The percentage of memory page hashes in the signature
-         * that were matched.
-         * 
- * - * double percent_pages_matched = 3; - * @return The percentPagesMatched. - */ - @java.lang.Override - public double getPercentPagesMatched() { - return percentPagesMatched_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(binary_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, binary_); - } - if (java.lang.Double.doubleToRawLongBits(percentPagesMatched_) != 0) { - output.writeDouble(3, percentPagesMatched_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(binary_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, binary_); - } - if (java.lang.Double.doubleToRawLongBits(percentPagesMatched_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(3, percentPagesMatched_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection other = (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection) obj; - - if (!getBinary() - .equals(other.getBinary())) return false; - if (java.lang.Double.doubleToLongBits(getPercentPagesMatched()) - != java.lang.Double.doubleToLongBits( - other.getPercentPagesMatched())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + BINARY_FIELD_NUMBER; - hash = (53 * hash) + getBinary().hashCode(); - hash = (37 * hash) + PERCENT_PAGES_MATCHED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getPercentPagesMatched())); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-         * Memory hash detection contributing to the binary family match.
-         * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection) - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.DetectionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.IndicatorProto.internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_Detection_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.IndicatorProto.internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_Detection_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.class, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - binary_ = ""; - - percentPagesMatched_ = 0D; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.IndicatorProto.internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_Detection_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection build() { - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection buildPartial() { - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection result = new com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection(this); - result.binary_ = binary_; - result.percentPagesMatched_ = percentPagesMatched_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection) { - return mergeFrom((com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection other) { - if (other == com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.getDefaultInstance()) return this; - if (!other.getBinary().isEmpty()) { - binary_ = other.binary_; - onChanged(); - } - if (other.getPercentPagesMatched() != 0D) { - setPercentPagesMatched(other.getPercentPagesMatched()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object binary_ = ""; - /** - *
-           * The name of the binary associated with the memory hash
-           * signature detection.
-           * 
- * - * string binary = 2; - * @return The binary. - */ - public java.lang.String getBinary() { - java.lang.Object ref = binary_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - binary_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-           * The name of the binary associated with the memory hash
-           * signature detection.
-           * 
- * - * string binary = 2; - * @return The bytes for binary. - */ - public com.google.protobuf.ByteString - getBinaryBytes() { - java.lang.Object ref = binary_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - binary_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-           * The name of the binary associated with the memory hash
-           * signature detection.
-           * 
- * - * string binary = 2; - * @param value The binary to set. - * @return This builder for chaining. - */ - public Builder setBinary( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - binary_ = value; - onChanged(); - return this; - } - /** - *
-           * The name of the binary associated with the memory hash
-           * signature detection.
-           * 
- * - * string binary = 2; - * @return This builder for chaining. - */ - public Builder clearBinary() { - - binary_ = getDefaultInstance().getBinary(); - onChanged(); - return this; - } - /** - *
-           * The name of the binary associated with the memory hash
-           * signature detection.
-           * 
- * - * string binary = 2; - * @param value The bytes for binary to set. - * @return This builder for chaining. - */ - public Builder setBinaryBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - binary_ = value; - onChanged(); - return this; - } - - private double percentPagesMatched_ ; - /** - *
-           * The percentage of memory page hashes in the signature
-           * that were matched.
-           * 
- * - * double percent_pages_matched = 3; - * @return The percentPagesMatched. - */ - @java.lang.Override - public double getPercentPagesMatched() { - return percentPagesMatched_; - } - /** - *
-           * The percentage of memory page hashes in the signature
-           * that were matched.
-           * 
- * - * double percent_pages_matched = 3; - * @param value The percentPagesMatched to set. - * @return This builder for chaining. - */ - public Builder setPercentPagesMatched(double value) { - - percentPagesMatched_ = value; - onChanged(); - return this; - } - /** - *
-           * The percentage of memory page hashes in the signature
-           * that were matched.
-           * 
- * - * double percent_pages_matched = 3; - * @return This builder for chaining. - */ - public Builder clearPercentPagesMatched() { - - percentPagesMatched_ = 0D; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection) - private static final com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection(); - } - - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Detection parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Detection(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int BINARY_FAMILY_FIELD_NUMBER = 1; - private volatile java.lang.Object binaryFamily_; - /** - *
-       * The binary family.
-       * 
- * - * string binary_family = 1; - * @return The binaryFamily. - */ - @java.lang.Override - public java.lang.String getBinaryFamily() { - java.lang.Object ref = binaryFamily_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - binaryFamily_ = s; - return s; - } - } - /** - *
-       * The binary family.
-       * 
- * - * string binary_family = 1; - * @return The bytes for binaryFamily. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getBinaryFamilyBytes() { - java.lang.Object ref = binaryFamily_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - binaryFamily_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DETECTIONS_FIELD_NUMBER = 4; - private java.util.List detections_; - /** - *
-       * The list of memory hash detections contributing to the binary family
-       * match.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; - */ - @java.lang.Override - public java.util.List getDetectionsList() { - return detections_; - } - /** - *
-       * The list of memory hash detections contributing to the binary family
-       * match.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; - */ - @java.lang.Override - public java.util.List - getDetectionsOrBuilderList() { - return detections_; - } - /** - *
-       * The list of memory hash detections contributing to the binary family
-       * match.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; - */ - @java.lang.Override - public int getDetectionsCount() { - return detections_.size(); - } - /** - *
-       * The list of memory hash detections contributing to the binary family
-       * match.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection getDetections(int index) { - return detections_.get(index); - } - /** - *
-       * The list of memory hash detections contributing to the binary family
-       * match.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.DetectionOrBuilder getDetectionsOrBuilder( - int index) { - return detections_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(binaryFamily_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, binaryFamily_); - } - for (int i = 0; i < detections_.size(); i++) { - output.writeMessage(4, detections_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(binaryFamily_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, binaryFamily_); - } - for (int i = 0; i < detections_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, detections_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature other = (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) obj; - - if (!getBinaryFamily() - .equals(other.getBinaryFamily())) return false; - if (!getDetectionsList() - .equals(other.getDetectionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + BINARY_FAMILY_FIELD_NUMBER; - hash = (53 * hash) + getBinaryFamily().hashCode(); - if (getDetectionsCount() > 0) { - hash = (37 * hash) + DETECTIONS_FIELD_NUMBER; - hash = (53 * hash) + getDetectionsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-       * A signature corresponding to memory page hashes.
-       * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignatureOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.IndicatorProto.internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.IndicatorProto.internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.class, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getDetectionsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - binaryFamily_ = ""; - - if (detectionsBuilder_ == null) { - detections_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - detectionsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.IndicatorProto.internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature build() { - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature buildPartial() { - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature result = new com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature(this); - int from_bitField0_ = bitField0_; - result.binaryFamily_ = binaryFamily_; - if (detectionsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - detections_ = java.util.Collections.unmodifiableList(detections_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.detections_ = detections_; - } else { - result.detections_ = detectionsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) { - return mergeFrom((com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature other) { - if (other == com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.getDefaultInstance()) return this; - if (!other.getBinaryFamily().isEmpty()) { - binaryFamily_ = other.binaryFamily_; - onChanged(); - } - if (detectionsBuilder_ == null) { - if (!other.detections_.isEmpty()) { - if (detections_.isEmpty()) { - detections_ = other.detections_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDetectionsIsMutable(); - detections_.addAll(other.detections_); - } - onChanged(); - } - } else { - if (!other.detections_.isEmpty()) { - if (detectionsBuilder_.isEmpty()) { - detectionsBuilder_.dispose(); - detectionsBuilder_ = null; - detections_ = other.detections_; - bitField0_ = (bitField0_ & ~0x00000001); - detectionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDetectionsFieldBuilder() : null; - } else { - detectionsBuilder_.addAllMessages(other.detections_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object binaryFamily_ = ""; - /** - *
-         * The binary family.
-         * 
- * - * string binary_family = 1; - * @return The binaryFamily. - */ - public java.lang.String getBinaryFamily() { - java.lang.Object ref = binaryFamily_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - binaryFamily_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-         * The binary family.
-         * 
- * - * string binary_family = 1; - * @return The bytes for binaryFamily. - */ - public com.google.protobuf.ByteString - getBinaryFamilyBytes() { - java.lang.Object ref = binaryFamily_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - binaryFamily_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-         * The binary family.
-         * 
- * - * string binary_family = 1; - * @param value The binaryFamily to set. - * @return This builder for chaining. - */ - public Builder setBinaryFamily( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - binaryFamily_ = value; - onChanged(); - return this; - } - /** - *
-         * The binary family.
-         * 
- * - * string binary_family = 1; - * @return This builder for chaining. - */ - public Builder clearBinaryFamily() { - - binaryFamily_ = getDefaultInstance().getBinaryFamily(); - onChanged(); - return this; - } - /** - *
-         * The binary family.
-         * 
- * - * string binary_family = 1; - * @param value The bytes for binaryFamily to set. - * @return This builder for chaining. - */ - public Builder setBinaryFamilyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - binaryFamily_ = value; - onChanged(); - return this; - } - - private java.util.List detections_ = - java.util.Collections.emptyList(); - private void ensureDetectionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - detections_ = new java.util.ArrayList(detections_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.Builder, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.DetectionOrBuilder> detectionsBuilder_; - - /** - *
-         * The list of memory hash detections contributing to the binary family
-         * match.
-         * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; - */ - public java.util.List getDetectionsList() { - if (detectionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(detections_); - } else { - return detectionsBuilder_.getMessageList(); - } - } - /** - *
-         * The list of memory hash detections contributing to the binary family
-         * match.
-         * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; - */ - public int getDetectionsCount() { - if (detectionsBuilder_ == null) { - return detections_.size(); - } else { - return detectionsBuilder_.getCount(); - } - } - /** - *
-         * The list of memory hash detections contributing to the binary family
-         * match.
-         * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; - */ - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection getDetections(int index) { - if (detectionsBuilder_ == null) { - return detections_.get(index); - } else { - return detectionsBuilder_.getMessage(index); - } - } - /** - *
-         * The list of memory hash detections contributing to the binary family
-         * match.
-         * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; - */ - public Builder setDetections( - int index, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection value) { - if (detectionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectionsIsMutable(); - detections_.set(index, value); - onChanged(); - } else { - detectionsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-         * The list of memory hash detections contributing to the binary family
-         * match.
-         * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; - */ - public Builder setDetections( - int index, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.Builder builderForValue) { - if (detectionsBuilder_ == null) { - ensureDetectionsIsMutable(); - detections_.set(index, builderForValue.build()); - onChanged(); - } else { - detectionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-         * The list of memory hash detections contributing to the binary family
-         * match.
-         * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; - */ - public Builder addDetections(com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection value) { - if (detectionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectionsIsMutable(); - detections_.add(value); - onChanged(); - } else { - detectionsBuilder_.addMessage(value); - } - return this; - } - /** - *
-         * The list of memory hash detections contributing to the binary family
-         * match.
-         * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; - */ - public Builder addDetections( - int index, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection value) { - if (detectionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectionsIsMutable(); - detections_.add(index, value); - onChanged(); - } else { - detectionsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-         * The list of memory hash detections contributing to the binary family
-         * match.
-         * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; - */ - public Builder addDetections( - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.Builder builderForValue) { - if (detectionsBuilder_ == null) { - ensureDetectionsIsMutable(); - detections_.add(builderForValue.build()); - onChanged(); - } else { - detectionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-         * The list of memory hash detections contributing to the binary family
-         * match.
-         * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; - */ - public Builder addDetections( - int index, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.Builder builderForValue) { - if (detectionsBuilder_ == null) { - ensureDetectionsIsMutable(); - detections_.add(index, builderForValue.build()); - onChanged(); - } else { - detectionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-         * The list of memory hash detections contributing to the binary family
-         * match.
-         * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; - */ - public Builder addAllDetections( - java.lang.Iterable values) { - if (detectionsBuilder_ == null) { - ensureDetectionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, detections_); - onChanged(); - } else { - detectionsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-         * The list of memory hash detections contributing to the binary family
-         * match.
-         * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; - */ - public Builder clearDetections() { - if (detectionsBuilder_ == null) { - detections_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - detectionsBuilder_.clear(); - } - return this; - } - /** - *
-         * The list of memory hash detections contributing to the binary family
-         * match.
-         * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; - */ - public Builder removeDetections(int index) { - if (detectionsBuilder_ == null) { - ensureDetectionsIsMutable(); - detections_.remove(index); - onChanged(); - } else { - detectionsBuilder_.remove(index); - } - return this; - } - /** - *
-         * The list of memory hash detections contributing to the binary family
-         * match.
-         * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; - */ - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.Builder getDetectionsBuilder( - int index) { - return getDetectionsFieldBuilder().getBuilder(index); - } - /** - *
-         * The list of memory hash detections contributing to the binary family
-         * match.
-         * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; - */ - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.DetectionOrBuilder getDetectionsOrBuilder( - int index) { - if (detectionsBuilder_ == null) { - return detections_.get(index); } else { - return detectionsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-         * The list of memory hash detections contributing to the binary family
-         * match.
-         * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; - */ - public java.util.List - getDetectionsOrBuilderList() { - if (detectionsBuilder_ != null) { - return detectionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(detections_); - } - } - /** - *
-         * The list of memory hash detections contributing to the binary family
-         * match.
-         * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; - */ - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.Builder addDetectionsBuilder() { - return getDetectionsFieldBuilder().addBuilder( - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.getDefaultInstance()); - } - /** - *
-         * The list of memory hash detections contributing to the binary family
-         * match.
-         * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; - */ - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.Builder addDetectionsBuilder( - int index) { - return getDetectionsFieldBuilder().addBuilder( - index, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.getDefaultInstance()); - } - /** - *
-         * The list of memory hash detections contributing to the binary family
-         * match.
-         * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; - */ - public java.util.List - getDetectionsBuilderList() { - return getDetectionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.Builder, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.DetectionOrBuilder> - getDetectionsFieldBuilder() { - if (detectionsBuilder_ == null) { - detectionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.Builder, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.DetectionOrBuilder>( - detections_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - detections_ = null; - } - return detectionsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) - private static final com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature(); - } - - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MemoryHashSignature parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new MemoryHashSignature(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface YaraRuleSignatureOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) - com.google.protobuf.MessageOrBuilder { - - /** - *
-       * The name of the YARA rule.
-       * 
- * - * string yara_rule = 5; - * @return The yaraRule. - */ - java.lang.String getYaraRule(); - /** - *
-       * The name of the YARA rule.
-       * 
- * - * string yara_rule = 5; - * @return The bytes for yaraRule. - */ - com.google.protobuf.ByteString - getYaraRuleBytes(); - } - /** - *
-     * A signature corresponding to a YARA rule.
-     * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature} - */ - public static final class YaraRuleSignature extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) - YaraRuleSignatureOrBuilder { - private static final long serialVersionUID = 0L; - // Use YaraRuleSignature.newBuilder() to construct. - private YaraRuleSignature(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private YaraRuleSignature() { - yaraRule_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new YaraRuleSignature(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private YaraRuleSignature( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - yaraRule_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.IndicatorProto.internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_YaraRuleSignature_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.IndicatorProto.internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_YaraRuleSignature_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.class, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.Builder.class); - } - - public static final int YARA_RULE_FIELD_NUMBER = 5; - private volatile java.lang.Object yaraRule_; - /** - *
-       * The name of the YARA rule.
-       * 
- * - * string yara_rule = 5; - * @return The yaraRule. - */ - @java.lang.Override - public java.lang.String getYaraRule() { - java.lang.Object ref = yaraRule_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - yaraRule_ = s; - return s; - } - } - /** - *
-       * The name of the YARA rule.
-       * 
- * - * string yara_rule = 5; - * @return The bytes for yaraRule. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getYaraRuleBytes() { - java.lang.Object ref = yaraRule_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - yaraRule_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(yaraRule_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, yaraRule_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(yaraRule_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, yaraRule_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature other = (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) obj; - - if (!getYaraRule() - .equals(other.getYaraRule())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + YARA_RULE_FIELD_NUMBER; - hash = (53 * hash) + getYaraRule().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-       * A signature corresponding to a YARA rule.
-       * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignatureOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.IndicatorProto.internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_YaraRuleSignature_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.IndicatorProto.internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_YaraRuleSignature_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.class, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - yaraRule_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.IndicatorProto.internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_YaraRuleSignature_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature build() { - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature buildPartial() { - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature result = new com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature(this); - result.yaraRule_ = yaraRule_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) { - return mergeFrom((com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature other) { - if (other == com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.getDefaultInstance()) return this; - if (!other.getYaraRule().isEmpty()) { - yaraRule_ = other.yaraRule_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object yaraRule_ = ""; - /** - *
-         * The name of the YARA rule.
-         * 
- * - * string yara_rule = 5; - * @return The yaraRule. - */ - public java.lang.String getYaraRule() { - java.lang.Object ref = yaraRule_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - yaraRule_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-         * The name of the YARA rule.
-         * 
- * - * string yara_rule = 5; - * @return The bytes for yaraRule. - */ - public com.google.protobuf.ByteString - getYaraRuleBytes() { - java.lang.Object ref = yaraRule_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - yaraRule_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-         * The name of the YARA rule.
-         * 
- * - * string yara_rule = 5; - * @param value The yaraRule to set. - * @return This builder for chaining. - */ - public Builder setYaraRule( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - yaraRule_ = value; - onChanged(); - return this; - } - /** - *
-         * The name of the YARA rule.
-         * 
- * - * string yara_rule = 5; - * @return This builder for chaining. - */ - public Builder clearYaraRule() { - - yaraRule_ = getDefaultInstance().getYaraRule(); - onChanged(); - return this; - } - /** - *
-         * The name of the YARA rule.
-         * 
- * - * string yara_rule = 5; - * @param value The bytes for yaraRule to set. - * @return This builder for chaining. - */ - public Builder setYaraRuleBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - yaraRule_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) - private static final com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature(); - } - - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public YaraRuleSignature parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new YaraRuleSignature(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int signatureCase_ = 0; - private java.lang.Object signature_; - public enum SignatureCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - MEMORY_HASH_SIGNATURE(6), - YARA_RULE_SIGNATURE(7), - SIGNATURE_NOT_SET(0); - private final int value; - private SignatureCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static SignatureCase valueOf(int value) { - return forNumber(value); - } - - public static SignatureCase forNumber(int value) { - switch (value) { - case 6: return MEMORY_HASH_SIGNATURE; - case 7: return YARA_RULE_SIGNATURE; - case 0: return SIGNATURE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public SignatureCase - getSignatureCase() { - return SignatureCase.forNumber( - signatureCase_); - } - - public static final int MEMORY_HASH_SIGNATURE_FIELD_NUMBER = 6; - /** - *
-     * Signature indicating that a binary family was matched.
-     * 
- * - * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; - * @return Whether the memoryHashSignature field is set. - */ - @java.lang.Override - public boolean hasMemoryHashSignature() { - return signatureCase_ == 6; - } - /** - *
-     * Signature indicating that a binary family was matched.
-     * 
- * - * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; - * @return The memoryHashSignature. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature getMemoryHashSignature() { - if (signatureCase_ == 6) { - return (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) signature_; - } - return com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.getDefaultInstance(); - } - /** - *
-     * Signature indicating that a binary family was matched.
-     * 
- * - * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignatureOrBuilder getMemoryHashSignatureOrBuilder() { - if (signatureCase_ == 6) { - return (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) signature_; - } - return com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.getDefaultInstance(); - } - - public static final int YARA_RULE_SIGNATURE_FIELD_NUMBER = 7; - /** - *
-     * Signature indicating that a YARA rule was matched.
-     * 
- * - * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; - * @return Whether the yaraRuleSignature field is set. - */ - @java.lang.Override - public boolean hasYaraRuleSignature() { - return signatureCase_ == 7; - } - /** - *
-     * Signature indicating that a YARA rule was matched.
-     * 
- * - * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; - * @return The yaraRuleSignature. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature getYaraRuleSignature() { - if (signatureCase_ == 7) { - return (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) signature_; - } - return com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.getDefaultInstance(); - } - /** - *
-     * Signature indicating that a YARA rule was matched.
-     * 
- * - * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignatureOrBuilder getYaraRuleSignatureOrBuilder() { - if (signatureCase_ == 7) { - return (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) signature_; - } - return com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (signatureCase_ == 6) { - output.writeMessage(6, (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) signature_); - } - if (signatureCase_ == 7) { - output.writeMessage(7, (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) signature_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (signatureCase_ == 6) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) signature_); - } - if (signatureCase_ == 7) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) signature_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.Indicator.ProcessSignature)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature other = (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature) obj; - - if (!getSignatureCase().equals(other.getSignatureCase())) return false; - switch (signatureCase_) { - case 6: - if (!getMemoryHashSignature() - .equals(other.getMemoryHashSignature())) return false; - break; - case 7: - if (!getYaraRuleSignature() - .equals(other.getYaraRuleSignature())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (signatureCase_) { - case 6: - hash = (37 * hash) + MEMORY_HASH_SIGNATURE_FIELD_NUMBER; - hash = (53 * hash) + getMemoryHashSignature().hashCode(); - break; - case 7: - hash = (37 * hash) + YARA_RULE_SIGNATURE_FIELD_NUMBER; - hash = (53 * hash) + getYaraRuleSignature().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.Indicator.ProcessSignature prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Indicates what signature matched this process.
-     * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Indicator.ProcessSignature} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Indicator.ProcessSignature) - com.google.cloud.securitycenter.v1.Indicator.ProcessSignatureOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.IndicatorProto.internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.IndicatorProto.internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.class, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - signatureCase_ = 0; - signature_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.IndicatorProto.internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature build() { - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature buildPartial() { - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature result = new com.google.cloud.securitycenter.v1.Indicator.ProcessSignature(this); - if (signatureCase_ == 6) { - if (memoryHashSignatureBuilder_ == null) { - result.signature_ = signature_; - } else { - result.signature_ = memoryHashSignatureBuilder_.build(); - } - } - if (signatureCase_ == 7) { - if (yaraRuleSignatureBuilder_ == null) { - result.signature_ = signature_; - } else { - result.signature_ = yaraRuleSignatureBuilder_.build(); - } - } - result.signatureCase_ = signatureCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.Indicator.ProcessSignature) { - return mergeFrom((com.google.cloud.securitycenter.v1.Indicator.ProcessSignature)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.Indicator.ProcessSignature other) { - if (other == com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.getDefaultInstance()) return this; - switch (other.getSignatureCase()) { - case MEMORY_HASH_SIGNATURE: { - mergeMemoryHashSignature(other.getMemoryHashSignature()); - break; - } - case YARA_RULE_SIGNATURE: { - mergeYaraRuleSignature(other.getYaraRuleSignature()); - break; - } - case SIGNATURE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int signatureCase_ = 0; - private java.lang.Object signature_; - public SignatureCase - getSignatureCase() { - return SignatureCase.forNumber( - signatureCase_); - } - - public Builder clearSignature() { - signatureCase_ = 0; - signature_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Builder, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignatureOrBuilder> memoryHashSignatureBuilder_; - /** - *
-       * Signature indicating that a binary family was matched.
-       * 
- * - * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; - * @return Whether the memoryHashSignature field is set. - */ - @java.lang.Override - public boolean hasMemoryHashSignature() { - return signatureCase_ == 6; - } - /** - *
-       * Signature indicating that a binary family was matched.
-       * 
- * - * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; - * @return The memoryHashSignature. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature getMemoryHashSignature() { - if (memoryHashSignatureBuilder_ == null) { - if (signatureCase_ == 6) { - return (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) signature_; - } - return com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.getDefaultInstance(); - } else { - if (signatureCase_ == 6) { - return memoryHashSignatureBuilder_.getMessage(); - } - return com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.getDefaultInstance(); - } - } - /** - *
-       * Signature indicating that a binary family was matched.
-       * 
- * - * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; - */ - public Builder setMemoryHashSignature(com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature value) { - if (memoryHashSignatureBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - signature_ = value; - onChanged(); - } else { - memoryHashSignatureBuilder_.setMessage(value); - } - signatureCase_ = 6; - return this; - } - /** - *
-       * Signature indicating that a binary family was matched.
-       * 
- * - * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; - */ - public Builder setMemoryHashSignature( - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Builder builderForValue) { - if (memoryHashSignatureBuilder_ == null) { - signature_ = builderForValue.build(); - onChanged(); - } else { - memoryHashSignatureBuilder_.setMessage(builderForValue.build()); - } - signatureCase_ = 6; - return this; - } - /** - *
-       * Signature indicating that a binary family was matched.
-       * 
- * - * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; - */ - public Builder mergeMemoryHashSignature(com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature value) { - if (memoryHashSignatureBuilder_ == null) { - if (signatureCase_ == 6 && - signature_ != com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.getDefaultInstance()) { - signature_ = com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.newBuilder((com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) signature_) - .mergeFrom(value).buildPartial(); - } else { - signature_ = value; - } - onChanged(); - } else { - if (signatureCase_ == 6) { - memoryHashSignatureBuilder_.mergeFrom(value); - } else { - memoryHashSignatureBuilder_.setMessage(value); - } - } - signatureCase_ = 6; - return this; - } - /** - *
-       * Signature indicating that a binary family was matched.
-       * 
- * - * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; - */ - public Builder clearMemoryHashSignature() { - if (memoryHashSignatureBuilder_ == null) { - if (signatureCase_ == 6) { - signatureCase_ = 0; - signature_ = null; - onChanged(); - } - } else { - if (signatureCase_ == 6) { - signatureCase_ = 0; - signature_ = null; - } - memoryHashSignatureBuilder_.clear(); - } - return this; - } - /** - *
-       * Signature indicating that a binary family was matched.
-       * 
- * - * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; - */ - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Builder getMemoryHashSignatureBuilder() { - return getMemoryHashSignatureFieldBuilder().getBuilder(); - } - /** - *
-       * Signature indicating that a binary family was matched.
-       * 
- * - * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignatureOrBuilder getMemoryHashSignatureOrBuilder() { - if ((signatureCase_ == 6) && (memoryHashSignatureBuilder_ != null)) { - return memoryHashSignatureBuilder_.getMessageOrBuilder(); - } else { - if (signatureCase_ == 6) { - return (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) signature_; - } - return com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.getDefaultInstance(); - } - } - /** - *
-       * Signature indicating that a binary family was matched.
-       * 
- * - * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Builder, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignatureOrBuilder> - getMemoryHashSignatureFieldBuilder() { - if (memoryHashSignatureBuilder_ == null) { - if (!(signatureCase_ == 6)) { - signature_ = com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.getDefaultInstance(); - } - memoryHashSignatureBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Builder, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignatureOrBuilder>( - (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) signature_, - getParentForChildren(), - isClean()); - signature_ = null; - } - signatureCase_ = 6; - onChanged();; - return memoryHashSignatureBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.Builder, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignatureOrBuilder> yaraRuleSignatureBuilder_; - /** - *
-       * Signature indicating that a YARA rule was matched.
-       * 
- * - * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; - * @return Whether the yaraRuleSignature field is set. - */ - @java.lang.Override - public boolean hasYaraRuleSignature() { - return signatureCase_ == 7; - } - /** - *
-       * Signature indicating that a YARA rule was matched.
-       * 
- * - * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; - * @return The yaraRuleSignature. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature getYaraRuleSignature() { - if (yaraRuleSignatureBuilder_ == null) { - if (signatureCase_ == 7) { - return (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) signature_; - } - return com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.getDefaultInstance(); - } else { - if (signatureCase_ == 7) { - return yaraRuleSignatureBuilder_.getMessage(); - } - return com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.getDefaultInstance(); - } - } - /** - *
-       * Signature indicating that a YARA rule was matched.
-       * 
- * - * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; - */ - public Builder setYaraRuleSignature(com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature value) { - if (yaraRuleSignatureBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - signature_ = value; - onChanged(); - } else { - yaraRuleSignatureBuilder_.setMessage(value); - } - signatureCase_ = 7; - return this; - } - /** - *
-       * Signature indicating that a YARA rule was matched.
-       * 
- * - * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; - */ - public Builder setYaraRuleSignature( - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.Builder builderForValue) { - if (yaraRuleSignatureBuilder_ == null) { - signature_ = builderForValue.build(); - onChanged(); - } else { - yaraRuleSignatureBuilder_.setMessage(builderForValue.build()); - } - signatureCase_ = 7; - return this; - } - /** - *
-       * Signature indicating that a YARA rule was matched.
-       * 
- * - * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; - */ - public Builder mergeYaraRuleSignature(com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature value) { - if (yaraRuleSignatureBuilder_ == null) { - if (signatureCase_ == 7 && - signature_ != com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.getDefaultInstance()) { - signature_ = com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.newBuilder((com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) signature_) - .mergeFrom(value).buildPartial(); - } else { - signature_ = value; - } - onChanged(); - } else { - if (signatureCase_ == 7) { - yaraRuleSignatureBuilder_.mergeFrom(value); - } else { - yaraRuleSignatureBuilder_.setMessage(value); - } - } - signatureCase_ = 7; - return this; - } - /** - *
-       * Signature indicating that a YARA rule was matched.
-       * 
- * - * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; - */ - public Builder clearYaraRuleSignature() { - if (yaraRuleSignatureBuilder_ == null) { - if (signatureCase_ == 7) { - signatureCase_ = 0; - signature_ = null; - onChanged(); - } - } else { - if (signatureCase_ == 7) { - signatureCase_ = 0; - signature_ = null; - } - yaraRuleSignatureBuilder_.clear(); - } - return this; - } - /** - *
-       * Signature indicating that a YARA rule was matched.
-       * 
- * - * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; - */ - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.Builder getYaraRuleSignatureBuilder() { - return getYaraRuleSignatureFieldBuilder().getBuilder(); - } - /** - *
-       * Signature indicating that a YARA rule was matched.
-       * 
- * - * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignatureOrBuilder getYaraRuleSignatureOrBuilder() { - if ((signatureCase_ == 7) && (yaraRuleSignatureBuilder_ != null)) { - return yaraRuleSignatureBuilder_.getMessageOrBuilder(); - } else { - if (signatureCase_ == 7) { - return (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) signature_; - } - return com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.getDefaultInstance(); - } - } - /** - *
-       * Signature indicating that a YARA rule was matched.
-       * 
- * - * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.Builder, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignatureOrBuilder> - getYaraRuleSignatureFieldBuilder() { - if (yaraRuleSignatureBuilder_ == null) { - if (!(signatureCase_ == 7)) { - signature_ = com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.getDefaultInstance(); - } - yaraRuleSignatureBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.Builder, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignatureOrBuilder>( - (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) signature_, - getParentForChildren(), - isClean()); - signature_ = null; - } - signatureCase_ = 7; - onChanged();; - return yaraRuleSignatureBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Indicator.ProcessSignature) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Indicator.ProcessSignature) - private static final com.google.cloud.securitycenter.v1.Indicator.ProcessSignature DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Indicator.ProcessSignature(); - } - - public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ProcessSignature parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ProcessSignature(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int IP_ADDRESSES_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList ipAddresses_; - /** - *
-   * List of ip addresses associated to the Finding.
-   * 
- * - * repeated string ip_addresses = 1; - * @return A list containing the ipAddresses. - */ - public com.google.protobuf.ProtocolStringList - getIpAddressesList() { - return ipAddresses_; - } - /** - *
-   * List of ip addresses associated to the Finding.
-   * 
- * - * repeated string ip_addresses = 1; - * @return The count of ipAddresses. - */ - public int getIpAddressesCount() { - return ipAddresses_.size(); - } - /** - *
-   * List of ip addresses associated to the Finding.
-   * 
- * - * repeated string ip_addresses = 1; - * @param index The index of the element to return. - * @return The ipAddresses at the given index. - */ - public java.lang.String getIpAddresses(int index) { - return ipAddresses_.get(index); - } - /** - *
-   * List of ip addresses associated to the Finding.
-   * 
- * - * repeated string ip_addresses = 1; - * @param index The index of the value to return. - * @return The bytes of the ipAddresses at the given index. - */ - public com.google.protobuf.ByteString - getIpAddressesBytes(int index) { - return ipAddresses_.getByteString(index); - } - - public static final int DOMAINS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList domains_; - /** - *
-   * List of domains associated to the Finding.
-   * 
- * - * repeated string domains = 2; - * @return A list containing the domains. - */ - public com.google.protobuf.ProtocolStringList - getDomainsList() { - return domains_; - } - /** - *
-   * List of domains associated to the Finding.
-   * 
- * - * repeated string domains = 2; - * @return The count of domains. - */ - public int getDomainsCount() { - return domains_.size(); - } - /** - *
-   * List of domains associated to the Finding.
-   * 
- * - * repeated string domains = 2; - * @param index The index of the element to return. - * @return The domains at the given index. - */ - public java.lang.String getDomains(int index) { - return domains_.get(index); - } - /** - *
-   * List of domains associated to the Finding.
-   * 
- * - * repeated string domains = 2; - * @param index The index of the value to return. - * @return The bytes of the domains at the given index. - */ - public com.google.protobuf.ByteString - getDomainsBytes(int index) { - return domains_.getByteString(index); - } - - public static final int SIGNATURES_FIELD_NUMBER = 3; - private java.util.List signatures_; - /** - *
-   * The list of matched signatures indicating that the given
-   * process is present in the environment.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; - */ - @java.lang.Override - public java.util.List getSignaturesList() { - return signatures_; - } - /** - *
-   * The list of matched signatures indicating that the given
-   * process is present in the environment.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; - */ - @java.lang.Override - public java.util.List - getSignaturesOrBuilderList() { - return signatures_; - } - /** - *
-   * The list of matched signatures indicating that the given
-   * process is present in the environment.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; - */ - @java.lang.Override - public int getSignaturesCount() { - return signatures_.size(); - } - /** - *
-   * The list of matched signatures indicating that the given
-   * process is present in the environment.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature getSignatures(int index) { - return signatures_.get(index); - } - /** - *
-   * The list of matched signatures indicating that the given
-   * process is present in the environment.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignatureOrBuilder getSignaturesOrBuilder( - int index) { - return signatures_.get(index); - } - - public static final int URIS_FIELD_NUMBER = 4; - private com.google.protobuf.LazyStringList uris_; - /** - *
-   * The list of URIs associated to the Findings.
-   * 
- * - * repeated string uris = 4; - * @return A list containing the uris. - */ - public com.google.protobuf.ProtocolStringList - getUrisList() { - return uris_; - } - /** - *
-   * The list of URIs associated to the Findings.
-   * 
- * - * repeated string uris = 4; - * @return The count of uris. - */ - public int getUrisCount() { - return uris_.size(); - } - /** - *
-   * The list of URIs associated to the Findings.
-   * 
- * - * repeated string uris = 4; - * @param index The index of the element to return. - * @return The uris at the given index. - */ - public java.lang.String getUris(int index) { - return uris_.get(index); - } - /** - *
-   * The list of URIs associated to the Findings.
-   * 
- * - * repeated string uris = 4; - * @param index The index of the value to return. - * @return The bytes of the uris at the given index. - */ - public com.google.protobuf.ByteString - getUrisBytes(int index) { - return uris_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < ipAddresses_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ipAddresses_.getRaw(i)); - } - for (int i = 0; i < domains_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, domains_.getRaw(i)); - } - for (int i = 0; i < signatures_.size(); i++) { - output.writeMessage(3, signatures_.get(i)); - } - for (int i = 0; i < uris_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, uris_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < ipAddresses_.size(); i++) { - dataSize += computeStringSizeNoTag(ipAddresses_.getRaw(i)); - } - size += dataSize; - size += 1 * getIpAddressesList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < domains_.size(); i++) { - dataSize += computeStringSizeNoTag(domains_.getRaw(i)); - } - size += dataSize; - size += 1 * getDomainsList().size(); - } - for (int i = 0; i < signatures_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, signatures_.get(i)); - } - { - int dataSize = 0; - for (int i = 0; i < uris_.size(); i++) { - dataSize += computeStringSizeNoTag(uris_.getRaw(i)); - } - size += dataSize; - size += 1 * getUrisList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.Indicator)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.Indicator other = (com.google.cloud.securitycenter.v1.Indicator) obj; - - if (!getIpAddressesList() - .equals(other.getIpAddressesList())) return false; - if (!getDomainsList() - .equals(other.getDomainsList())) return false; - if (!getSignaturesList() - .equals(other.getSignaturesList())) return false; - if (!getUrisList() - .equals(other.getUrisList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getIpAddressesCount() > 0) { - hash = (37 * hash) + IP_ADDRESSES_FIELD_NUMBER; - hash = (53 * hash) + getIpAddressesList().hashCode(); - } - if (getDomainsCount() > 0) { - hash = (37 * hash) + DOMAINS_FIELD_NUMBER; - hash = (53 * hash) + getDomainsList().hashCode(); - } - if (getSignaturesCount() > 0) { - hash = (37 * hash) + SIGNATURES_FIELD_NUMBER; - hash = (53 * hash) + getSignaturesList().hashCode(); - } - if (getUrisCount() > 0) { - hash = (37 * hash) + URIS_FIELD_NUMBER; - hash = (53 * hash) + getUrisList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.Indicator parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Indicator parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Indicator parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Indicator parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Indicator parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Indicator parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Indicator parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Indicator parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Indicator parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Indicator parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Indicator parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Indicator parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.Indicator prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Represents what's commonly known as an Indicator of compromise (IoC) in
-   * computer forensics. This is an artifact observed on a network or in an
-   * operating system that, with high confidence, indicates a computer intrusion.
-   * Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Indicator} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Indicator) - com.google.cloud.securitycenter.v1.IndicatorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.IndicatorProto.internal_static_google_cloud_securitycenter_v1_Indicator_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.IndicatorProto.internal_static_google_cloud_securitycenter_v1_Indicator_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Indicator.class, com.google.cloud.securitycenter.v1.Indicator.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.Indicator.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSignaturesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - ipAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - domains_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - if (signaturesBuilder_ == null) { - signatures_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - signaturesBuilder_.clear(); - } - uris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.IndicatorProto.internal_static_google_cloud_securitycenter_v1_Indicator_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.Indicator.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator build() { - com.google.cloud.securitycenter.v1.Indicator result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator buildPartial() { - com.google.cloud.securitycenter.v1.Indicator result = new com.google.cloud.securitycenter.v1.Indicator(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - ipAddresses_ = ipAddresses_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.ipAddresses_ = ipAddresses_; - if (((bitField0_ & 0x00000002) != 0)) { - domains_ = domains_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.domains_ = domains_; - if (signaturesBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - signatures_ = java.util.Collections.unmodifiableList(signatures_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.signatures_ = signatures_; - } else { - result.signatures_ = signaturesBuilder_.build(); - } - if (((bitField0_ & 0x00000008) != 0)) { - uris_ = uris_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.uris_ = uris_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.Indicator) { - return mergeFrom((com.google.cloud.securitycenter.v1.Indicator)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.Indicator other) { - if (other == com.google.cloud.securitycenter.v1.Indicator.getDefaultInstance()) return this; - if (!other.ipAddresses_.isEmpty()) { - if (ipAddresses_.isEmpty()) { - ipAddresses_ = other.ipAddresses_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureIpAddressesIsMutable(); - ipAddresses_.addAll(other.ipAddresses_); - } - onChanged(); - } - if (!other.domains_.isEmpty()) { - if (domains_.isEmpty()) { - domains_ = other.domains_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureDomainsIsMutable(); - domains_.addAll(other.domains_); - } - onChanged(); - } - if (signaturesBuilder_ == null) { - if (!other.signatures_.isEmpty()) { - if (signatures_.isEmpty()) { - signatures_ = other.signatures_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureSignaturesIsMutable(); - signatures_.addAll(other.signatures_); - } - onChanged(); - } - } else { - if (!other.signatures_.isEmpty()) { - if (signaturesBuilder_.isEmpty()) { - signaturesBuilder_.dispose(); - signaturesBuilder_ = null; - signatures_ = other.signatures_; - bitField0_ = (bitField0_ & ~0x00000004); - signaturesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSignaturesFieldBuilder() : null; - } else { - signaturesBuilder_.addAllMessages(other.signatures_); - } - } - } - if (!other.uris_.isEmpty()) { - if (uris_.isEmpty()) { - uris_ = other.uris_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureUrisIsMutable(); - uris_.addAll(other.uris_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.Indicator parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.Indicator) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.LazyStringList ipAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureIpAddressesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - ipAddresses_ = new com.google.protobuf.LazyStringArrayList(ipAddresses_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * List of ip addresses associated to the Finding.
-     * 
- * - * repeated string ip_addresses = 1; - * @return A list containing the ipAddresses. - */ - public com.google.protobuf.ProtocolStringList - getIpAddressesList() { - return ipAddresses_.getUnmodifiableView(); - } - /** - *
-     * List of ip addresses associated to the Finding.
-     * 
- * - * repeated string ip_addresses = 1; - * @return The count of ipAddresses. - */ - public int getIpAddressesCount() { - return ipAddresses_.size(); - } - /** - *
-     * List of ip addresses associated to the Finding.
-     * 
- * - * repeated string ip_addresses = 1; - * @param index The index of the element to return. - * @return The ipAddresses at the given index. - */ - public java.lang.String getIpAddresses(int index) { - return ipAddresses_.get(index); - } - /** - *
-     * List of ip addresses associated to the Finding.
-     * 
- * - * repeated string ip_addresses = 1; - * @param index The index of the value to return. - * @return The bytes of the ipAddresses at the given index. - */ - public com.google.protobuf.ByteString - getIpAddressesBytes(int index) { - return ipAddresses_.getByteString(index); - } - /** - *
-     * List of ip addresses associated to the Finding.
-     * 
- * - * repeated string ip_addresses = 1; - * @param index The index to set the value at. - * @param value The ipAddresses to set. - * @return This builder for chaining. - */ - public Builder setIpAddresses( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureIpAddressesIsMutable(); - ipAddresses_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * List of ip addresses associated to the Finding.
-     * 
- * - * repeated string ip_addresses = 1; - * @param value The ipAddresses to add. - * @return This builder for chaining. - */ - public Builder addIpAddresses( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureIpAddressesIsMutable(); - ipAddresses_.add(value); - onChanged(); - return this; - } - /** - *
-     * List of ip addresses associated to the Finding.
-     * 
- * - * repeated string ip_addresses = 1; - * @param values The ipAddresses to add. - * @return This builder for chaining. - */ - public Builder addAllIpAddresses( - java.lang.Iterable values) { - ensureIpAddressesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, ipAddresses_); - onChanged(); - return this; - } - /** - *
-     * List of ip addresses associated to the Finding.
-     * 
- * - * repeated string ip_addresses = 1; - * @return This builder for chaining. - */ - public Builder clearIpAddresses() { - ipAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * List of ip addresses associated to the Finding.
-     * 
- * - * repeated string ip_addresses = 1; - * @param value The bytes of the ipAddresses to add. - * @return This builder for chaining. - */ - public Builder addIpAddressesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureIpAddressesIsMutable(); - ipAddresses_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList domains_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureDomainsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - domains_ = new com.google.protobuf.LazyStringArrayList(domains_); - bitField0_ |= 0x00000002; - } - } - /** - *
-     * List of domains associated to the Finding.
-     * 
- * - * repeated string domains = 2; - * @return A list containing the domains. - */ - public com.google.protobuf.ProtocolStringList - getDomainsList() { - return domains_.getUnmodifiableView(); - } - /** - *
-     * List of domains associated to the Finding.
-     * 
- * - * repeated string domains = 2; - * @return The count of domains. - */ - public int getDomainsCount() { - return domains_.size(); - } - /** - *
-     * List of domains associated to the Finding.
-     * 
- * - * repeated string domains = 2; - * @param index The index of the element to return. - * @return The domains at the given index. - */ - public java.lang.String getDomains(int index) { - return domains_.get(index); - } - /** - *
-     * List of domains associated to the Finding.
-     * 
- * - * repeated string domains = 2; - * @param index The index of the value to return. - * @return The bytes of the domains at the given index. - */ - public com.google.protobuf.ByteString - getDomainsBytes(int index) { - return domains_.getByteString(index); - } - /** - *
-     * List of domains associated to the Finding.
-     * 
- * - * repeated string domains = 2; - * @param index The index to set the value at. - * @param value The domains to set. - * @return This builder for chaining. - */ - public Builder setDomains( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDomainsIsMutable(); - domains_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * List of domains associated to the Finding.
-     * 
- * - * repeated string domains = 2; - * @param value The domains to add. - * @return This builder for chaining. - */ - public Builder addDomains( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDomainsIsMutable(); - domains_.add(value); - onChanged(); - return this; - } - /** - *
-     * List of domains associated to the Finding.
-     * 
- * - * repeated string domains = 2; - * @param values The domains to add. - * @return This builder for chaining. - */ - public Builder addAllDomains( - java.lang.Iterable values) { - ensureDomainsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, domains_); - onChanged(); - return this; - } - /** - *
-     * List of domains associated to the Finding.
-     * 
- * - * repeated string domains = 2; - * @return This builder for chaining. - */ - public Builder clearDomains() { - domains_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * List of domains associated to the Finding.
-     * 
- * - * repeated string domains = 2; - * @param value The bytes of the domains to add. - * @return This builder for chaining. - */ - public Builder addDomainsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureDomainsIsMutable(); - domains_.add(value); - onChanged(); - return this; - } - - private java.util.List signatures_ = - java.util.Collections.emptyList(); - private void ensureSignaturesIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - signatures_ = new java.util.ArrayList(signatures_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.Builder, com.google.cloud.securitycenter.v1.Indicator.ProcessSignatureOrBuilder> signaturesBuilder_; - - /** - *
-     * The list of matched signatures indicating that the given
-     * process is present in the environment.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; - */ - public java.util.List getSignaturesList() { - if (signaturesBuilder_ == null) { - return java.util.Collections.unmodifiableList(signatures_); - } else { - return signaturesBuilder_.getMessageList(); - } - } - /** - *
-     * The list of matched signatures indicating that the given
-     * process is present in the environment.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; - */ - public int getSignaturesCount() { - if (signaturesBuilder_ == null) { - return signatures_.size(); - } else { - return signaturesBuilder_.getCount(); - } - } - /** - *
-     * The list of matched signatures indicating that the given
-     * process is present in the environment.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; - */ - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature getSignatures(int index) { - if (signaturesBuilder_ == null) { - return signatures_.get(index); - } else { - return signaturesBuilder_.getMessage(index); - } - } - /** - *
-     * The list of matched signatures indicating that the given
-     * process is present in the environment.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; - */ - public Builder setSignatures( - int index, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature value) { - if (signaturesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSignaturesIsMutable(); - signatures_.set(index, value); - onChanged(); - } else { - signaturesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The list of matched signatures indicating that the given
-     * process is present in the environment.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; - */ - public Builder setSignatures( - int index, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.Builder builderForValue) { - if (signaturesBuilder_ == null) { - ensureSignaturesIsMutable(); - signatures_.set(index, builderForValue.build()); - onChanged(); - } else { - signaturesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of matched signatures indicating that the given
-     * process is present in the environment.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; - */ - public Builder addSignatures(com.google.cloud.securitycenter.v1.Indicator.ProcessSignature value) { - if (signaturesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSignaturesIsMutable(); - signatures_.add(value); - onChanged(); - } else { - signaturesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The list of matched signatures indicating that the given
-     * process is present in the environment.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; - */ - public Builder addSignatures( - int index, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature value) { - if (signaturesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSignaturesIsMutable(); - signatures_.add(index, value); - onChanged(); - } else { - signaturesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The list of matched signatures indicating that the given
-     * process is present in the environment.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; - */ - public Builder addSignatures( - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.Builder builderForValue) { - if (signaturesBuilder_ == null) { - ensureSignaturesIsMutable(); - signatures_.add(builderForValue.build()); - onChanged(); - } else { - signaturesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The list of matched signatures indicating that the given
-     * process is present in the environment.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; - */ - public Builder addSignatures( - int index, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.Builder builderForValue) { - if (signaturesBuilder_ == null) { - ensureSignaturesIsMutable(); - signatures_.add(index, builderForValue.build()); - onChanged(); - } else { - signaturesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of matched signatures indicating that the given
-     * process is present in the environment.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; - */ - public Builder addAllSignatures( - java.lang.Iterable values) { - if (signaturesBuilder_ == null) { - ensureSignaturesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, signatures_); - onChanged(); - } else { - signaturesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The list of matched signatures indicating that the given
-     * process is present in the environment.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; - */ - public Builder clearSignatures() { - if (signaturesBuilder_ == null) { - signatures_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - signaturesBuilder_.clear(); - } - return this; - } - /** - *
-     * The list of matched signatures indicating that the given
-     * process is present in the environment.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; - */ - public Builder removeSignatures(int index) { - if (signaturesBuilder_ == null) { - ensureSignaturesIsMutable(); - signatures_.remove(index); - onChanged(); - } else { - signaturesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The list of matched signatures indicating that the given
-     * process is present in the environment.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; - */ - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.Builder getSignaturesBuilder( - int index) { - return getSignaturesFieldBuilder().getBuilder(index); - } - /** - *
-     * The list of matched signatures indicating that the given
-     * process is present in the environment.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; - */ - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignatureOrBuilder getSignaturesOrBuilder( - int index) { - if (signaturesBuilder_ == null) { - return signatures_.get(index); } else { - return signaturesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The list of matched signatures indicating that the given
-     * process is present in the environment.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; - */ - public java.util.List - getSignaturesOrBuilderList() { - if (signaturesBuilder_ != null) { - return signaturesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(signatures_); - } - } - /** - *
-     * The list of matched signatures indicating that the given
-     * process is present in the environment.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; - */ - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.Builder addSignaturesBuilder() { - return getSignaturesFieldBuilder().addBuilder( - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.getDefaultInstance()); - } - /** - *
-     * The list of matched signatures indicating that the given
-     * process is present in the environment.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; - */ - public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.Builder addSignaturesBuilder( - int index) { - return getSignaturesFieldBuilder().addBuilder( - index, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.getDefaultInstance()); - } - /** - *
-     * The list of matched signatures indicating that the given
-     * process is present in the environment.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; - */ - public java.util.List - getSignaturesBuilderList() { - return getSignaturesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.Builder, com.google.cloud.securitycenter.v1.Indicator.ProcessSignatureOrBuilder> - getSignaturesFieldBuilder() { - if (signaturesBuilder_ == null) { - signaturesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.Builder, com.google.cloud.securitycenter.v1.Indicator.ProcessSignatureOrBuilder>( - signatures_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - signatures_ = null; - } - return signaturesBuilder_; - } - - private com.google.protobuf.LazyStringList uris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureUrisIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - uris_ = new com.google.protobuf.LazyStringArrayList(uris_); - bitField0_ |= 0x00000008; - } - } - /** - *
-     * The list of URIs associated to the Findings.
-     * 
- * - * repeated string uris = 4; - * @return A list containing the uris. - */ - public com.google.protobuf.ProtocolStringList - getUrisList() { - return uris_.getUnmodifiableView(); - } - /** - *
-     * The list of URIs associated to the Findings.
-     * 
- * - * repeated string uris = 4; - * @return The count of uris. - */ - public int getUrisCount() { - return uris_.size(); - } - /** - *
-     * The list of URIs associated to the Findings.
-     * 
- * - * repeated string uris = 4; - * @param index The index of the element to return. - * @return The uris at the given index. - */ - public java.lang.String getUris(int index) { - return uris_.get(index); - } - /** - *
-     * The list of URIs associated to the Findings.
-     * 
- * - * repeated string uris = 4; - * @param index The index of the value to return. - * @return The bytes of the uris at the given index. - */ - public com.google.protobuf.ByteString - getUrisBytes(int index) { - return uris_.getByteString(index); - } - /** - *
-     * The list of URIs associated to the Findings.
-     * 
- * - * repeated string uris = 4; - * @param index The index to set the value at. - * @param value The uris to set. - * @return This builder for chaining. - */ - public Builder setUris( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUrisIsMutable(); - uris_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * The list of URIs associated to the Findings.
-     * 
- * - * repeated string uris = 4; - * @param value The uris to add. - * @return This builder for chaining. - */ - public Builder addUris( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUrisIsMutable(); - uris_.add(value); - onChanged(); - return this; - } - /** - *
-     * The list of URIs associated to the Findings.
-     * 
- * - * repeated string uris = 4; - * @param values The uris to add. - * @return This builder for chaining. - */ - public Builder addAllUris( - java.lang.Iterable values) { - ensureUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, uris_); - onChanged(); - return this; - } - /** - *
-     * The list of URIs associated to the Findings.
-     * 
- * - * repeated string uris = 4; - * @return This builder for chaining. - */ - public Builder clearUris() { - uris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-     * The list of URIs associated to the Findings.
-     * 
- * - * repeated string uris = 4; - * @param value The bytes of the uris to add. - * @return This builder for chaining. - */ - public Builder addUrisBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureUrisIsMutable(); - uris_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Indicator) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Indicator) - private static final com.google.cloud.securitycenter.v1.Indicator DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Indicator(); - } - - public static com.google.cloud.securitycenter.v1.Indicator getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Indicator parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Indicator(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Indicator getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/IndicatorOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/IndicatorOrBuilder.java deleted file mode 100644 index ce60352257fc..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/IndicatorOrBuilder.java +++ /dev/null @@ -1,181 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/indicator.proto - -package com.google.cloud.securitycenter.v1; - -public interface IndicatorOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Indicator) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * List of ip addresses associated to the Finding.
-   * 
- * - * repeated string ip_addresses = 1; - * @return A list containing the ipAddresses. - */ - java.util.List - getIpAddressesList(); - /** - *
-   * List of ip addresses associated to the Finding.
-   * 
- * - * repeated string ip_addresses = 1; - * @return The count of ipAddresses. - */ - int getIpAddressesCount(); - /** - *
-   * List of ip addresses associated to the Finding.
-   * 
- * - * repeated string ip_addresses = 1; - * @param index The index of the element to return. - * @return The ipAddresses at the given index. - */ - java.lang.String getIpAddresses(int index); - /** - *
-   * List of ip addresses associated to the Finding.
-   * 
- * - * repeated string ip_addresses = 1; - * @param index The index of the value to return. - * @return The bytes of the ipAddresses at the given index. - */ - com.google.protobuf.ByteString - getIpAddressesBytes(int index); - - /** - *
-   * List of domains associated to the Finding.
-   * 
- * - * repeated string domains = 2; - * @return A list containing the domains. - */ - java.util.List - getDomainsList(); - /** - *
-   * List of domains associated to the Finding.
-   * 
- * - * repeated string domains = 2; - * @return The count of domains. - */ - int getDomainsCount(); - /** - *
-   * List of domains associated to the Finding.
-   * 
- * - * repeated string domains = 2; - * @param index The index of the element to return. - * @return The domains at the given index. - */ - java.lang.String getDomains(int index); - /** - *
-   * List of domains associated to the Finding.
-   * 
- * - * repeated string domains = 2; - * @param index The index of the value to return. - * @return The bytes of the domains at the given index. - */ - com.google.protobuf.ByteString - getDomainsBytes(int index); - - /** - *
-   * The list of matched signatures indicating that the given
-   * process is present in the environment.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; - */ - java.util.List - getSignaturesList(); - /** - *
-   * The list of matched signatures indicating that the given
-   * process is present in the environment.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; - */ - com.google.cloud.securitycenter.v1.Indicator.ProcessSignature getSignatures(int index); - /** - *
-   * The list of matched signatures indicating that the given
-   * process is present in the environment.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; - */ - int getSignaturesCount(); - /** - *
-   * The list of matched signatures indicating that the given
-   * process is present in the environment.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; - */ - java.util.List - getSignaturesOrBuilderList(); - /** - *
-   * The list of matched signatures indicating that the given
-   * process is present in the environment.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; - */ - com.google.cloud.securitycenter.v1.Indicator.ProcessSignatureOrBuilder getSignaturesOrBuilder( - int index); - - /** - *
-   * The list of URIs associated to the Findings.
-   * 
- * - * repeated string uris = 4; - * @return A list containing the uris. - */ - java.util.List - getUrisList(); - /** - *
-   * The list of URIs associated to the Findings.
-   * 
- * - * repeated string uris = 4; - * @return The count of uris. - */ - int getUrisCount(); - /** - *
-   * The list of URIs associated to the Findings.
-   * 
- * - * repeated string uris = 4; - * @param index The index of the element to return. - * @return The uris at the given index. - */ - java.lang.String getUris(int index); - /** - *
-   * The list of URIs associated to the Findings.
-   * 
- * - * repeated string uris = 4; - * @param index The index of the value to return. - * @return The bytes of the uris at the given index. - */ - com.google.protobuf.ByteString - getUrisBytes(int index); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/IndicatorProto.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/IndicatorProto.java deleted file mode 100644 index d721840403de..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/IndicatorProto.java +++ /dev/null @@ -1,114 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/indicator.proto - -package com.google.cloud.securitycenter.v1; - -public final class IndicatorProto { - private IndicatorProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_Indicator_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_Indicator_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_Detection_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_Detection_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_YaraRuleSignature_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_YaraRuleSignature_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n.google/cloud/securitycenter/v1/indicat" + - "or.proto\022\036google.cloud.securitycenter.v1" + - "\"\221\005\n\tIndicator\022\024\n\014ip_addresses\030\001 \003(\t\022\017\n\007" + - "domains\030\002 \003(\t\022N\n\nsignatures\030\003 \003(\0132:.goog" + - "le.cloud.securitycenter.v1.Indicator.Pro" + - "cessSignature\022\014\n\004uris\030\004 \003(\t\032\376\003\n\020ProcessS" + - "ignature\022o\n\025memory_hash_signature\030\006 \001(\0132" + - "N.google.cloud.securitycenter.v1.Indicat" + - "or.ProcessSignature.MemoryHashSignatureH" + - "\000\022k\n\023yara_rule_signature\030\007 \001(\0132L.google." + - "cloud.securitycenter.v1.Indicator.Proces" + - "sSignature.YaraRuleSignatureH\000\032\326\001\n\023Memor" + - "yHashSignature\022\025\n\rbinary_family\030\001 \001(\t\022l\n" + - "\ndetections\030\004 \003(\0132X.google.cloud.securit" + - "ycenter.v1.Indicator.ProcessSignature.Me" + - "moryHashSignature.Detection\032:\n\tDetection" + - "\022\016\n\006binary\030\002 \001(\t\022\035\n\025percent_pages_matche" + - "d\030\003 \001(\001\032&\n\021YaraRuleSignature\022\021\n\tyara_rul" + - "e\030\005 \001(\tB\013\n\tsignatureB\352\001\n\"com.google.clou" + - "d.securitycenter.v1B\016IndicatorProtoP\001ZLg" + - "oogle.golang.org/genproto/googleapis/clo" + - "ud/securitycenter/v1;securitycenter\252\002\036Go" + - "ogle.Cloud.SecurityCenter.V1\312\002\036Google\\Cl" + - "oud\\SecurityCenter\\V1\352\002!Google::Cloud::S" + - "ecurityCenter::V1b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_google_cloud_securitycenter_v1_Indicator_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_securitycenter_v1_Indicator_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_Indicator_descriptor, - new java.lang.String[] { "IpAddresses", "Domains", "Signatures", "Uris", }); - internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_descriptor = - internal_static_google_cloud_securitycenter_v1_Indicator_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_descriptor, - new java.lang.String[] { "MemoryHashSignature", "YaraRuleSignature", "Signature", }); - internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_descriptor = - internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_descriptor, - new java.lang.String[] { "BinaryFamily", "Detections", }); - internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_Detection_descriptor = - internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_Detection_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_Detection_descriptor, - new java.lang.String[] { "Binary", "PercentPagesMatched", }); - internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_YaraRuleSignature_descriptor = - internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_descriptor.getNestedTypes().get(1); - internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_YaraRuleSignature_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_YaraRuleSignature_descriptor, - new java.lang.String[] { "YaraRule", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Kubernetes.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Kubernetes.java deleted file mode 100644 index d3f2321855e4..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Kubernetes.java +++ /dev/null @@ -1,12240 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/kubernetes.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Kubernetes related attributes.
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Kubernetes} - */ -public final class Kubernetes extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Kubernetes) - KubernetesOrBuilder { -private static final long serialVersionUID = 0L; - // Use Kubernetes.newBuilder() to construct. - private Kubernetes(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Kubernetes() { - pods_ = java.util.Collections.emptyList(); - nodes_ = java.util.Collections.emptyList(); - nodePools_ = java.util.Collections.emptyList(); - roles_ = java.util.Collections.emptyList(); - bindings_ = java.util.Collections.emptyList(); - accessReviews_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Kubernetes(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Kubernetes( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - pods_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - pods_.add( - input.readMessage(com.google.cloud.securitycenter.v1.Kubernetes.Pod.parser(), extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - nodes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - nodes_.add( - input.readMessage(com.google.cloud.securitycenter.v1.Kubernetes.Node.parser(), extensionRegistry)); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - nodePools_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - nodePools_.add( - input.readMessage(com.google.cloud.securitycenter.v1.Kubernetes.NodePool.parser(), extensionRegistry)); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - roles_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - roles_.add( - input.readMessage(com.google.cloud.securitycenter.v1.Kubernetes.Role.parser(), extensionRegistry)); - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - bindings_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - bindings_.add( - input.readMessage(com.google.cloud.securitycenter.v1.Kubernetes.Binding.parser(), extensionRegistry)); - break; - } - case 50: { - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - accessReviews_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - accessReviews_.add( - input.readMessage(com.google.cloud.securitycenter.v1.Kubernetes.AccessReview.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - pods_ = java.util.Collections.unmodifiableList(pods_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - nodes_ = java.util.Collections.unmodifiableList(nodes_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - nodePools_ = java.util.Collections.unmodifiableList(nodePools_); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - roles_ = java.util.Collections.unmodifiableList(roles_); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - bindings_ = java.util.Collections.unmodifiableList(bindings_); - } - if (((mutable_bitField0_ & 0x00000020) != 0)) { - accessReviews_ = java.util.Collections.unmodifiableList(accessReviews_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Kubernetes.class, com.google.cloud.securitycenter.v1.Kubernetes.Builder.class); - } - - public interface PodOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Kubernetes.Pod) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Kubernetes Pod namespace.
-     * 
- * - * string ns = 1; - * @return The ns. - */ - java.lang.String getNs(); - /** - *
-     * Kubernetes Pod namespace.
-     * 
- * - * string ns = 1; - * @return The bytes for ns. - */ - com.google.protobuf.ByteString - getNsBytes(); - - /** - *
-     * Kubernetes Pod name.
-     * 
- * - * string name = 2; - * @return The name. - */ - java.lang.String getName(); - /** - *
-     * Kubernetes Pod name.
-     * 
- * - * string name = 2; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-     * Pod labels.  For Kubernetes containers, these are applied to the
-     * container.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 3; - */ - java.util.List - getLabelsList(); - /** - *
-     * Pod labels.  For Kubernetes containers, these are applied to the
-     * container.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 3; - */ - com.google.cloud.securitycenter.v1.Label getLabels(int index); - /** - *
-     * Pod labels.  For Kubernetes containers, these are applied to the
-     * container.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 3; - */ - int getLabelsCount(); - /** - *
-     * Pod labels.  For Kubernetes containers, these are applied to the
-     * container.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 3; - */ - java.util.List - getLabelsOrBuilderList(); - /** - *
-     * Pod labels.  For Kubernetes containers, these are applied to the
-     * container.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 3; - */ - com.google.cloud.securitycenter.v1.LabelOrBuilder getLabelsOrBuilder( - int index); - - /** - *
-     * Pod containers associated with this finding, if any.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 4; - */ - java.util.List - getContainersList(); - /** - *
-     * Pod containers associated with this finding, if any.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 4; - */ - com.google.cloud.securitycenter.v1.Container getContainers(int index); - /** - *
-     * Pod containers associated with this finding, if any.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 4; - */ - int getContainersCount(); - /** - *
-     * Pod containers associated with this finding, if any.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 4; - */ - java.util.List - getContainersOrBuilderList(); - /** - *
-     * Pod containers associated with this finding, if any.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 4; - */ - com.google.cloud.securitycenter.v1.ContainerOrBuilder getContainersOrBuilder( - int index); - } - /** - *
-   * Kubernetes Pod.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Kubernetes.Pod} - */ - public static final class Pod extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Kubernetes.Pod) - PodOrBuilder { - private static final long serialVersionUID = 0L; - // Use Pod.newBuilder() to construct. - private Pod(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Pod() { - ns_ = ""; - name_ = ""; - labels_ = java.util.Collections.emptyList(); - containers_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Pod(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Pod( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - ns_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - labels_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - labels_.add( - input.readMessage(com.google.cloud.securitycenter.v1.Label.parser(), extensionRegistry)); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - containers_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - containers_.add( - input.readMessage(com.google.cloud.securitycenter.v1.Container.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - labels_ = java.util.Collections.unmodifiableList(labels_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - containers_ = java.util.Collections.unmodifiableList(containers_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_Pod_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_Pod_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Kubernetes.Pod.class, com.google.cloud.securitycenter.v1.Kubernetes.Pod.Builder.class); - } - - public static final int NS_FIELD_NUMBER = 1; - private volatile java.lang.Object ns_; - /** - *
-     * Kubernetes Pod namespace.
-     * 
- * - * string ns = 1; - * @return The ns. - */ - @java.lang.Override - public java.lang.String getNs() { - java.lang.Object ref = ns_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - ns_ = s; - return s; - } - } - /** - *
-     * Kubernetes Pod namespace.
-     * 
- * - * string ns = 1; - * @return The bytes for ns. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNsBytes() { - java.lang.Object ref = ns_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - ns_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; - /** - *
-     * Kubernetes Pod name.
-     * 
- * - * string name = 2; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-     * Kubernetes Pod name.
-     * 
- * - * string name = 2; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LABELS_FIELD_NUMBER = 3; - private java.util.List labels_; - /** - *
-     * Pod labels.  For Kubernetes containers, these are applied to the
-     * container.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 3; - */ - @java.lang.Override - public java.util.List getLabelsList() { - return labels_; - } - /** - *
-     * Pod labels.  For Kubernetes containers, these are applied to the
-     * container.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 3; - */ - @java.lang.Override - public java.util.List - getLabelsOrBuilderList() { - return labels_; - } - /** - *
-     * Pod labels.  For Kubernetes containers, these are applied to the
-     * container.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 3; - */ - @java.lang.Override - public int getLabelsCount() { - return labels_.size(); - } - /** - *
-     * Pod labels.  For Kubernetes containers, these are applied to the
-     * container.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 3; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Label getLabels(int index) { - return labels_.get(index); - } - /** - *
-     * Pod labels.  For Kubernetes containers, these are applied to the
-     * container.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 3; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.LabelOrBuilder getLabelsOrBuilder( - int index) { - return labels_.get(index); - } - - public static final int CONTAINERS_FIELD_NUMBER = 4; - private java.util.List containers_; - /** - *
-     * Pod containers associated with this finding, if any.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 4; - */ - @java.lang.Override - public java.util.List getContainersList() { - return containers_; - } - /** - *
-     * Pod containers associated with this finding, if any.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 4; - */ - @java.lang.Override - public java.util.List - getContainersOrBuilderList() { - return containers_; - } - /** - *
-     * Pod containers associated with this finding, if any.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 4; - */ - @java.lang.Override - public int getContainersCount() { - return containers_.size(); - } - /** - *
-     * Pod containers associated with this finding, if any.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 4; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Container getContainers(int index) { - return containers_.get(index); - } - /** - *
-     * Pod containers associated with this finding, if any.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 4; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.ContainerOrBuilder getContainersOrBuilder( - int index) { - return containers_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ns_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ns_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - for (int i = 0; i < labels_.size(); i++) { - output.writeMessage(3, labels_.get(i)); - } - for (int i = 0; i < containers_.size(); i++) { - output.writeMessage(4, containers_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ns_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ns_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - for (int i = 0; i < labels_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, labels_.get(i)); - } - for (int i = 0; i < containers_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, containers_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.Kubernetes.Pod)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.Kubernetes.Pod other = (com.google.cloud.securitycenter.v1.Kubernetes.Pod) obj; - - if (!getNs() - .equals(other.getNs())) return false; - if (!getName() - .equals(other.getName())) return false; - if (!getLabelsList() - .equals(other.getLabelsList())) return false; - if (!getContainersList() - .equals(other.getContainersList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NS_FIELD_NUMBER; - hash = (53 * hash) + getNs().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (getLabelsCount() > 0) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + getLabelsList().hashCode(); - } - if (getContainersCount() > 0) { - hash = (37 * hash) + CONTAINERS_FIELD_NUMBER; - hash = (53 * hash) + getContainersList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.Kubernetes.Pod parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Pod parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Pod parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Pod parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Pod parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Pod parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Pod parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Pod parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Pod parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Pod parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Pod parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Pod parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.Kubernetes.Pod prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Kubernetes Pod.
-     * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Kubernetes.Pod} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Kubernetes.Pod) - com.google.cloud.securitycenter.v1.Kubernetes.PodOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_Pod_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_Pod_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Kubernetes.Pod.class, com.google.cloud.securitycenter.v1.Kubernetes.Pod.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.Kubernetes.Pod.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getLabelsFieldBuilder(); - getContainersFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - ns_ = ""; - - name_ = ""; - - if (labelsBuilder_ == null) { - labels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - labelsBuilder_.clear(); - } - if (containersBuilder_ == null) { - containers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - containersBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_Pod_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.Pod getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.Kubernetes.Pod.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.Pod build() { - com.google.cloud.securitycenter.v1.Kubernetes.Pod result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.Pod buildPartial() { - com.google.cloud.securitycenter.v1.Kubernetes.Pod result = new com.google.cloud.securitycenter.v1.Kubernetes.Pod(this); - int from_bitField0_ = bitField0_; - result.ns_ = ns_; - result.name_ = name_; - if (labelsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - labels_ = java.util.Collections.unmodifiableList(labels_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.labels_ = labels_; - } else { - result.labels_ = labelsBuilder_.build(); - } - if (containersBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - containers_ = java.util.Collections.unmodifiableList(containers_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.containers_ = containers_; - } else { - result.containers_ = containersBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.Kubernetes.Pod) { - return mergeFrom((com.google.cloud.securitycenter.v1.Kubernetes.Pod)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.Kubernetes.Pod other) { - if (other == com.google.cloud.securitycenter.v1.Kubernetes.Pod.getDefaultInstance()) return this; - if (!other.getNs().isEmpty()) { - ns_ = other.ns_; - onChanged(); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (labelsBuilder_ == null) { - if (!other.labels_.isEmpty()) { - if (labels_.isEmpty()) { - labels_ = other.labels_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureLabelsIsMutable(); - labels_.addAll(other.labels_); - } - onChanged(); - } - } else { - if (!other.labels_.isEmpty()) { - if (labelsBuilder_.isEmpty()) { - labelsBuilder_.dispose(); - labelsBuilder_ = null; - labels_ = other.labels_; - bitField0_ = (bitField0_ & ~0x00000001); - labelsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLabelsFieldBuilder() : null; - } else { - labelsBuilder_.addAllMessages(other.labels_); - } - } - } - if (containersBuilder_ == null) { - if (!other.containers_.isEmpty()) { - if (containers_.isEmpty()) { - containers_ = other.containers_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureContainersIsMutable(); - containers_.addAll(other.containers_); - } - onChanged(); - } - } else { - if (!other.containers_.isEmpty()) { - if (containersBuilder_.isEmpty()) { - containersBuilder_.dispose(); - containersBuilder_ = null; - containers_ = other.containers_; - bitField0_ = (bitField0_ & ~0x00000002); - containersBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getContainersFieldBuilder() : null; - } else { - containersBuilder_.addAllMessages(other.containers_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.Kubernetes.Pod parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.Kubernetes.Pod) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object ns_ = ""; - /** - *
-       * Kubernetes Pod namespace.
-       * 
- * - * string ns = 1; - * @return The ns. - */ - public java.lang.String getNs() { - java.lang.Object ref = ns_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - ns_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Kubernetes Pod namespace.
-       * 
- * - * string ns = 1; - * @return The bytes for ns. - */ - public com.google.protobuf.ByteString - getNsBytes() { - java.lang.Object ref = ns_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - ns_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Kubernetes Pod namespace.
-       * 
- * - * string ns = 1; - * @param value The ns to set. - * @return This builder for chaining. - */ - public Builder setNs( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - ns_ = value; - onChanged(); - return this; - } - /** - *
-       * Kubernetes Pod namespace.
-       * 
- * - * string ns = 1; - * @return This builder for chaining. - */ - public Builder clearNs() { - - ns_ = getDefaultInstance().getNs(); - onChanged(); - return this; - } - /** - *
-       * Kubernetes Pod namespace.
-       * 
- * - * string ns = 1; - * @param value The bytes for ns to set. - * @return This builder for chaining. - */ - public Builder setNsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - ns_ = value; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-       * Kubernetes Pod name.
-       * 
- * - * string name = 2; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Kubernetes Pod name.
-       * 
- * - * string name = 2; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Kubernetes Pod name.
-       * 
- * - * string name = 2; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-       * Kubernetes Pod name.
-       * 
- * - * string name = 2; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-       * Kubernetes Pod name.
-       * 
- * - * string name = 2; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.util.List labels_ = - java.util.Collections.emptyList(); - private void ensureLabelsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - labels_ = new java.util.ArrayList(labels_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Label, com.google.cloud.securitycenter.v1.Label.Builder, com.google.cloud.securitycenter.v1.LabelOrBuilder> labelsBuilder_; - - /** - *
-       * Pod labels.  For Kubernetes containers, these are applied to the
-       * container.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 3; - */ - public java.util.List getLabelsList() { - if (labelsBuilder_ == null) { - return java.util.Collections.unmodifiableList(labels_); - } else { - return labelsBuilder_.getMessageList(); - } - } - /** - *
-       * Pod labels.  For Kubernetes containers, these are applied to the
-       * container.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 3; - */ - public int getLabelsCount() { - if (labelsBuilder_ == null) { - return labels_.size(); - } else { - return labelsBuilder_.getCount(); - } - } - /** - *
-       * Pod labels.  For Kubernetes containers, these are applied to the
-       * container.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 3; - */ - public com.google.cloud.securitycenter.v1.Label getLabels(int index) { - if (labelsBuilder_ == null) { - return labels_.get(index); - } else { - return labelsBuilder_.getMessage(index); - } - } - /** - *
-       * Pod labels.  For Kubernetes containers, these are applied to the
-       * container.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 3; - */ - public Builder setLabels( - int index, com.google.cloud.securitycenter.v1.Label value) { - if (labelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelsIsMutable(); - labels_.set(index, value); - onChanged(); - } else { - labelsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Pod labels.  For Kubernetes containers, these are applied to the
-       * container.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 3; - */ - public Builder setLabels( - int index, com.google.cloud.securitycenter.v1.Label.Builder builderForValue) { - if (labelsBuilder_ == null) { - ensureLabelsIsMutable(); - labels_.set(index, builderForValue.build()); - onChanged(); - } else { - labelsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Pod labels.  For Kubernetes containers, these are applied to the
-       * container.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 3; - */ - public Builder addLabels(com.google.cloud.securitycenter.v1.Label value) { - if (labelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelsIsMutable(); - labels_.add(value); - onChanged(); - } else { - labelsBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Pod labels.  For Kubernetes containers, these are applied to the
-       * container.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 3; - */ - public Builder addLabels( - int index, com.google.cloud.securitycenter.v1.Label value) { - if (labelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelsIsMutable(); - labels_.add(index, value); - onChanged(); - } else { - labelsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Pod labels.  For Kubernetes containers, these are applied to the
-       * container.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 3; - */ - public Builder addLabels( - com.google.cloud.securitycenter.v1.Label.Builder builderForValue) { - if (labelsBuilder_ == null) { - ensureLabelsIsMutable(); - labels_.add(builderForValue.build()); - onChanged(); - } else { - labelsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Pod labels.  For Kubernetes containers, these are applied to the
-       * container.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 3; - */ - public Builder addLabels( - int index, com.google.cloud.securitycenter.v1.Label.Builder builderForValue) { - if (labelsBuilder_ == null) { - ensureLabelsIsMutable(); - labels_.add(index, builderForValue.build()); - onChanged(); - } else { - labelsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Pod labels.  For Kubernetes containers, these are applied to the
-       * container.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 3; - */ - public Builder addAllLabels( - java.lang.Iterable values) { - if (labelsBuilder_ == null) { - ensureLabelsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, labels_); - onChanged(); - } else { - labelsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Pod labels.  For Kubernetes containers, these are applied to the
-       * container.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 3; - */ - public Builder clearLabels() { - if (labelsBuilder_ == null) { - labels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - labelsBuilder_.clear(); - } - return this; - } - /** - *
-       * Pod labels.  For Kubernetes containers, these are applied to the
-       * container.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 3; - */ - public Builder removeLabels(int index) { - if (labelsBuilder_ == null) { - ensureLabelsIsMutable(); - labels_.remove(index); - onChanged(); - } else { - labelsBuilder_.remove(index); - } - return this; - } - /** - *
-       * Pod labels.  For Kubernetes containers, these are applied to the
-       * container.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 3; - */ - public com.google.cloud.securitycenter.v1.Label.Builder getLabelsBuilder( - int index) { - return getLabelsFieldBuilder().getBuilder(index); - } - /** - *
-       * Pod labels.  For Kubernetes containers, these are applied to the
-       * container.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 3; - */ - public com.google.cloud.securitycenter.v1.LabelOrBuilder getLabelsOrBuilder( - int index) { - if (labelsBuilder_ == null) { - return labels_.get(index); } else { - return labelsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Pod labels.  For Kubernetes containers, these are applied to the
-       * container.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 3; - */ - public java.util.List - getLabelsOrBuilderList() { - if (labelsBuilder_ != null) { - return labelsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(labels_); - } - } - /** - *
-       * Pod labels.  For Kubernetes containers, these are applied to the
-       * container.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 3; - */ - public com.google.cloud.securitycenter.v1.Label.Builder addLabelsBuilder() { - return getLabelsFieldBuilder().addBuilder( - com.google.cloud.securitycenter.v1.Label.getDefaultInstance()); - } - /** - *
-       * Pod labels.  For Kubernetes containers, these are applied to the
-       * container.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 3; - */ - public com.google.cloud.securitycenter.v1.Label.Builder addLabelsBuilder( - int index) { - return getLabelsFieldBuilder().addBuilder( - index, com.google.cloud.securitycenter.v1.Label.getDefaultInstance()); - } - /** - *
-       * Pod labels.  For Kubernetes containers, these are applied to the
-       * container.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Label labels = 3; - */ - public java.util.List - getLabelsBuilderList() { - return getLabelsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Label, com.google.cloud.securitycenter.v1.Label.Builder, com.google.cloud.securitycenter.v1.LabelOrBuilder> - getLabelsFieldBuilder() { - if (labelsBuilder_ == null) { - labelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Label, com.google.cloud.securitycenter.v1.Label.Builder, com.google.cloud.securitycenter.v1.LabelOrBuilder>( - labels_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - labels_ = null; - } - return labelsBuilder_; - } - - private java.util.List containers_ = - java.util.Collections.emptyList(); - private void ensureContainersIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - containers_ = new java.util.ArrayList(containers_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Container, com.google.cloud.securitycenter.v1.Container.Builder, com.google.cloud.securitycenter.v1.ContainerOrBuilder> containersBuilder_; - - /** - *
-       * Pod containers associated with this finding, if any.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 4; - */ - public java.util.List getContainersList() { - if (containersBuilder_ == null) { - return java.util.Collections.unmodifiableList(containers_); - } else { - return containersBuilder_.getMessageList(); - } - } - /** - *
-       * Pod containers associated with this finding, if any.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 4; - */ - public int getContainersCount() { - if (containersBuilder_ == null) { - return containers_.size(); - } else { - return containersBuilder_.getCount(); - } - } - /** - *
-       * Pod containers associated with this finding, if any.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 4; - */ - public com.google.cloud.securitycenter.v1.Container getContainers(int index) { - if (containersBuilder_ == null) { - return containers_.get(index); - } else { - return containersBuilder_.getMessage(index); - } - } - /** - *
-       * Pod containers associated with this finding, if any.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 4; - */ - public Builder setContainers( - int index, com.google.cloud.securitycenter.v1.Container value) { - if (containersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContainersIsMutable(); - containers_.set(index, value); - onChanged(); - } else { - containersBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Pod containers associated with this finding, if any.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 4; - */ - public Builder setContainers( - int index, com.google.cloud.securitycenter.v1.Container.Builder builderForValue) { - if (containersBuilder_ == null) { - ensureContainersIsMutable(); - containers_.set(index, builderForValue.build()); - onChanged(); - } else { - containersBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Pod containers associated with this finding, if any.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 4; - */ - public Builder addContainers(com.google.cloud.securitycenter.v1.Container value) { - if (containersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContainersIsMutable(); - containers_.add(value); - onChanged(); - } else { - containersBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Pod containers associated with this finding, if any.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 4; - */ - public Builder addContainers( - int index, com.google.cloud.securitycenter.v1.Container value) { - if (containersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContainersIsMutable(); - containers_.add(index, value); - onChanged(); - } else { - containersBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Pod containers associated with this finding, if any.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 4; - */ - public Builder addContainers( - com.google.cloud.securitycenter.v1.Container.Builder builderForValue) { - if (containersBuilder_ == null) { - ensureContainersIsMutable(); - containers_.add(builderForValue.build()); - onChanged(); - } else { - containersBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Pod containers associated with this finding, if any.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 4; - */ - public Builder addContainers( - int index, com.google.cloud.securitycenter.v1.Container.Builder builderForValue) { - if (containersBuilder_ == null) { - ensureContainersIsMutable(); - containers_.add(index, builderForValue.build()); - onChanged(); - } else { - containersBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Pod containers associated with this finding, if any.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 4; - */ - public Builder addAllContainers( - java.lang.Iterable values) { - if (containersBuilder_ == null) { - ensureContainersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, containers_); - onChanged(); - } else { - containersBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Pod containers associated with this finding, if any.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 4; - */ - public Builder clearContainers() { - if (containersBuilder_ == null) { - containers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - containersBuilder_.clear(); - } - return this; - } - /** - *
-       * Pod containers associated with this finding, if any.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 4; - */ - public Builder removeContainers(int index) { - if (containersBuilder_ == null) { - ensureContainersIsMutable(); - containers_.remove(index); - onChanged(); - } else { - containersBuilder_.remove(index); - } - return this; - } - /** - *
-       * Pod containers associated with this finding, if any.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 4; - */ - public com.google.cloud.securitycenter.v1.Container.Builder getContainersBuilder( - int index) { - return getContainersFieldBuilder().getBuilder(index); - } - /** - *
-       * Pod containers associated with this finding, if any.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 4; - */ - public com.google.cloud.securitycenter.v1.ContainerOrBuilder getContainersOrBuilder( - int index) { - if (containersBuilder_ == null) { - return containers_.get(index); } else { - return containersBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Pod containers associated with this finding, if any.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 4; - */ - public java.util.List - getContainersOrBuilderList() { - if (containersBuilder_ != null) { - return containersBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(containers_); - } - } - /** - *
-       * Pod containers associated with this finding, if any.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 4; - */ - public com.google.cloud.securitycenter.v1.Container.Builder addContainersBuilder() { - return getContainersFieldBuilder().addBuilder( - com.google.cloud.securitycenter.v1.Container.getDefaultInstance()); - } - /** - *
-       * Pod containers associated with this finding, if any.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 4; - */ - public com.google.cloud.securitycenter.v1.Container.Builder addContainersBuilder( - int index) { - return getContainersFieldBuilder().addBuilder( - index, com.google.cloud.securitycenter.v1.Container.getDefaultInstance()); - } - /** - *
-       * Pod containers associated with this finding, if any.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Container containers = 4; - */ - public java.util.List - getContainersBuilderList() { - return getContainersFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Container, com.google.cloud.securitycenter.v1.Container.Builder, com.google.cloud.securitycenter.v1.ContainerOrBuilder> - getContainersFieldBuilder() { - if (containersBuilder_ == null) { - containersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Container, com.google.cloud.securitycenter.v1.Container.Builder, com.google.cloud.securitycenter.v1.ContainerOrBuilder>( - containers_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - containers_ = null; - } - return containersBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Kubernetes.Pod) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Kubernetes.Pod) - private static final com.google.cloud.securitycenter.v1.Kubernetes.Pod DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Kubernetes.Pod(); - } - - public static com.google.cloud.securitycenter.v1.Kubernetes.Pod getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Pod parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Pod(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.Pod getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface NodeOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Kubernetes.Node) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Full Resource name of the Compute Engine VM running the
-     * cluster node.
-     * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-     * Full Resource name of the Compute Engine VM running the
-     * cluster node.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - } - /** - *
-   * Kubernetes Nodes associated with the finding.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Kubernetes.Node} - */ - public static final class Node extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Kubernetes.Node) - NodeOrBuilder { - private static final long serialVersionUID = 0L; - // Use Node.newBuilder() to construct. - private Node(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Node() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Node(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Node( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_Node_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_Node_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Kubernetes.Node.class, com.google.cloud.securitycenter.v1.Kubernetes.Node.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-     * Full Resource name of the Compute Engine VM running the
-     * cluster node.
-     * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-     * Full Resource name of the Compute Engine VM running the
-     * cluster node.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.Kubernetes.Node)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.Kubernetes.Node other = (com.google.cloud.securitycenter.v1.Kubernetes.Node) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.Kubernetes.Node parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Node parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Node parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Node parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Node parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Node parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Node parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Node parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Node parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Node parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Node parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Node parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.Kubernetes.Node prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Kubernetes Nodes associated with the finding.
-     * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Kubernetes.Node} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Kubernetes.Node) - com.google.cloud.securitycenter.v1.Kubernetes.NodeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_Node_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_Node_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Kubernetes.Node.class, com.google.cloud.securitycenter.v1.Kubernetes.Node.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.Kubernetes.Node.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_Node_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.Node getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.Kubernetes.Node.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.Node build() { - com.google.cloud.securitycenter.v1.Kubernetes.Node result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.Node buildPartial() { - com.google.cloud.securitycenter.v1.Kubernetes.Node result = new com.google.cloud.securitycenter.v1.Kubernetes.Node(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.Kubernetes.Node) { - return mergeFrom((com.google.cloud.securitycenter.v1.Kubernetes.Node)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.Kubernetes.Node other) { - if (other == com.google.cloud.securitycenter.v1.Kubernetes.Node.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.Kubernetes.Node parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.Kubernetes.Node) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-       * Full Resource name of the Compute Engine VM running the
-       * cluster node.
-       * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Full Resource name of the Compute Engine VM running the
-       * cluster node.
-       * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Full Resource name of the Compute Engine VM running the
-       * cluster node.
-       * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-       * Full Resource name of the Compute Engine VM running the
-       * cluster node.
-       * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-       * Full Resource name of the Compute Engine VM running the
-       * cluster node.
-       * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Kubernetes.Node) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Kubernetes.Node) - private static final com.google.cloud.securitycenter.v1.Kubernetes.Node DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Kubernetes.Node(); - } - - public static com.google.cloud.securitycenter.v1.Kubernetes.Node getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Node parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Node(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.Node getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface NodePoolOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Kubernetes.NodePool) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Kubernetes Node pool name.
-     * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-     * Kubernetes Node pool name.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-     * Nodes associated with the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - java.util.List - getNodesList(); - /** - *
-     * Nodes associated with the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - com.google.cloud.securitycenter.v1.Kubernetes.Node getNodes(int index); - /** - *
-     * Nodes associated with the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - int getNodesCount(); - /** - *
-     * Nodes associated with the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - java.util.List - getNodesOrBuilderList(); - /** - *
-     * Nodes associated with the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - com.google.cloud.securitycenter.v1.Kubernetes.NodeOrBuilder getNodesOrBuilder( - int index); - } - /** - *
-   * Provides GKE Node Pool information.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Kubernetes.NodePool} - */ - public static final class NodePool extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Kubernetes.NodePool) - NodePoolOrBuilder { - private static final long serialVersionUID = 0L; - // Use NodePool.newBuilder() to construct. - private NodePool(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private NodePool() { - name_ = ""; - nodes_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new NodePool(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private NodePool( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - nodes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - nodes_.add( - input.readMessage(com.google.cloud.securitycenter.v1.Kubernetes.Node.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - nodes_ = java.util.Collections.unmodifiableList(nodes_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_NodePool_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_NodePool_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Kubernetes.NodePool.class, com.google.cloud.securitycenter.v1.Kubernetes.NodePool.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-     * Kubernetes Node pool name.
-     * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-     * Kubernetes Node pool name.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NODES_FIELD_NUMBER = 2; - private java.util.List nodes_; - /** - *
-     * Nodes associated with the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - @java.lang.Override - public java.util.List getNodesList() { - return nodes_; - } - /** - *
-     * Nodes associated with the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - @java.lang.Override - public java.util.List - getNodesOrBuilderList() { - return nodes_; - } - /** - *
-     * Nodes associated with the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - @java.lang.Override - public int getNodesCount() { - return nodes_.size(); - } - /** - *
-     * Nodes associated with the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.Node getNodes(int index) { - return nodes_.get(index); - } - /** - *
-     * Nodes associated with the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.NodeOrBuilder getNodesOrBuilder( - int index) { - return nodes_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - for (int i = 0; i < nodes_.size(); i++) { - output.writeMessage(2, nodes_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - for (int i = 0; i < nodes_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, nodes_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.Kubernetes.NodePool)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.Kubernetes.NodePool other = (com.google.cloud.securitycenter.v1.Kubernetes.NodePool) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getNodesList() - .equals(other.getNodesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (getNodesCount() > 0) { - hash = (37 * hash) + NODES_FIELD_NUMBER; - hash = (53 * hash) + getNodesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.Kubernetes.NodePool parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.NodePool parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.NodePool parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.NodePool parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.NodePool parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.NodePool parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.NodePool parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.NodePool parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.NodePool parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.NodePool parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.NodePool parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.NodePool parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.Kubernetes.NodePool prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Provides GKE Node Pool information.
-     * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Kubernetes.NodePool} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Kubernetes.NodePool) - com.google.cloud.securitycenter.v1.Kubernetes.NodePoolOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_NodePool_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_NodePool_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Kubernetes.NodePool.class, com.google.cloud.securitycenter.v1.Kubernetes.NodePool.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.Kubernetes.NodePool.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getNodesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - if (nodesBuilder_ == null) { - nodes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - nodesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_NodePool_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.NodePool getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.Kubernetes.NodePool.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.NodePool build() { - com.google.cloud.securitycenter.v1.Kubernetes.NodePool result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.NodePool buildPartial() { - com.google.cloud.securitycenter.v1.Kubernetes.NodePool result = new com.google.cloud.securitycenter.v1.Kubernetes.NodePool(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - if (nodesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - nodes_ = java.util.Collections.unmodifiableList(nodes_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.nodes_ = nodes_; - } else { - result.nodes_ = nodesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.Kubernetes.NodePool) { - return mergeFrom((com.google.cloud.securitycenter.v1.Kubernetes.NodePool)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.Kubernetes.NodePool other) { - if (other == com.google.cloud.securitycenter.v1.Kubernetes.NodePool.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (nodesBuilder_ == null) { - if (!other.nodes_.isEmpty()) { - if (nodes_.isEmpty()) { - nodes_ = other.nodes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureNodesIsMutable(); - nodes_.addAll(other.nodes_); - } - onChanged(); - } - } else { - if (!other.nodes_.isEmpty()) { - if (nodesBuilder_.isEmpty()) { - nodesBuilder_.dispose(); - nodesBuilder_ = null; - nodes_ = other.nodes_; - bitField0_ = (bitField0_ & ~0x00000001); - nodesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getNodesFieldBuilder() : null; - } else { - nodesBuilder_.addAllMessages(other.nodes_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.Kubernetes.NodePool parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.Kubernetes.NodePool) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-       * Kubernetes Node pool name.
-       * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Kubernetes Node pool name.
-       * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Kubernetes Node pool name.
-       * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-       * Kubernetes Node pool name.
-       * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-       * Kubernetes Node pool name.
-       * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.util.List nodes_ = - java.util.Collections.emptyList(); - private void ensureNodesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - nodes_ = new java.util.ArrayList(nodes_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Kubernetes.Node, com.google.cloud.securitycenter.v1.Kubernetes.Node.Builder, com.google.cloud.securitycenter.v1.Kubernetes.NodeOrBuilder> nodesBuilder_; - - /** - *
-       * Nodes associated with the finding.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public java.util.List getNodesList() { - if (nodesBuilder_ == null) { - return java.util.Collections.unmodifiableList(nodes_); - } else { - return nodesBuilder_.getMessageList(); - } - } - /** - *
-       * Nodes associated with the finding.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public int getNodesCount() { - if (nodesBuilder_ == null) { - return nodes_.size(); - } else { - return nodesBuilder_.getCount(); - } - } - /** - *
-       * Nodes associated with the finding.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.Node getNodes(int index) { - if (nodesBuilder_ == null) { - return nodes_.get(index); - } else { - return nodesBuilder_.getMessage(index); - } - } - /** - *
-       * Nodes associated with the finding.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public Builder setNodes( - int index, com.google.cloud.securitycenter.v1.Kubernetes.Node value) { - if (nodesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodesIsMutable(); - nodes_.set(index, value); - onChanged(); - } else { - nodesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Nodes associated with the finding.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public Builder setNodes( - int index, com.google.cloud.securitycenter.v1.Kubernetes.Node.Builder builderForValue) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - nodes_.set(index, builderForValue.build()); - onChanged(); - } else { - nodesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Nodes associated with the finding.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public Builder addNodes(com.google.cloud.securitycenter.v1.Kubernetes.Node value) { - if (nodesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodesIsMutable(); - nodes_.add(value); - onChanged(); - } else { - nodesBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Nodes associated with the finding.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public Builder addNodes( - int index, com.google.cloud.securitycenter.v1.Kubernetes.Node value) { - if (nodesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodesIsMutable(); - nodes_.add(index, value); - onChanged(); - } else { - nodesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Nodes associated with the finding.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public Builder addNodes( - com.google.cloud.securitycenter.v1.Kubernetes.Node.Builder builderForValue) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - nodes_.add(builderForValue.build()); - onChanged(); - } else { - nodesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Nodes associated with the finding.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public Builder addNodes( - int index, com.google.cloud.securitycenter.v1.Kubernetes.Node.Builder builderForValue) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - nodes_.add(index, builderForValue.build()); - onChanged(); - } else { - nodesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Nodes associated with the finding.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public Builder addAllNodes( - java.lang.Iterable values) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, nodes_); - onChanged(); - } else { - nodesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Nodes associated with the finding.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public Builder clearNodes() { - if (nodesBuilder_ == null) { - nodes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - nodesBuilder_.clear(); - } - return this; - } - /** - *
-       * Nodes associated with the finding.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public Builder removeNodes(int index) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - nodes_.remove(index); - onChanged(); - } else { - nodesBuilder_.remove(index); - } - return this; - } - /** - *
-       * Nodes associated with the finding.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.Node.Builder getNodesBuilder( - int index) { - return getNodesFieldBuilder().getBuilder(index); - } - /** - *
-       * Nodes associated with the finding.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.NodeOrBuilder getNodesOrBuilder( - int index) { - if (nodesBuilder_ == null) { - return nodes_.get(index); } else { - return nodesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Nodes associated with the finding.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public java.util.List - getNodesOrBuilderList() { - if (nodesBuilder_ != null) { - return nodesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(nodes_); - } - } - /** - *
-       * Nodes associated with the finding.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.Node.Builder addNodesBuilder() { - return getNodesFieldBuilder().addBuilder( - com.google.cloud.securitycenter.v1.Kubernetes.Node.getDefaultInstance()); - } - /** - *
-       * Nodes associated with the finding.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.Node.Builder addNodesBuilder( - int index) { - return getNodesFieldBuilder().addBuilder( - index, com.google.cloud.securitycenter.v1.Kubernetes.Node.getDefaultInstance()); - } - /** - *
-       * Nodes associated with the finding.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public java.util.List - getNodesBuilderList() { - return getNodesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Kubernetes.Node, com.google.cloud.securitycenter.v1.Kubernetes.Node.Builder, com.google.cloud.securitycenter.v1.Kubernetes.NodeOrBuilder> - getNodesFieldBuilder() { - if (nodesBuilder_ == null) { - nodesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Kubernetes.Node, com.google.cloud.securitycenter.v1.Kubernetes.Node.Builder, com.google.cloud.securitycenter.v1.Kubernetes.NodeOrBuilder>( - nodes_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - nodes_ = null; - } - return nodesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Kubernetes.NodePool) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Kubernetes.NodePool) - private static final com.google.cloud.securitycenter.v1.Kubernetes.NodePool DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Kubernetes.NodePool(); - } - - public static com.google.cloud.securitycenter.v1.Kubernetes.NodePool getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NodePool parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new NodePool(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.NodePool getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface RoleOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Kubernetes.Role) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Role type.
-     * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Role.Kind kind = 1; - * @return The enum numeric value on the wire for kind. - */ - int getKindValue(); - /** - *
-     * Role type.
-     * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Role.Kind kind = 1; - * @return The kind. - */ - com.google.cloud.securitycenter.v1.Kubernetes.Role.Kind getKind(); - - /** - *
-     * Role namespace.
-     * 
- * - * string ns = 2; - * @return The ns. - */ - java.lang.String getNs(); - /** - *
-     * Role namespace.
-     * 
- * - * string ns = 2; - * @return The bytes for ns. - */ - com.google.protobuf.ByteString - getNsBytes(); - - /** - *
-     * Role name.
-     * 
- * - * string name = 3; - * @return The name. - */ - java.lang.String getName(); - /** - *
-     * Role name.
-     * 
- * - * string name = 3; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - } - /** - *
-   * Kubernetes Role or ClusterRole.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Kubernetes.Role} - */ - public static final class Role extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Kubernetes.Role) - RoleOrBuilder { - private static final long serialVersionUID = 0L; - // Use Role.newBuilder() to construct. - private Role(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Role() { - kind_ = 0; - ns_ = ""; - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Role(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Role( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - kind_ = rawValue; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - ns_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_Role_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_Role_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Kubernetes.Role.class, com.google.cloud.securitycenter.v1.Kubernetes.Role.Builder.class); - } - - /** - *
-     * Types of Kubernetes roles.
-     * 
- * - * Protobuf enum {@code google.cloud.securitycenter.v1.Kubernetes.Role.Kind} - */ - public enum Kind - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-       * Role type is not specified.
-       * 
- * - * KIND_UNSPECIFIED = 0; - */ - KIND_UNSPECIFIED(0), - /** - *
-       * Kubernetes Role.
-       * 
- * - * ROLE = 1; - */ - ROLE(1), - /** - *
-       * Kubernetes ClusterRole.
-       * 
- * - * CLUSTER_ROLE = 2; - */ - CLUSTER_ROLE(2), - UNRECOGNIZED(-1), - ; - - /** - *
-       * Role type is not specified.
-       * 
- * - * KIND_UNSPECIFIED = 0; - */ - public static final int KIND_UNSPECIFIED_VALUE = 0; - /** - *
-       * Kubernetes Role.
-       * 
- * - * ROLE = 1; - */ - public static final int ROLE_VALUE = 1; - /** - *
-       * Kubernetes ClusterRole.
-       * 
- * - * CLUSTER_ROLE = 2; - */ - public static final int CLUSTER_ROLE_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Kind valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Kind forNumber(int value) { - switch (value) { - case 0: return KIND_UNSPECIFIED; - case 1: return ROLE; - case 2: return CLUSTER_ROLE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Kind> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Kind findValueByNumber(int number) { - return Kind.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.Kubernetes.Role.getDescriptor().getEnumTypes().get(0); - } - - private static final Kind[] VALUES = values(); - - public static Kind valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Kind(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v1.Kubernetes.Role.Kind) - } - - public static final int KIND_FIELD_NUMBER = 1; - private int kind_; - /** - *
-     * Role type.
-     * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Role.Kind kind = 1; - * @return The enum numeric value on the wire for kind. - */ - @java.lang.Override public int getKindValue() { - return kind_; - } - /** - *
-     * Role type.
-     * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Role.Kind kind = 1; - * @return The kind. - */ - @java.lang.Override public com.google.cloud.securitycenter.v1.Kubernetes.Role.Kind getKind() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.Kubernetes.Role.Kind result = com.google.cloud.securitycenter.v1.Kubernetes.Role.Kind.valueOf(kind_); - return result == null ? com.google.cloud.securitycenter.v1.Kubernetes.Role.Kind.UNRECOGNIZED : result; - } - - public static final int NS_FIELD_NUMBER = 2; - private volatile java.lang.Object ns_; - /** - *
-     * Role namespace.
-     * 
- * - * string ns = 2; - * @return The ns. - */ - @java.lang.Override - public java.lang.String getNs() { - java.lang.Object ref = ns_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - ns_ = s; - return s; - } - } - /** - *
-     * Role namespace.
-     * 
- * - * string ns = 2; - * @return The bytes for ns. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNsBytes() { - java.lang.Object ref = ns_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - ns_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object name_; - /** - *
-     * Role name.
-     * 
- * - * string name = 3; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-     * Role name.
-     * 
- * - * string name = 3; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (kind_ != com.google.cloud.securitycenter.v1.Kubernetes.Role.Kind.KIND_UNSPECIFIED.getNumber()) { - output.writeEnum(1, kind_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ns_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ns_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (kind_ != com.google.cloud.securitycenter.v1.Kubernetes.Role.Kind.KIND_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, kind_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ns_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ns_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.Kubernetes.Role)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.Kubernetes.Role other = (com.google.cloud.securitycenter.v1.Kubernetes.Role) obj; - - if (kind_ != other.kind_) return false; - if (!getNs() - .equals(other.getNs())) return false; - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + KIND_FIELD_NUMBER; - hash = (53 * hash) + kind_; - hash = (37 * hash) + NS_FIELD_NUMBER; - hash = (53 * hash) + getNs().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.Kubernetes.Role parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Role parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Role parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Role parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Role parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Role parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Role parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Role parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Role parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Role parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Role parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Role parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.Kubernetes.Role prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Kubernetes Role or ClusterRole.
-     * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Kubernetes.Role} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Kubernetes.Role) - com.google.cloud.securitycenter.v1.Kubernetes.RoleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_Role_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_Role_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Kubernetes.Role.class, com.google.cloud.securitycenter.v1.Kubernetes.Role.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.Kubernetes.Role.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - kind_ = 0; - - ns_ = ""; - - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_Role_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.Role getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.Kubernetes.Role.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.Role build() { - com.google.cloud.securitycenter.v1.Kubernetes.Role result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.Role buildPartial() { - com.google.cloud.securitycenter.v1.Kubernetes.Role result = new com.google.cloud.securitycenter.v1.Kubernetes.Role(this); - result.kind_ = kind_; - result.ns_ = ns_; - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.Kubernetes.Role) { - return mergeFrom((com.google.cloud.securitycenter.v1.Kubernetes.Role)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.Kubernetes.Role other) { - if (other == com.google.cloud.securitycenter.v1.Kubernetes.Role.getDefaultInstance()) return this; - if (other.kind_ != 0) { - setKindValue(other.getKindValue()); - } - if (!other.getNs().isEmpty()) { - ns_ = other.ns_; - onChanged(); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.Kubernetes.Role parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.Kubernetes.Role) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int kind_ = 0; - /** - *
-       * Role type.
-       * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Role.Kind kind = 1; - * @return The enum numeric value on the wire for kind. - */ - @java.lang.Override public int getKindValue() { - return kind_; - } - /** - *
-       * Role type.
-       * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Role.Kind kind = 1; - * @param value The enum numeric value on the wire for kind to set. - * @return This builder for chaining. - */ - public Builder setKindValue(int value) { - - kind_ = value; - onChanged(); - return this; - } - /** - *
-       * Role type.
-       * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Role.Kind kind = 1; - * @return The kind. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.Role.Kind getKind() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.Kubernetes.Role.Kind result = com.google.cloud.securitycenter.v1.Kubernetes.Role.Kind.valueOf(kind_); - return result == null ? com.google.cloud.securitycenter.v1.Kubernetes.Role.Kind.UNRECOGNIZED : result; - } - /** - *
-       * Role type.
-       * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Role.Kind kind = 1; - * @param value The kind to set. - * @return This builder for chaining. - */ - public Builder setKind(com.google.cloud.securitycenter.v1.Kubernetes.Role.Kind value) { - if (value == null) { - throw new NullPointerException(); - } - - kind_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * Role type.
-       * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Role.Kind kind = 1; - * @return This builder for chaining. - */ - public Builder clearKind() { - - kind_ = 0; - onChanged(); - return this; - } - - private java.lang.Object ns_ = ""; - /** - *
-       * Role namespace.
-       * 
- * - * string ns = 2; - * @return The ns. - */ - public java.lang.String getNs() { - java.lang.Object ref = ns_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - ns_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Role namespace.
-       * 
- * - * string ns = 2; - * @return The bytes for ns. - */ - public com.google.protobuf.ByteString - getNsBytes() { - java.lang.Object ref = ns_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - ns_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Role namespace.
-       * 
- * - * string ns = 2; - * @param value The ns to set. - * @return This builder for chaining. - */ - public Builder setNs( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - ns_ = value; - onChanged(); - return this; - } - /** - *
-       * Role namespace.
-       * 
- * - * string ns = 2; - * @return This builder for chaining. - */ - public Builder clearNs() { - - ns_ = getDefaultInstance().getNs(); - onChanged(); - return this; - } - /** - *
-       * Role namespace.
-       * 
- * - * string ns = 2; - * @param value The bytes for ns to set. - * @return This builder for chaining. - */ - public Builder setNsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - ns_ = value; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-       * Role name.
-       * 
- * - * string name = 3; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Role name.
-       * 
- * - * string name = 3; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Role name.
-       * 
- * - * string name = 3; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-       * Role name.
-       * 
- * - * string name = 3; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-       * Role name.
-       * 
- * - * string name = 3; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Kubernetes.Role) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Kubernetes.Role) - private static final com.google.cloud.securitycenter.v1.Kubernetes.Role DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Kubernetes.Role(); - } - - public static com.google.cloud.securitycenter.v1.Kubernetes.Role getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Role parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Role(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.Role getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface BindingOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Kubernetes.Binding) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Namespace for binding.
-     * 
- * - * string ns = 1; - * @return The ns. - */ - java.lang.String getNs(); - /** - *
-     * Namespace for binding.
-     * 
- * - * string ns = 1; - * @return The bytes for ns. - */ - com.google.protobuf.ByteString - getNsBytes(); - - /** - *
-     * Name for binding.
-     * 
- * - * string name = 2; - * @return The name. - */ - java.lang.String getName(); - /** - *
-     * Name for binding.
-     * 
- * - * string name = 2; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-     * The Role or ClusterRole referenced by the binding.
-     * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Role role = 3; - * @return Whether the role field is set. - */ - boolean hasRole(); - /** - *
-     * The Role or ClusterRole referenced by the binding.
-     * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Role role = 3; - * @return The role. - */ - com.google.cloud.securitycenter.v1.Kubernetes.Role getRole(); - /** - *
-     * The Role or ClusterRole referenced by the binding.
-     * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Role role = 3; - */ - com.google.cloud.securitycenter.v1.Kubernetes.RoleOrBuilder getRoleOrBuilder(); - - /** - *
-     * Represents the subjects(s) bound to the role. Not always available
-     * for PATCH requests.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; - */ - java.util.List - getSubjectsList(); - /** - *
-     * Represents the subjects(s) bound to the role. Not always available
-     * for PATCH requests.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; - */ - com.google.cloud.securitycenter.v1.Kubernetes.Subject getSubjects(int index); - /** - *
-     * Represents the subjects(s) bound to the role. Not always available
-     * for PATCH requests.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; - */ - int getSubjectsCount(); - /** - *
-     * Represents the subjects(s) bound to the role. Not always available
-     * for PATCH requests.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; - */ - java.util.List - getSubjectsOrBuilderList(); - /** - *
-     * Represents the subjects(s) bound to the role. Not always available
-     * for PATCH requests.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; - */ - com.google.cloud.securitycenter.v1.Kubernetes.SubjectOrBuilder getSubjectsOrBuilder( - int index); - } - /** - *
-   * Represents a Kubernetes RoleBinding or ClusterRoleBinding.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Kubernetes.Binding} - */ - public static final class Binding extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Kubernetes.Binding) - BindingOrBuilder { - private static final long serialVersionUID = 0L; - // Use Binding.newBuilder() to construct. - private Binding(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Binding() { - ns_ = ""; - name_ = ""; - subjects_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Binding(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Binding( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - ns_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 26: { - com.google.cloud.securitycenter.v1.Kubernetes.Role.Builder subBuilder = null; - if (role_ != null) { - subBuilder = role_.toBuilder(); - } - role_ = input.readMessage(com.google.cloud.securitycenter.v1.Kubernetes.Role.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(role_); - role_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - subjects_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - subjects_.add( - input.readMessage(com.google.cloud.securitycenter.v1.Kubernetes.Subject.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - subjects_ = java.util.Collections.unmodifiableList(subjects_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_Binding_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_Binding_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Kubernetes.Binding.class, com.google.cloud.securitycenter.v1.Kubernetes.Binding.Builder.class); - } - - public static final int NS_FIELD_NUMBER = 1; - private volatile java.lang.Object ns_; - /** - *
-     * Namespace for binding.
-     * 
- * - * string ns = 1; - * @return The ns. - */ - @java.lang.Override - public java.lang.String getNs() { - java.lang.Object ref = ns_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - ns_ = s; - return s; - } - } - /** - *
-     * Namespace for binding.
-     * 
- * - * string ns = 1; - * @return The bytes for ns. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNsBytes() { - java.lang.Object ref = ns_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - ns_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; - /** - *
-     * Name for binding.
-     * 
- * - * string name = 2; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-     * Name for binding.
-     * 
- * - * string name = 2; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ROLE_FIELD_NUMBER = 3; - private com.google.cloud.securitycenter.v1.Kubernetes.Role role_; - /** - *
-     * The Role or ClusterRole referenced by the binding.
-     * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Role role = 3; - * @return Whether the role field is set. - */ - @java.lang.Override - public boolean hasRole() { - return role_ != null; - } - /** - *
-     * The Role or ClusterRole referenced by the binding.
-     * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Role role = 3; - * @return The role. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.Role getRole() { - return role_ == null ? com.google.cloud.securitycenter.v1.Kubernetes.Role.getDefaultInstance() : role_; - } - /** - *
-     * The Role or ClusterRole referenced by the binding.
-     * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Role role = 3; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.RoleOrBuilder getRoleOrBuilder() { - return getRole(); - } - - public static final int SUBJECTS_FIELD_NUMBER = 4; - private java.util.List subjects_; - /** - *
-     * Represents the subjects(s) bound to the role. Not always available
-     * for PATCH requests.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; - */ - @java.lang.Override - public java.util.List getSubjectsList() { - return subjects_; - } - /** - *
-     * Represents the subjects(s) bound to the role. Not always available
-     * for PATCH requests.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; - */ - @java.lang.Override - public java.util.List - getSubjectsOrBuilderList() { - return subjects_; - } - /** - *
-     * Represents the subjects(s) bound to the role. Not always available
-     * for PATCH requests.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; - */ - @java.lang.Override - public int getSubjectsCount() { - return subjects_.size(); - } - /** - *
-     * Represents the subjects(s) bound to the role. Not always available
-     * for PATCH requests.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.Subject getSubjects(int index) { - return subjects_.get(index); - } - /** - *
-     * Represents the subjects(s) bound to the role. Not always available
-     * for PATCH requests.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.SubjectOrBuilder getSubjectsOrBuilder( - int index) { - return subjects_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ns_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ns_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - if (role_ != null) { - output.writeMessage(3, getRole()); - } - for (int i = 0; i < subjects_.size(); i++) { - output.writeMessage(4, subjects_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ns_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ns_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - if (role_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getRole()); - } - for (int i = 0; i < subjects_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, subjects_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.Kubernetes.Binding)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.Kubernetes.Binding other = (com.google.cloud.securitycenter.v1.Kubernetes.Binding) obj; - - if (!getNs() - .equals(other.getNs())) return false; - if (!getName() - .equals(other.getName())) return false; - if (hasRole() != other.hasRole()) return false; - if (hasRole()) { - if (!getRole() - .equals(other.getRole())) return false; - } - if (!getSubjectsList() - .equals(other.getSubjectsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NS_FIELD_NUMBER; - hash = (53 * hash) + getNs().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasRole()) { - hash = (37 * hash) + ROLE_FIELD_NUMBER; - hash = (53 * hash) + getRole().hashCode(); - } - if (getSubjectsCount() > 0) { - hash = (37 * hash) + SUBJECTS_FIELD_NUMBER; - hash = (53 * hash) + getSubjectsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.Kubernetes.Binding parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Binding parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Binding parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Binding parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Binding parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Binding parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Binding parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Binding parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Binding parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Binding parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Binding parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Binding parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.Kubernetes.Binding prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Represents a Kubernetes RoleBinding or ClusterRoleBinding.
-     * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Kubernetes.Binding} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Kubernetes.Binding) - com.google.cloud.securitycenter.v1.Kubernetes.BindingOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_Binding_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_Binding_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Kubernetes.Binding.class, com.google.cloud.securitycenter.v1.Kubernetes.Binding.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.Kubernetes.Binding.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSubjectsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - ns_ = ""; - - name_ = ""; - - if (roleBuilder_ == null) { - role_ = null; - } else { - role_ = null; - roleBuilder_ = null; - } - if (subjectsBuilder_ == null) { - subjects_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - subjectsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_Binding_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.Binding getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.Kubernetes.Binding.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.Binding build() { - com.google.cloud.securitycenter.v1.Kubernetes.Binding result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.Binding buildPartial() { - com.google.cloud.securitycenter.v1.Kubernetes.Binding result = new com.google.cloud.securitycenter.v1.Kubernetes.Binding(this); - int from_bitField0_ = bitField0_; - result.ns_ = ns_; - result.name_ = name_; - if (roleBuilder_ == null) { - result.role_ = role_; - } else { - result.role_ = roleBuilder_.build(); - } - if (subjectsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - subjects_ = java.util.Collections.unmodifiableList(subjects_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.subjects_ = subjects_; - } else { - result.subjects_ = subjectsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.Kubernetes.Binding) { - return mergeFrom((com.google.cloud.securitycenter.v1.Kubernetes.Binding)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.Kubernetes.Binding other) { - if (other == com.google.cloud.securitycenter.v1.Kubernetes.Binding.getDefaultInstance()) return this; - if (!other.getNs().isEmpty()) { - ns_ = other.ns_; - onChanged(); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.hasRole()) { - mergeRole(other.getRole()); - } - if (subjectsBuilder_ == null) { - if (!other.subjects_.isEmpty()) { - if (subjects_.isEmpty()) { - subjects_ = other.subjects_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSubjectsIsMutable(); - subjects_.addAll(other.subjects_); - } - onChanged(); - } - } else { - if (!other.subjects_.isEmpty()) { - if (subjectsBuilder_.isEmpty()) { - subjectsBuilder_.dispose(); - subjectsBuilder_ = null; - subjects_ = other.subjects_; - bitField0_ = (bitField0_ & ~0x00000001); - subjectsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSubjectsFieldBuilder() : null; - } else { - subjectsBuilder_.addAllMessages(other.subjects_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.Kubernetes.Binding parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.Kubernetes.Binding) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object ns_ = ""; - /** - *
-       * Namespace for binding.
-       * 
- * - * string ns = 1; - * @return The ns. - */ - public java.lang.String getNs() { - java.lang.Object ref = ns_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - ns_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Namespace for binding.
-       * 
- * - * string ns = 1; - * @return The bytes for ns. - */ - public com.google.protobuf.ByteString - getNsBytes() { - java.lang.Object ref = ns_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - ns_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Namespace for binding.
-       * 
- * - * string ns = 1; - * @param value The ns to set. - * @return This builder for chaining. - */ - public Builder setNs( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - ns_ = value; - onChanged(); - return this; - } - /** - *
-       * Namespace for binding.
-       * 
- * - * string ns = 1; - * @return This builder for chaining. - */ - public Builder clearNs() { - - ns_ = getDefaultInstance().getNs(); - onChanged(); - return this; - } - /** - *
-       * Namespace for binding.
-       * 
- * - * string ns = 1; - * @param value The bytes for ns to set. - * @return This builder for chaining. - */ - public Builder setNsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - ns_ = value; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-       * Name for binding.
-       * 
- * - * string name = 2; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Name for binding.
-       * 
- * - * string name = 2; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Name for binding.
-       * 
- * - * string name = 2; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-       * Name for binding.
-       * 
- * - * string name = 2; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-       * Name for binding.
-       * 
- * - * string name = 2; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private com.google.cloud.securitycenter.v1.Kubernetes.Role role_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Kubernetes.Role, com.google.cloud.securitycenter.v1.Kubernetes.Role.Builder, com.google.cloud.securitycenter.v1.Kubernetes.RoleOrBuilder> roleBuilder_; - /** - *
-       * The Role or ClusterRole referenced by the binding.
-       * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Role role = 3; - * @return Whether the role field is set. - */ - public boolean hasRole() { - return roleBuilder_ != null || role_ != null; - } - /** - *
-       * The Role or ClusterRole referenced by the binding.
-       * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Role role = 3; - * @return The role. - */ - public com.google.cloud.securitycenter.v1.Kubernetes.Role getRole() { - if (roleBuilder_ == null) { - return role_ == null ? com.google.cloud.securitycenter.v1.Kubernetes.Role.getDefaultInstance() : role_; - } else { - return roleBuilder_.getMessage(); - } - } - /** - *
-       * The Role or ClusterRole referenced by the binding.
-       * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Role role = 3; - */ - public Builder setRole(com.google.cloud.securitycenter.v1.Kubernetes.Role value) { - if (roleBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - role_ = value; - onChanged(); - } else { - roleBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * The Role or ClusterRole referenced by the binding.
-       * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Role role = 3; - */ - public Builder setRole( - com.google.cloud.securitycenter.v1.Kubernetes.Role.Builder builderForValue) { - if (roleBuilder_ == null) { - role_ = builderForValue.build(); - onChanged(); - } else { - roleBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * The Role or ClusterRole referenced by the binding.
-       * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Role role = 3; - */ - public Builder mergeRole(com.google.cloud.securitycenter.v1.Kubernetes.Role value) { - if (roleBuilder_ == null) { - if (role_ != null) { - role_ = - com.google.cloud.securitycenter.v1.Kubernetes.Role.newBuilder(role_).mergeFrom(value).buildPartial(); - } else { - role_ = value; - } - onChanged(); - } else { - roleBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * The Role or ClusterRole referenced by the binding.
-       * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Role role = 3; - */ - public Builder clearRole() { - if (roleBuilder_ == null) { - role_ = null; - onChanged(); - } else { - role_ = null; - roleBuilder_ = null; - } - - return this; - } - /** - *
-       * The Role or ClusterRole referenced by the binding.
-       * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Role role = 3; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.Role.Builder getRoleBuilder() { - - onChanged(); - return getRoleFieldBuilder().getBuilder(); - } - /** - *
-       * The Role or ClusterRole referenced by the binding.
-       * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Role role = 3; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.RoleOrBuilder getRoleOrBuilder() { - if (roleBuilder_ != null) { - return roleBuilder_.getMessageOrBuilder(); - } else { - return role_ == null ? - com.google.cloud.securitycenter.v1.Kubernetes.Role.getDefaultInstance() : role_; - } - } - /** - *
-       * The Role or ClusterRole referenced by the binding.
-       * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Role role = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Kubernetes.Role, com.google.cloud.securitycenter.v1.Kubernetes.Role.Builder, com.google.cloud.securitycenter.v1.Kubernetes.RoleOrBuilder> - getRoleFieldBuilder() { - if (roleBuilder_ == null) { - roleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.securitycenter.v1.Kubernetes.Role, com.google.cloud.securitycenter.v1.Kubernetes.Role.Builder, com.google.cloud.securitycenter.v1.Kubernetes.RoleOrBuilder>( - getRole(), - getParentForChildren(), - isClean()); - role_ = null; - } - return roleBuilder_; - } - - private java.util.List subjects_ = - java.util.Collections.emptyList(); - private void ensureSubjectsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - subjects_ = new java.util.ArrayList(subjects_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Kubernetes.Subject, com.google.cloud.securitycenter.v1.Kubernetes.Subject.Builder, com.google.cloud.securitycenter.v1.Kubernetes.SubjectOrBuilder> subjectsBuilder_; - - /** - *
-       * Represents the subjects(s) bound to the role. Not always available
-       * for PATCH requests.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; - */ - public java.util.List getSubjectsList() { - if (subjectsBuilder_ == null) { - return java.util.Collections.unmodifiableList(subjects_); - } else { - return subjectsBuilder_.getMessageList(); - } - } - /** - *
-       * Represents the subjects(s) bound to the role. Not always available
-       * for PATCH requests.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; - */ - public int getSubjectsCount() { - if (subjectsBuilder_ == null) { - return subjects_.size(); - } else { - return subjectsBuilder_.getCount(); - } - } - /** - *
-       * Represents the subjects(s) bound to the role. Not always available
-       * for PATCH requests.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.Subject getSubjects(int index) { - if (subjectsBuilder_ == null) { - return subjects_.get(index); - } else { - return subjectsBuilder_.getMessage(index); - } - } - /** - *
-       * Represents the subjects(s) bound to the role. Not always available
-       * for PATCH requests.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; - */ - public Builder setSubjects( - int index, com.google.cloud.securitycenter.v1.Kubernetes.Subject value) { - if (subjectsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectsIsMutable(); - subjects_.set(index, value); - onChanged(); - } else { - subjectsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Represents the subjects(s) bound to the role. Not always available
-       * for PATCH requests.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; - */ - public Builder setSubjects( - int index, com.google.cloud.securitycenter.v1.Kubernetes.Subject.Builder builderForValue) { - if (subjectsBuilder_ == null) { - ensureSubjectsIsMutable(); - subjects_.set(index, builderForValue.build()); - onChanged(); - } else { - subjectsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Represents the subjects(s) bound to the role. Not always available
-       * for PATCH requests.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; - */ - public Builder addSubjects(com.google.cloud.securitycenter.v1.Kubernetes.Subject value) { - if (subjectsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectsIsMutable(); - subjects_.add(value); - onChanged(); - } else { - subjectsBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Represents the subjects(s) bound to the role. Not always available
-       * for PATCH requests.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; - */ - public Builder addSubjects( - int index, com.google.cloud.securitycenter.v1.Kubernetes.Subject value) { - if (subjectsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectsIsMutable(); - subjects_.add(index, value); - onChanged(); - } else { - subjectsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Represents the subjects(s) bound to the role. Not always available
-       * for PATCH requests.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; - */ - public Builder addSubjects( - com.google.cloud.securitycenter.v1.Kubernetes.Subject.Builder builderForValue) { - if (subjectsBuilder_ == null) { - ensureSubjectsIsMutable(); - subjects_.add(builderForValue.build()); - onChanged(); - } else { - subjectsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Represents the subjects(s) bound to the role. Not always available
-       * for PATCH requests.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; - */ - public Builder addSubjects( - int index, com.google.cloud.securitycenter.v1.Kubernetes.Subject.Builder builderForValue) { - if (subjectsBuilder_ == null) { - ensureSubjectsIsMutable(); - subjects_.add(index, builderForValue.build()); - onChanged(); - } else { - subjectsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Represents the subjects(s) bound to the role. Not always available
-       * for PATCH requests.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; - */ - public Builder addAllSubjects( - java.lang.Iterable values) { - if (subjectsBuilder_ == null) { - ensureSubjectsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, subjects_); - onChanged(); - } else { - subjectsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Represents the subjects(s) bound to the role. Not always available
-       * for PATCH requests.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; - */ - public Builder clearSubjects() { - if (subjectsBuilder_ == null) { - subjects_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - subjectsBuilder_.clear(); - } - return this; - } - /** - *
-       * Represents the subjects(s) bound to the role. Not always available
-       * for PATCH requests.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; - */ - public Builder removeSubjects(int index) { - if (subjectsBuilder_ == null) { - ensureSubjectsIsMutable(); - subjects_.remove(index); - onChanged(); - } else { - subjectsBuilder_.remove(index); - } - return this; - } - /** - *
-       * Represents the subjects(s) bound to the role. Not always available
-       * for PATCH requests.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.Subject.Builder getSubjectsBuilder( - int index) { - return getSubjectsFieldBuilder().getBuilder(index); - } - /** - *
-       * Represents the subjects(s) bound to the role. Not always available
-       * for PATCH requests.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.SubjectOrBuilder getSubjectsOrBuilder( - int index) { - if (subjectsBuilder_ == null) { - return subjects_.get(index); } else { - return subjectsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Represents the subjects(s) bound to the role. Not always available
-       * for PATCH requests.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; - */ - public java.util.List - getSubjectsOrBuilderList() { - if (subjectsBuilder_ != null) { - return subjectsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(subjects_); - } - } - /** - *
-       * Represents the subjects(s) bound to the role. Not always available
-       * for PATCH requests.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.Subject.Builder addSubjectsBuilder() { - return getSubjectsFieldBuilder().addBuilder( - com.google.cloud.securitycenter.v1.Kubernetes.Subject.getDefaultInstance()); - } - /** - *
-       * Represents the subjects(s) bound to the role. Not always available
-       * for PATCH requests.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.Subject.Builder addSubjectsBuilder( - int index) { - return getSubjectsFieldBuilder().addBuilder( - index, com.google.cloud.securitycenter.v1.Kubernetes.Subject.getDefaultInstance()); - } - /** - *
-       * Represents the subjects(s) bound to the role. Not always available
-       * for PATCH requests.
-       * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; - */ - public java.util.List - getSubjectsBuilderList() { - return getSubjectsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Kubernetes.Subject, com.google.cloud.securitycenter.v1.Kubernetes.Subject.Builder, com.google.cloud.securitycenter.v1.Kubernetes.SubjectOrBuilder> - getSubjectsFieldBuilder() { - if (subjectsBuilder_ == null) { - subjectsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Kubernetes.Subject, com.google.cloud.securitycenter.v1.Kubernetes.Subject.Builder, com.google.cloud.securitycenter.v1.Kubernetes.SubjectOrBuilder>( - subjects_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - subjects_ = null; - } - return subjectsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Kubernetes.Binding) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Kubernetes.Binding) - private static final com.google.cloud.securitycenter.v1.Kubernetes.Binding DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Kubernetes.Binding(); - } - - public static com.google.cloud.securitycenter.v1.Kubernetes.Binding getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Binding parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Binding(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.Binding getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface SubjectOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Kubernetes.Subject) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Authentication type for subject.
-     * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType kind = 1; - * @return The enum numeric value on the wire for kind. - */ - int getKindValue(); - /** - *
-     * Authentication type for subject.
-     * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType kind = 1; - * @return The kind. - */ - com.google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType getKind(); - - /** - *
-     * Namespace for subject.
-     * 
- * - * string ns = 2; - * @return The ns. - */ - java.lang.String getNs(); - /** - *
-     * Namespace for subject.
-     * 
- * - * string ns = 2; - * @return The bytes for ns. - */ - com.google.protobuf.ByteString - getNsBytes(); - - /** - *
-     * Name for subject.
-     * 
- * - * string name = 3; - * @return The name. - */ - java.lang.String getName(); - /** - *
-     * Name for subject.
-     * 
- * - * string name = 3; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - } - /** - *
-   * Represents a Kubernetes Subject.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Kubernetes.Subject} - */ - public static final class Subject extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Kubernetes.Subject) - SubjectOrBuilder { - private static final long serialVersionUID = 0L; - // Use Subject.newBuilder() to construct. - private Subject(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Subject() { - kind_ = 0; - ns_ = ""; - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Subject(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Subject( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - kind_ = rawValue; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - ns_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_Subject_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_Subject_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Kubernetes.Subject.class, com.google.cloud.securitycenter.v1.Kubernetes.Subject.Builder.class); - } - - /** - *
-     * Auth types that can be used for Subject's kind field.
-     * 
- * - * Protobuf enum {@code google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType} - */ - public enum AuthType - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-       * Authentication is not specified.
-       * 
- * - * AUTH_TYPE_UNSPECIFIED = 0; - */ - AUTH_TYPE_UNSPECIFIED(0), - /** - *
-       * User with valid certificate.
-       * 
- * - * USER = 1; - */ - USER(1), - /** - *
-       * Users managed by Kubernetes API with credentials stored as Secrets.
-       * 
- * - * SERVICEACCOUNT = 2; - */ - SERVICEACCOUNT(2), - /** - *
-       * Collection of users.
-       * 
- * - * GROUP = 3; - */ - GROUP(3), - UNRECOGNIZED(-1), - ; - - /** - *
-       * Authentication is not specified.
-       * 
- * - * AUTH_TYPE_UNSPECIFIED = 0; - */ - public static final int AUTH_TYPE_UNSPECIFIED_VALUE = 0; - /** - *
-       * User with valid certificate.
-       * 
- * - * USER = 1; - */ - public static final int USER_VALUE = 1; - /** - *
-       * Users managed by Kubernetes API with credentials stored as Secrets.
-       * 
- * - * SERVICEACCOUNT = 2; - */ - public static final int SERVICEACCOUNT_VALUE = 2; - /** - *
-       * Collection of users.
-       * 
- * - * GROUP = 3; - */ - public static final int GROUP_VALUE = 3; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AuthType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static AuthType forNumber(int value) { - switch (value) { - case 0: return AUTH_TYPE_UNSPECIFIED; - case 1: return USER; - case 2: return SERVICEACCOUNT; - case 3: return GROUP; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - AuthType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public AuthType findValueByNumber(int number) { - return AuthType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.Kubernetes.Subject.getDescriptor().getEnumTypes().get(0); - } - - private static final AuthType[] VALUES = values(); - - public static AuthType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private AuthType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType) - } - - public static final int KIND_FIELD_NUMBER = 1; - private int kind_; - /** - *
-     * Authentication type for subject.
-     * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType kind = 1; - * @return The enum numeric value on the wire for kind. - */ - @java.lang.Override public int getKindValue() { - return kind_; - } - /** - *
-     * Authentication type for subject.
-     * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType kind = 1; - * @return The kind. - */ - @java.lang.Override public com.google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType getKind() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType result = com.google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType.valueOf(kind_); - return result == null ? com.google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType.UNRECOGNIZED : result; - } - - public static final int NS_FIELD_NUMBER = 2; - private volatile java.lang.Object ns_; - /** - *
-     * Namespace for subject.
-     * 
- * - * string ns = 2; - * @return The ns. - */ - @java.lang.Override - public java.lang.String getNs() { - java.lang.Object ref = ns_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - ns_ = s; - return s; - } - } - /** - *
-     * Namespace for subject.
-     * 
- * - * string ns = 2; - * @return The bytes for ns. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNsBytes() { - java.lang.Object ref = ns_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - ns_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object name_; - /** - *
-     * Name for subject.
-     * 
- * - * string name = 3; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-     * Name for subject.
-     * 
- * - * string name = 3; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (kind_ != com.google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType.AUTH_TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, kind_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ns_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ns_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (kind_ != com.google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType.AUTH_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, kind_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ns_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ns_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.Kubernetes.Subject)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.Kubernetes.Subject other = (com.google.cloud.securitycenter.v1.Kubernetes.Subject) obj; - - if (kind_ != other.kind_) return false; - if (!getNs() - .equals(other.getNs())) return false; - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + KIND_FIELD_NUMBER; - hash = (53 * hash) + kind_; - hash = (37 * hash) + NS_FIELD_NUMBER; - hash = (53 * hash) + getNs().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.Kubernetes.Subject parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Subject parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Subject parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Subject parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Subject parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Subject parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Subject parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Subject parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Subject parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Subject parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Subject parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.Subject parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.Kubernetes.Subject prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Represents a Kubernetes Subject.
-     * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Kubernetes.Subject} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Kubernetes.Subject) - com.google.cloud.securitycenter.v1.Kubernetes.SubjectOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_Subject_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_Subject_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Kubernetes.Subject.class, com.google.cloud.securitycenter.v1.Kubernetes.Subject.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.Kubernetes.Subject.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - kind_ = 0; - - ns_ = ""; - - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_Subject_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.Subject getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.Kubernetes.Subject.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.Subject build() { - com.google.cloud.securitycenter.v1.Kubernetes.Subject result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.Subject buildPartial() { - com.google.cloud.securitycenter.v1.Kubernetes.Subject result = new com.google.cloud.securitycenter.v1.Kubernetes.Subject(this); - result.kind_ = kind_; - result.ns_ = ns_; - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.Kubernetes.Subject) { - return mergeFrom((com.google.cloud.securitycenter.v1.Kubernetes.Subject)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.Kubernetes.Subject other) { - if (other == com.google.cloud.securitycenter.v1.Kubernetes.Subject.getDefaultInstance()) return this; - if (other.kind_ != 0) { - setKindValue(other.getKindValue()); - } - if (!other.getNs().isEmpty()) { - ns_ = other.ns_; - onChanged(); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.Kubernetes.Subject parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.Kubernetes.Subject) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int kind_ = 0; - /** - *
-       * Authentication type for subject.
-       * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType kind = 1; - * @return The enum numeric value on the wire for kind. - */ - @java.lang.Override public int getKindValue() { - return kind_; - } - /** - *
-       * Authentication type for subject.
-       * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType kind = 1; - * @param value The enum numeric value on the wire for kind to set. - * @return This builder for chaining. - */ - public Builder setKindValue(int value) { - - kind_ = value; - onChanged(); - return this; - } - /** - *
-       * Authentication type for subject.
-       * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType kind = 1; - * @return The kind. - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType getKind() { - @SuppressWarnings("deprecation") - com.google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType result = com.google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType.valueOf(kind_); - return result == null ? com.google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType.UNRECOGNIZED : result; - } - /** - *
-       * Authentication type for subject.
-       * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType kind = 1; - * @param value The kind to set. - * @return This builder for chaining. - */ - public Builder setKind(com.google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType value) { - if (value == null) { - throw new NullPointerException(); - } - - kind_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * Authentication type for subject.
-       * 
- * - * .google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType kind = 1; - * @return This builder for chaining. - */ - public Builder clearKind() { - - kind_ = 0; - onChanged(); - return this; - } - - private java.lang.Object ns_ = ""; - /** - *
-       * Namespace for subject.
-       * 
- * - * string ns = 2; - * @return The ns. - */ - public java.lang.String getNs() { - java.lang.Object ref = ns_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - ns_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Namespace for subject.
-       * 
- * - * string ns = 2; - * @return The bytes for ns. - */ - public com.google.protobuf.ByteString - getNsBytes() { - java.lang.Object ref = ns_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - ns_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Namespace for subject.
-       * 
- * - * string ns = 2; - * @param value The ns to set. - * @return This builder for chaining. - */ - public Builder setNs( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - ns_ = value; - onChanged(); - return this; - } - /** - *
-       * Namespace for subject.
-       * 
- * - * string ns = 2; - * @return This builder for chaining. - */ - public Builder clearNs() { - - ns_ = getDefaultInstance().getNs(); - onChanged(); - return this; - } - /** - *
-       * Namespace for subject.
-       * 
- * - * string ns = 2; - * @param value The bytes for ns to set. - * @return This builder for chaining. - */ - public Builder setNsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - ns_ = value; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-       * Name for subject.
-       * 
- * - * string name = 3; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Name for subject.
-       * 
- * - * string name = 3; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Name for subject.
-       * 
- * - * string name = 3; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-       * Name for subject.
-       * 
- * - * string name = 3; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-       * Name for subject.
-       * 
- * - * string name = 3; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Kubernetes.Subject) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Kubernetes.Subject) - private static final com.google.cloud.securitycenter.v1.Kubernetes.Subject DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Kubernetes.Subject(); - } - - public static com.google.cloud.securitycenter.v1.Kubernetes.Subject getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Subject parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Subject(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.Subject getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface AccessReviewOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Kubernetes.AccessReview) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Group is the API Group of the Resource. "*" means all.
-     * 
- * - * string group = 1; - * @return The group. - */ - java.lang.String getGroup(); - /** - *
-     * Group is the API Group of the Resource. "*" means all.
-     * 
- * - * string group = 1; - * @return The bytes for group. - */ - com.google.protobuf.ByteString - getGroupBytes(); - - /** - *
-     * Namespace of the action being requested. Currently, there is no
-     * distinction between no namespace and all namespaces.  Both
-     * are represented by "" (empty).
-     * 
- * - * string ns = 2; - * @return The ns. - */ - java.lang.String getNs(); - /** - *
-     * Namespace of the action being requested. Currently, there is no
-     * distinction between no namespace and all namespaces.  Both
-     * are represented by "" (empty).
-     * 
- * - * string ns = 2; - * @return The bytes for ns. - */ - com.google.protobuf.ByteString - getNsBytes(); - - /** - *
-     * Name is the name of the resource being requested. Empty means all.
-     * 
- * - * string name = 3; - * @return The name. - */ - java.lang.String getName(); - /** - *
-     * Name is the name of the resource being requested. Empty means all.
-     * 
- * - * string name = 3; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-     * Resource is the optional resource type requested. "*" means all.
-     * 
- * - * string resource = 4; - * @return The resource. - */ - java.lang.String getResource(); - /** - *
-     * Resource is the optional resource type requested. "*" means all.
-     * 
- * - * string resource = 4; - * @return The bytes for resource. - */ - com.google.protobuf.ByteString - getResourceBytes(); - - /** - *
-     * Subresource is the optional subresource type.
-     * 
- * - * string subresource = 5; - * @return The subresource. - */ - java.lang.String getSubresource(); - /** - *
-     * Subresource is the optional subresource type.
-     * 
- * - * string subresource = 5; - * @return The bytes for subresource. - */ - com.google.protobuf.ByteString - getSubresourceBytes(); - - /** - *
-     * Verb is a Kubernetes resource API verb, like: get, list, watch, create,
-     * update, delete, proxy. "*" means all.
-     * 
- * - * string verb = 6; - * @return The verb. - */ - java.lang.String getVerb(); - /** - *
-     * Verb is a Kubernetes resource API verb, like: get, list, watch, create,
-     * update, delete, proxy. "*" means all.
-     * 
- * - * string verb = 6; - * @return The bytes for verb. - */ - com.google.protobuf.ByteString - getVerbBytes(); - - /** - *
-     * Version is the API Version of the Resource. "*" means all.
-     * 
- * - * string version = 7; - * @return The version. - */ - java.lang.String getVersion(); - /** - *
-     * Version is the API Version of the Resource. "*" means all.
-     * 
- * - * string version = 7; - * @return The bytes for version. - */ - com.google.protobuf.ByteString - getVersionBytes(); - } - /** - *
-   * Conveys information about a Kubernetes access review (e.g. kubectl auth
-   * can-i ...) that was involved in a finding.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Kubernetes.AccessReview} - */ - public static final class AccessReview extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Kubernetes.AccessReview) - AccessReviewOrBuilder { - private static final long serialVersionUID = 0L; - // Use AccessReview.newBuilder() to construct. - private AccessReview(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AccessReview() { - group_ = ""; - ns_ = ""; - name_ = ""; - resource_ = ""; - subresource_ = ""; - verb_ = ""; - version_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AccessReview(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AccessReview( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - group_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - ns_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - subresource_ = s; - break; - } - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - - verb_ = s; - break; - } - case 58: { - java.lang.String s = input.readStringRequireUtf8(); - - version_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_AccessReview_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_AccessReview_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Kubernetes.AccessReview.class, com.google.cloud.securitycenter.v1.Kubernetes.AccessReview.Builder.class); - } - - public static final int GROUP_FIELD_NUMBER = 1; - private volatile java.lang.Object group_; - /** - *
-     * Group is the API Group of the Resource. "*" means all.
-     * 
- * - * string group = 1; - * @return The group. - */ - @java.lang.Override - public java.lang.String getGroup() { - java.lang.Object ref = group_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - group_ = s; - return s; - } - } - /** - *
-     * Group is the API Group of the Resource. "*" means all.
-     * 
- * - * string group = 1; - * @return The bytes for group. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getGroupBytes() { - java.lang.Object ref = group_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - group_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NS_FIELD_NUMBER = 2; - private volatile java.lang.Object ns_; - /** - *
-     * Namespace of the action being requested. Currently, there is no
-     * distinction between no namespace and all namespaces.  Both
-     * are represented by "" (empty).
-     * 
- * - * string ns = 2; - * @return The ns. - */ - @java.lang.Override - public java.lang.String getNs() { - java.lang.Object ref = ns_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - ns_ = s; - return s; - } - } - /** - *
-     * Namespace of the action being requested. Currently, there is no
-     * distinction between no namespace and all namespaces.  Both
-     * are represented by "" (empty).
-     * 
- * - * string ns = 2; - * @return The bytes for ns. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNsBytes() { - java.lang.Object ref = ns_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - ns_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object name_; - /** - *
-     * Name is the name of the resource being requested. Empty means all.
-     * 
- * - * string name = 3; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-     * Name is the name of the resource being requested. Empty means all.
-     * 
- * - * string name = 3; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESOURCE_FIELD_NUMBER = 4; - private volatile java.lang.Object resource_; - /** - *
-     * Resource is the optional resource type requested. "*" means all.
-     * 
- * - * string resource = 4; - * @return The resource. - */ - @java.lang.Override - public java.lang.String getResource() { - java.lang.Object ref = resource_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resource_ = s; - return s; - } - } - /** - *
-     * Resource is the optional resource type requested. "*" means all.
-     * 
- * - * string resource = 4; - * @return The bytes for resource. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getResourceBytes() { - java.lang.Object ref = resource_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SUBRESOURCE_FIELD_NUMBER = 5; - private volatile java.lang.Object subresource_; - /** - *
-     * Subresource is the optional subresource type.
-     * 
- * - * string subresource = 5; - * @return The subresource. - */ - @java.lang.Override - public java.lang.String getSubresource() { - java.lang.Object ref = subresource_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - subresource_ = s; - return s; - } - } - /** - *
-     * Subresource is the optional subresource type.
-     * 
- * - * string subresource = 5; - * @return The bytes for subresource. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSubresourceBytes() { - java.lang.Object ref = subresource_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - subresource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VERB_FIELD_NUMBER = 6; - private volatile java.lang.Object verb_; - /** - *
-     * Verb is a Kubernetes resource API verb, like: get, list, watch, create,
-     * update, delete, proxy. "*" means all.
-     * 
- * - * string verb = 6; - * @return The verb. - */ - @java.lang.Override - public java.lang.String getVerb() { - java.lang.Object ref = verb_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - verb_ = s; - return s; - } - } - /** - *
-     * Verb is a Kubernetes resource API verb, like: get, list, watch, create,
-     * update, delete, proxy. "*" means all.
-     * 
- * - * string verb = 6; - * @return The bytes for verb. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getVerbBytes() { - java.lang.Object ref = verb_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - verb_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VERSION_FIELD_NUMBER = 7; - private volatile java.lang.Object version_; - /** - *
-     * Version is the API Version of the Resource. "*" means all.
-     * 
- * - * string version = 7; - * @return The version. - */ - @java.lang.Override - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } - } - /** - *
-     * Version is the API Version of the Resource. "*" means all.
-     * 
- * - * string version = 7; - * @return The bytes for version. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(group_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, group_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ns_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ns_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, resource_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subresource_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, subresource_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, verb_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, version_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(group_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, group_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ns_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ns_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, resource_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subresource_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, subresource_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, verb_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, version_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.Kubernetes.AccessReview)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.Kubernetes.AccessReview other = (com.google.cloud.securitycenter.v1.Kubernetes.AccessReview) obj; - - if (!getGroup() - .equals(other.getGroup())) return false; - if (!getNs() - .equals(other.getNs())) return false; - if (!getName() - .equals(other.getName())) return false; - if (!getResource() - .equals(other.getResource())) return false; - if (!getSubresource() - .equals(other.getSubresource())) return false; - if (!getVerb() - .equals(other.getVerb())) return false; - if (!getVersion() - .equals(other.getVersion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + GROUP_FIELD_NUMBER; - hash = (53 * hash) + getGroup().hashCode(); - hash = (37 * hash) + NS_FIELD_NUMBER; - hash = (53 * hash) + getNs().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + RESOURCE_FIELD_NUMBER; - hash = (53 * hash) + getResource().hashCode(); - hash = (37 * hash) + SUBRESOURCE_FIELD_NUMBER; - hash = (53 * hash) + getSubresource().hashCode(); - hash = (37 * hash) + VERB_FIELD_NUMBER; - hash = (53 * hash) + getVerb().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.Kubernetes.AccessReview parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.AccessReview parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.AccessReview parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.AccessReview parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.AccessReview parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.AccessReview parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.AccessReview parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.AccessReview parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.AccessReview parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.AccessReview parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.AccessReview parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Kubernetes.AccessReview parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.Kubernetes.AccessReview prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Conveys information about a Kubernetes access review (e.g. kubectl auth
-     * can-i ...) that was involved in a finding.
-     * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Kubernetes.AccessReview} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Kubernetes.AccessReview) - com.google.cloud.securitycenter.v1.Kubernetes.AccessReviewOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_AccessReview_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_AccessReview_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Kubernetes.AccessReview.class, com.google.cloud.securitycenter.v1.Kubernetes.AccessReview.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.Kubernetes.AccessReview.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - group_ = ""; - - ns_ = ""; - - name_ = ""; - - resource_ = ""; - - subresource_ = ""; - - verb_ = ""; - - version_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_AccessReview_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.AccessReview getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.Kubernetes.AccessReview.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.AccessReview build() { - com.google.cloud.securitycenter.v1.Kubernetes.AccessReview result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.AccessReview buildPartial() { - com.google.cloud.securitycenter.v1.Kubernetes.AccessReview result = new com.google.cloud.securitycenter.v1.Kubernetes.AccessReview(this); - result.group_ = group_; - result.ns_ = ns_; - result.name_ = name_; - result.resource_ = resource_; - result.subresource_ = subresource_; - result.verb_ = verb_; - result.version_ = version_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.Kubernetes.AccessReview) { - return mergeFrom((com.google.cloud.securitycenter.v1.Kubernetes.AccessReview)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.Kubernetes.AccessReview other) { - if (other == com.google.cloud.securitycenter.v1.Kubernetes.AccessReview.getDefaultInstance()) return this; - if (!other.getGroup().isEmpty()) { - group_ = other.group_; - onChanged(); - } - if (!other.getNs().isEmpty()) { - ns_ = other.ns_; - onChanged(); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getResource().isEmpty()) { - resource_ = other.resource_; - onChanged(); - } - if (!other.getSubresource().isEmpty()) { - subresource_ = other.subresource_; - onChanged(); - } - if (!other.getVerb().isEmpty()) { - verb_ = other.verb_; - onChanged(); - } - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.Kubernetes.AccessReview parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.Kubernetes.AccessReview) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object group_ = ""; - /** - *
-       * Group is the API Group of the Resource. "*" means all.
-       * 
- * - * string group = 1; - * @return The group. - */ - public java.lang.String getGroup() { - java.lang.Object ref = group_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - group_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Group is the API Group of the Resource. "*" means all.
-       * 
- * - * string group = 1; - * @return The bytes for group. - */ - public com.google.protobuf.ByteString - getGroupBytes() { - java.lang.Object ref = group_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - group_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Group is the API Group of the Resource. "*" means all.
-       * 
- * - * string group = 1; - * @param value The group to set. - * @return This builder for chaining. - */ - public Builder setGroup( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - group_ = value; - onChanged(); - return this; - } - /** - *
-       * Group is the API Group of the Resource. "*" means all.
-       * 
- * - * string group = 1; - * @return This builder for chaining. - */ - public Builder clearGroup() { - - group_ = getDefaultInstance().getGroup(); - onChanged(); - return this; - } - /** - *
-       * Group is the API Group of the Resource. "*" means all.
-       * 
- * - * string group = 1; - * @param value The bytes for group to set. - * @return This builder for chaining. - */ - public Builder setGroupBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - group_ = value; - onChanged(); - return this; - } - - private java.lang.Object ns_ = ""; - /** - *
-       * Namespace of the action being requested. Currently, there is no
-       * distinction between no namespace and all namespaces.  Both
-       * are represented by "" (empty).
-       * 
- * - * string ns = 2; - * @return The ns. - */ - public java.lang.String getNs() { - java.lang.Object ref = ns_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - ns_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Namespace of the action being requested. Currently, there is no
-       * distinction between no namespace and all namespaces.  Both
-       * are represented by "" (empty).
-       * 
- * - * string ns = 2; - * @return The bytes for ns. - */ - public com.google.protobuf.ByteString - getNsBytes() { - java.lang.Object ref = ns_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - ns_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Namespace of the action being requested. Currently, there is no
-       * distinction between no namespace and all namespaces.  Both
-       * are represented by "" (empty).
-       * 
- * - * string ns = 2; - * @param value The ns to set. - * @return This builder for chaining. - */ - public Builder setNs( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - ns_ = value; - onChanged(); - return this; - } - /** - *
-       * Namespace of the action being requested. Currently, there is no
-       * distinction between no namespace and all namespaces.  Both
-       * are represented by "" (empty).
-       * 
- * - * string ns = 2; - * @return This builder for chaining. - */ - public Builder clearNs() { - - ns_ = getDefaultInstance().getNs(); - onChanged(); - return this; - } - /** - *
-       * Namespace of the action being requested. Currently, there is no
-       * distinction between no namespace and all namespaces.  Both
-       * are represented by "" (empty).
-       * 
- * - * string ns = 2; - * @param value The bytes for ns to set. - * @return This builder for chaining. - */ - public Builder setNsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - ns_ = value; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-       * Name is the name of the resource being requested. Empty means all.
-       * 
- * - * string name = 3; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Name is the name of the resource being requested. Empty means all.
-       * 
- * - * string name = 3; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Name is the name of the resource being requested. Empty means all.
-       * 
- * - * string name = 3; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-       * Name is the name of the resource being requested. Empty means all.
-       * 
- * - * string name = 3; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-       * Name is the name of the resource being requested. Empty means all.
-       * 
- * - * string name = 3; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object resource_ = ""; - /** - *
-       * Resource is the optional resource type requested. "*" means all.
-       * 
- * - * string resource = 4; - * @return The resource. - */ - public java.lang.String getResource() { - java.lang.Object ref = resource_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resource_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Resource is the optional resource type requested. "*" means all.
-       * 
- * - * string resource = 4; - * @return The bytes for resource. - */ - public com.google.protobuf.ByteString - getResourceBytes() { - java.lang.Object ref = resource_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Resource is the optional resource type requested. "*" means all.
-       * 
- * - * string resource = 4; - * @param value The resource to set. - * @return This builder for chaining. - */ - public Builder setResource( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resource_ = value; - onChanged(); - return this; - } - /** - *
-       * Resource is the optional resource type requested. "*" means all.
-       * 
- * - * string resource = 4; - * @return This builder for chaining. - */ - public Builder clearResource() { - - resource_ = getDefaultInstance().getResource(); - onChanged(); - return this; - } - /** - *
-       * Resource is the optional resource type requested. "*" means all.
-       * 
- * - * string resource = 4; - * @param value The bytes for resource to set. - * @return This builder for chaining. - */ - public Builder setResourceBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resource_ = value; - onChanged(); - return this; - } - - private java.lang.Object subresource_ = ""; - /** - *
-       * Subresource is the optional subresource type.
-       * 
- * - * string subresource = 5; - * @return The subresource. - */ - public java.lang.String getSubresource() { - java.lang.Object ref = subresource_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - subresource_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Subresource is the optional subresource type.
-       * 
- * - * string subresource = 5; - * @return The bytes for subresource. - */ - public com.google.protobuf.ByteString - getSubresourceBytes() { - java.lang.Object ref = subresource_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - subresource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Subresource is the optional subresource type.
-       * 
- * - * string subresource = 5; - * @param value The subresource to set. - * @return This builder for chaining. - */ - public Builder setSubresource( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - subresource_ = value; - onChanged(); - return this; - } - /** - *
-       * Subresource is the optional subresource type.
-       * 
- * - * string subresource = 5; - * @return This builder for chaining. - */ - public Builder clearSubresource() { - - subresource_ = getDefaultInstance().getSubresource(); - onChanged(); - return this; - } - /** - *
-       * Subresource is the optional subresource type.
-       * 
- * - * string subresource = 5; - * @param value The bytes for subresource to set. - * @return This builder for chaining. - */ - public Builder setSubresourceBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - subresource_ = value; - onChanged(); - return this; - } - - private java.lang.Object verb_ = ""; - /** - *
-       * Verb is a Kubernetes resource API verb, like: get, list, watch, create,
-       * update, delete, proxy. "*" means all.
-       * 
- * - * string verb = 6; - * @return The verb. - */ - public java.lang.String getVerb() { - java.lang.Object ref = verb_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - verb_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Verb is a Kubernetes resource API verb, like: get, list, watch, create,
-       * update, delete, proxy. "*" means all.
-       * 
- * - * string verb = 6; - * @return The bytes for verb. - */ - public com.google.protobuf.ByteString - getVerbBytes() { - java.lang.Object ref = verb_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - verb_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Verb is a Kubernetes resource API verb, like: get, list, watch, create,
-       * update, delete, proxy. "*" means all.
-       * 
- * - * string verb = 6; - * @param value The verb to set. - * @return This builder for chaining. - */ - public Builder setVerb( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - verb_ = value; - onChanged(); - return this; - } - /** - *
-       * Verb is a Kubernetes resource API verb, like: get, list, watch, create,
-       * update, delete, proxy. "*" means all.
-       * 
- * - * string verb = 6; - * @return This builder for chaining. - */ - public Builder clearVerb() { - - verb_ = getDefaultInstance().getVerb(); - onChanged(); - return this; - } - /** - *
-       * Verb is a Kubernetes resource API verb, like: get, list, watch, create,
-       * update, delete, proxy. "*" means all.
-       * 
- * - * string verb = 6; - * @param value The bytes for verb to set. - * @return This builder for chaining. - */ - public Builder setVerbBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - verb_ = value; - onChanged(); - return this; - } - - private java.lang.Object version_ = ""; - /** - *
-       * Version is the API Version of the Resource. "*" means all.
-       * 
- * - * string version = 7; - * @return The version. - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Version is the API Version of the Resource. "*" means all.
-       * 
- * - * string version = 7; - * @return The bytes for version. - */ - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Version is the API Version of the Resource. "*" means all.
-       * 
- * - * string version = 7; - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - version_ = value; - onChanged(); - return this; - } - /** - *
-       * Version is the API Version of the Resource. "*" means all.
-       * 
- * - * string version = 7; - * @return This builder for chaining. - */ - public Builder clearVersion() { - - version_ = getDefaultInstance().getVersion(); - onChanged(); - return this; - } - /** - *
-       * Version is the API Version of the Resource. "*" means all.
-       * 
- * - * string version = 7; - * @param value The bytes for version to set. - * @return This builder for chaining. - */ - public Builder setVersionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - version_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Kubernetes.AccessReview) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Kubernetes.AccessReview) - private static final com.google.cloud.securitycenter.v1.Kubernetes.AccessReview DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Kubernetes.AccessReview(); - } - - public static com.google.cloud.securitycenter.v1.Kubernetes.AccessReview getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AccessReview parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AccessReview(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.AccessReview getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int PODS_FIELD_NUMBER = 1; - private java.util.List pods_; - /** - *
-   * Kubernetes Pods associated with the finding. This field will contain Pod
-   * records for each container that is owned by a Pod.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; - */ - @java.lang.Override - public java.util.List getPodsList() { - return pods_; - } - /** - *
-   * Kubernetes Pods associated with the finding. This field will contain Pod
-   * records for each container that is owned by a Pod.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; - */ - @java.lang.Override - public java.util.List - getPodsOrBuilderList() { - return pods_; - } - /** - *
-   * Kubernetes Pods associated with the finding. This field will contain Pod
-   * records for each container that is owned by a Pod.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; - */ - @java.lang.Override - public int getPodsCount() { - return pods_.size(); - } - /** - *
-   * Kubernetes Pods associated with the finding. This field will contain Pod
-   * records for each container that is owned by a Pod.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.Pod getPods(int index) { - return pods_.get(index); - } - /** - *
-   * Kubernetes Pods associated with the finding. This field will contain Pod
-   * records for each container that is owned by a Pod.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.PodOrBuilder getPodsOrBuilder( - int index) { - return pods_.get(index); - } - - public static final int NODES_FIELD_NUMBER = 2; - private java.util.List nodes_; - /** - *
-   * Provides Kubernetes Node information.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - @java.lang.Override - public java.util.List getNodesList() { - return nodes_; - } - /** - *
-   * Provides Kubernetes Node information.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - @java.lang.Override - public java.util.List - getNodesOrBuilderList() { - return nodes_; - } - /** - *
-   * Provides Kubernetes Node information.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - @java.lang.Override - public int getNodesCount() { - return nodes_.size(); - } - /** - *
-   * Provides Kubernetes Node information.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.Node getNodes(int index) { - return nodes_.get(index); - } - /** - *
-   * Provides Kubernetes Node information.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.NodeOrBuilder getNodesOrBuilder( - int index) { - return nodes_.get(index); - } - - public static final int NODE_POOLS_FIELD_NUMBER = 3; - private java.util.List nodePools_; - /** - *
-   * GKE Node Pools associated with the finding. This field will
-   * contain NodePool information for each Node, when it is available.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; - */ - @java.lang.Override - public java.util.List getNodePoolsList() { - return nodePools_; - } - /** - *
-   * GKE Node Pools associated with the finding. This field will
-   * contain NodePool information for each Node, when it is available.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; - */ - @java.lang.Override - public java.util.List - getNodePoolsOrBuilderList() { - return nodePools_; - } - /** - *
-   * GKE Node Pools associated with the finding. This field will
-   * contain NodePool information for each Node, when it is available.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; - */ - @java.lang.Override - public int getNodePoolsCount() { - return nodePools_.size(); - } - /** - *
-   * GKE Node Pools associated with the finding. This field will
-   * contain NodePool information for each Node, when it is available.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.NodePool getNodePools(int index) { - return nodePools_.get(index); - } - /** - *
-   * GKE Node Pools associated with the finding. This field will
-   * contain NodePool information for each Node, when it is available.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.NodePoolOrBuilder getNodePoolsOrBuilder( - int index) { - return nodePools_.get(index); - } - - public static final int ROLES_FIELD_NUMBER = 4; - private java.util.List roles_; - /** - *
-   * Provides Kubernetes role information for findings that involve
-   * Roles or ClusterRoles.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; - */ - @java.lang.Override - public java.util.List getRolesList() { - return roles_; - } - /** - *
-   * Provides Kubernetes role information for findings that involve
-   * Roles or ClusterRoles.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; - */ - @java.lang.Override - public java.util.List - getRolesOrBuilderList() { - return roles_; - } - /** - *
-   * Provides Kubernetes role information for findings that involve
-   * Roles or ClusterRoles.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; - */ - @java.lang.Override - public int getRolesCount() { - return roles_.size(); - } - /** - *
-   * Provides Kubernetes role information for findings that involve
-   * Roles or ClusterRoles.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.Role getRoles(int index) { - return roles_.get(index); - } - /** - *
-   * Provides Kubernetes role information for findings that involve
-   * Roles or ClusterRoles.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.RoleOrBuilder getRolesOrBuilder( - int index) { - return roles_.get(index); - } - - public static final int BINDINGS_FIELD_NUMBER = 5; - private java.util.List bindings_; - /** - *
-   * Provides Kubernetes role binding information for findings that involve
-   * RoleBindings or ClusterRoleBindings.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; - */ - @java.lang.Override - public java.util.List getBindingsList() { - return bindings_; - } - /** - *
-   * Provides Kubernetes role binding information for findings that involve
-   * RoleBindings or ClusterRoleBindings.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; - */ - @java.lang.Override - public java.util.List - getBindingsOrBuilderList() { - return bindings_; - } - /** - *
-   * Provides Kubernetes role binding information for findings that involve
-   * RoleBindings or ClusterRoleBindings.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; - */ - @java.lang.Override - public int getBindingsCount() { - return bindings_.size(); - } - /** - *
-   * Provides Kubernetes role binding information for findings that involve
-   * RoleBindings or ClusterRoleBindings.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.Binding getBindings(int index) { - return bindings_.get(index); - } - /** - *
-   * Provides Kubernetes role binding information for findings that involve
-   * RoleBindings or ClusterRoleBindings.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.BindingOrBuilder getBindingsOrBuilder( - int index) { - return bindings_.get(index); - } - - public static final int ACCESS_REVIEWS_FIELD_NUMBER = 6; - private java.util.List accessReviews_; - /** - *
-   * Provides information on any Kubernetes access reviews (i.e. privilege
-   * checks) relevant to the finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; - */ - @java.lang.Override - public java.util.List getAccessReviewsList() { - return accessReviews_; - } - /** - *
-   * Provides information on any Kubernetes access reviews (i.e. privilege
-   * checks) relevant to the finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; - */ - @java.lang.Override - public java.util.List - getAccessReviewsOrBuilderList() { - return accessReviews_; - } - /** - *
-   * Provides information on any Kubernetes access reviews (i.e. privilege
-   * checks) relevant to the finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; - */ - @java.lang.Override - public int getAccessReviewsCount() { - return accessReviews_.size(); - } - /** - *
-   * Provides information on any Kubernetes access reviews (i.e. privilege
-   * checks) relevant to the finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.AccessReview getAccessReviews(int index) { - return accessReviews_.get(index); - } - /** - *
-   * Provides information on any Kubernetes access reviews (i.e. privilege
-   * checks) relevant to the finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; - */ - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes.AccessReviewOrBuilder getAccessReviewsOrBuilder( - int index) { - return accessReviews_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < pods_.size(); i++) { - output.writeMessage(1, pods_.get(i)); - } - for (int i = 0; i < nodes_.size(); i++) { - output.writeMessage(2, nodes_.get(i)); - } - for (int i = 0; i < nodePools_.size(); i++) { - output.writeMessage(3, nodePools_.get(i)); - } - for (int i = 0; i < roles_.size(); i++) { - output.writeMessage(4, roles_.get(i)); - } - for (int i = 0; i < bindings_.size(); i++) { - output.writeMessage(5, bindings_.get(i)); - } - for (int i = 0; i < accessReviews_.size(); i++) { - output.writeMessage(6, accessReviews_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < pods_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, pods_.get(i)); - } - for (int i = 0; i < nodes_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, nodes_.get(i)); - } - for (int i = 0; i < nodePools_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, nodePools_.get(i)); - } - for (int i = 0; i < roles_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, roles_.get(i)); - } - for (int i = 0; i < bindings_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, bindings_.get(i)); - } - for (int i = 0; i < accessReviews_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, accessReviews_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.Kubernetes)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.Kubernetes other = (com.google.cloud.securitycenter.v1.Kubernetes) obj; - - if (!getPodsList() - .equals(other.getPodsList())) return false; - if (!getNodesList() - .equals(other.getNodesList())) return false; - if (!getNodePoolsList() - .equals(other.getNodePoolsList())) return false; - if (!getRolesList() - .equals(other.getRolesList())) return false; - if (!getBindingsList() - .equals(other.getBindingsList())) return false; - if (!getAccessReviewsList() - .equals(other.getAccessReviewsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getPodsCount() > 0) { - hash = (37 * hash) + PODS_FIELD_NUMBER; - hash = (53 * hash) + getPodsList().hashCode(); - } - if (getNodesCount() > 0) { - hash = (37 * hash) + NODES_FIELD_NUMBER; - hash = (53 * hash) + getNodesList().hashCode(); - } - if (getNodePoolsCount() > 0) { - hash = (37 * hash) + NODE_POOLS_FIELD_NUMBER; - hash = (53 * hash) + getNodePoolsList().hashCode(); - } - if (getRolesCount() > 0) { - hash = (37 * hash) + ROLES_FIELD_NUMBER; - hash = (53 * hash) + getRolesList().hashCode(); - } - if (getBindingsCount() > 0) { - hash = (37 * hash) + BINDINGS_FIELD_NUMBER; - hash = (53 * hash) + getBindingsList().hashCode(); - } - if (getAccessReviewsCount() > 0) { - hash = (37 * hash) + ACCESS_REVIEWS_FIELD_NUMBER; - hash = (53 * hash) + getAccessReviewsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.Kubernetes parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Kubernetes parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Kubernetes parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Kubernetes parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Kubernetes parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Kubernetes parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Kubernetes parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Kubernetes parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.Kubernetes prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Kubernetes related attributes.
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Kubernetes} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Kubernetes) - com.google.cloud.securitycenter.v1.KubernetesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Kubernetes.class, com.google.cloud.securitycenter.v1.Kubernetes.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.Kubernetes.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getPodsFieldBuilder(); - getNodesFieldBuilder(); - getNodePoolsFieldBuilder(); - getRolesFieldBuilder(); - getBindingsFieldBuilder(); - getAccessReviewsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (podsBuilder_ == null) { - pods_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - podsBuilder_.clear(); - } - if (nodesBuilder_ == null) { - nodes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - nodesBuilder_.clear(); - } - if (nodePoolsBuilder_ == null) { - nodePools_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - nodePoolsBuilder_.clear(); - } - if (rolesBuilder_ == null) { - roles_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - } else { - rolesBuilder_.clear(); - } - if (bindingsBuilder_ == null) { - bindings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - } else { - bindingsBuilder_.clear(); - } - if (accessReviewsBuilder_ == null) { - accessReviews_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - } else { - accessReviewsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.KubernetesProto.internal_static_google_cloud_securitycenter_v1_Kubernetes_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.Kubernetes.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes build() { - com.google.cloud.securitycenter.v1.Kubernetes result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes buildPartial() { - com.google.cloud.securitycenter.v1.Kubernetes result = new com.google.cloud.securitycenter.v1.Kubernetes(this); - int from_bitField0_ = bitField0_; - if (podsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - pods_ = java.util.Collections.unmodifiableList(pods_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.pods_ = pods_; - } else { - result.pods_ = podsBuilder_.build(); - } - if (nodesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - nodes_ = java.util.Collections.unmodifiableList(nodes_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.nodes_ = nodes_; - } else { - result.nodes_ = nodesBuilder_.build(); - } - if (nodePoolsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - nodePools_ = java.util.Collections.unmodifiableList(nodePools_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.nodePools_ = nodePools_; - } else { - result.nodePools_ = nodePoolsBuilder_.build(); - } - if (rolesBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - roles_ = java.util.Collections.unmodifiableList(roles_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.roles_ = roles_; - } else { - result.roles_ = rolesBuilder_.build(); - } - if (bindingsBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - bindings_ = java.util.Collections.unmodifiableList(bindings_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.bindings_ = bindings_; - } else { - result.bindings_ = bindingsBuilder_.build(); - } - if (accessReviewsBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0)) { - accessReviews_ = java.util.Collections.unmodifiableList(accessReviews_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.accessReviews_ = accessReviews_; - } else { - result.accessReviews_ = accessReviewsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.Kubernetes) { - return mergeFrom((com.google.cloud.securitycenter.v1.Kubernetes)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.Kubernetes other) { - if (other == com.google.cloud.securitycenter.v1.Kubernetes.getDefaultInstance()) return this; - if (podsBuilder_ == null) { - if (!other.pods_.isEmpty()) { - if (pods_.isEmpty()) { - pods_ = other.pods_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePodsIsMutable(); - pods_.addAll(other.pods_); - } - onChanged(); - } - } else { - if (!other.pods_.isEmpty()) { - if (podsBuilder_.isEmpty()) { - podsBuilder_.dispose(); - podsBuilder_ = null; - pods_ = other.pods_; - bitField0_ = (bitField0_ & ~0x00000001); - podsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPodsFieldBuilder() : null; - } else { - podsBuilder_.addAllMessages(other.pods_); - } - } - } - if (nodesBuilder_ == null) { - if (!other.nodes_.isEmpty()) { - if (nodes_.isEmpty()) { - nodes_ = other.nodes_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureNodesIsMutable(); - nodes_.addAll(other.nodes_); - } - onChanged(); - } - } else { - if (!other.nodes_.isEmpty()) { - if (nodesBuilder_.isEmpty()) { - nodesBuilder_.dispose(); - nodesBuilder_ = null; - nodes_ = other.nodes_; - bitField0_ = (bitField0_ & ~0x00000002); - nodesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getNodesFieldBuilder() : null; - } else { - nodesBuilder_.addAllMessages(other.nodes_); - } - } - } - if (nodePoolsBuilder_ == null) { - if (!other.nodePools_.isEmpty()) { - if (nodePools_.isEmpty()) { - nodePools_ = other.nodePools_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureNodePoolsIsMutable(); - nodePools_.addAll(other.nodePools_); - } - onChanged(); - } - } else { - if (!other.nodePools_.isEmpty()) { - if (nodePoolsBuilder_.isEmpty()) { - nodePoolsBuilder_.dispose(); - nodePoolsBuilder_ = null; - nodePools_ = other.nodePools_; - bitField0_ = (bitField0_ & ~0x00000004); - nodePoolsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getNodePoolsFieldBuilder() : null; - } else { - nodePoolsBuilder_.addAllMessages(other.nodePools_); - } - } - } - if (rolesBuilder_ == null) { - if (!other.roles_.isEmpty()) { - if (roles_.isEmpty()) { - roles_ = other.roles_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureRolesIsMutable(); - roles_.addAll(other.roles_); - } - onChanged(); - } - } else { - if (!other.roles_.isEmpty()) { - if (rolesBuilder_.isEmpty()) { - rolesBuilder_.dispose(); - rolesBuilder_ = null; - roles_ = other.roles_; - bitField0_ = (bitField0_ & ~0x00000008); - rolesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRolesFieldBuilder() : null; - } else { - rolesBuilder_.addAllMessages(other.roles_); - } - } - } - if (bindingsBuilder_ == null) { - if (!other.bindings_.isEmpty()) { - if (bindings_.isEmpty()) { - bindings_ = other.bindings_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureBindingsIsMutable(); - bindings_.addAll(other.bindings_); - } - onChanged(); - } - } else { - if (!other.bindings_.isEmpty()) { - if (bindingsBuilder_.isEmpty()) { - bindingsBuilder_.dispose(); - bindingsBuilder_ = null; - bindings_ = other.bindings_; - bitField0_ = (bitField0_ & ~0x00000010); - bindingsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getBindingsFieldBuilder() : null; - } else { - bindingsBuilder_.addAllMessages(other.bindings_); - } - } - } - if (accessReviewsBuilder_ == null) { - if (!other.accessReviews_.isEmpty()) { - if (accessReviews_.isEmpty()) { - accessReviews_ = other.accessReviews_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureAccessReviewsIsMutable(); - accessReviews_.addAll(other.accessReviews_); - } - onChanged(); - } - } else { - if (!other.accessReviews_.isEmpty()) { - if (accessReviewsBuilder_.isEmpty()) { - accessReviewsBuilder_.dispose(); - accessReviewsBuilder_ = null; - accessReviews_ = other.accessReviews_; - bitField0_ = (bitField0_ & ~0x00000020); - accessReviewsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getAccessReviewsFieldBuilder() : null; - } else { - accessReviewsBuilder_.addAllMessages(other.accessReviews_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.Kubernetes parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.Kubernetes) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List pods_ = - java.util.Collections.emptyList(); - private void ensurePodsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - pods_ = new java.util.ArrayList(pods_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Kubernetes.Pod, com.google.cloud.securitycenter.v1.Kubernetes.Pod.Builder, com.google.cloud.securitycenter.v1.Kubernetes.PodOrBuilder> podsBuilder_; - - /** - *
-     * Kubernetes Pods associated with the finding. This field will contain Pod
-     * records for each container that is owned by a Pod.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; - */ - public java.util.List getPodsList() { - if (podsBuilder_ == null) { - return java.util.Collections.unmodifiableList(pods_); - } else { - return podsBuilder_.getMessageList(); - } - } - /** - *
-     * Kubernetes Pods associated with the finding. This field will contain Pod
-     * records for each container that is owned by a Pod.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; - */ - public int getPodsCount() { - if (podsBuilder_ == null) { - return pods_.size(); - } else { - return podsBuilder_.getCount(); - } - } - /** - *
-     * Kubernetes Pods associated with the finding. This field will contain Pod
-     * records for each container that is owned by a Pod.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.Pod getPods(int index) { - if (podsBuilder_ == null) { - return pods_.get(index); - } else { - return podsBuilder_.getMessage(index); - } - } - /** - *
-     * Kubernetes Pods associated with the finding. This field will contain Pod
-     * records for each container that is owned by a Pod.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; - */ - public Builder setPods( - int index, com.google.cloud.securitycenter.v1.Kubernetes.Pod value) { - if (podsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePodsIsMutable(); - pods_.set(index, value); - onChanged(); - } else { - podsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Kubernetes Pods associated with the finding. This field will contain Pod
-     * records for each container that is owned by a Pod.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; - */ - public Builder setPods( - int index, com.google.cloud.securitycenter.v1.Kubernetes.Pod.Builder builderForValue) { - if (podsBuilder_ == null) { - ensurePodsIsMutable(); - pods_.set(index, builderForValue.build()); - onChanged(); - } else { - podsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Kubernetes Pods associated with the finding. This field will contain Pod
-     * records for each container that is owned by a Pod.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; - */ - public Builder addPods(com.google.cloud.securitycenter.v1.Kubernetes.Pod value) { - if (podsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePodsIsMutable(); - pods_.add(value); - onChanged(); - } else { - podsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Kubernetes Pods associated with the finding. This field will contain Pod
-     * records for each container that is owned by a Pod.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; - */ - public Builder addPods( - int index, com.google.cloud.securitycenter.v1.Kubernetes.Pod value) { - if (podsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePodsIsMutable(); - pods_.add(index, value); - onChanged(); - } else { - podsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Kubernetes Pods associated with the finding. This field will contain Pod
-     * records for each container that is owned by a Pod.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; - */ - public Builder addPods( - com.google.cloud.securitycenter.v1.Kubernetes.Pod.Builder builderForValue) { - if (podsBuilder_ == null) { - ensurePodsIsMutable(); - pods_.add(builderForValue.build()); - onChanged(); - } else { - podsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Kubernetes Pods associated with the finding. This field will contain Pod
-     * records for each container that is owned by a Pod.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; - */ - public Builder addPods( - int index, com.google.cloud.securitycenter.v1.Kubernetes.Pod.Builder builderForValue) { - if (podsBuilder_ == null) { - ensurePodsIsMutable(); - pods_.add(index, builderForValue.build()); - onChanged(); - } else { - podsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Kubernetes Pods associated with the finding. This field will contain Pod
-     * records for each container that is owned by a Pod.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; - */ - public Builder addAllPods( - java.lang.Iterable values) { - if (podsBuilder_ == null) { - ensurePodsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, pods_); - onChanged(); - } else { - podsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Kubernetes Pods associated with the finding. This field will contain Pod
-     * records for each container that is owned by a Pod.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; - */ - public Builder clearPods() { - if (podsBuilder_ == null) { - pods_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - podsBuilder_.clear(); - } - return this; - } - /** - *
-     * Kubernetes Pods associated with the finding. This field will contain Pod
-     * records for each container that is owned by a Pod.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; - */ - public Builder removePods(int index) { - if (podsBuilder_ == null) { - ensurePodsIsMutable(); - pods_.remove(index); - onChanged(); - } else { - podsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Kubernetes Pods associated with the finding. This field will contain Pod
-     * records for each container that is owned by a Pod.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.Pod.Builder getPodsBuilder( - int index) { - return getPodsFieldBuilder().getBuilder(index); - } - /** - *
-     * Kubernetes Pods associated with the finding. This field will contain Pod
-     * records for each container that is owned by a Pod.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.PodOrBuilder getPodsOrBuilder( - int index) { - if (podsBuilder_ == null) { - return pods_.get(index); } else { - return podsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Kubernetes Pods associated with the finding. This field will contain Pod
-     * records for each container that is owned by a Pod.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; - */ - public java.util.List - getPodsOrBuilderList() { - if (podsBuilder_ != null) { - return podsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(pods_); - } - } - /** - *
-     * Kubernetes Pods associated with the finding. This field will contain Pod
-     * records for each container that is owned by a Pod.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.Pod.Builder addPodsBuilder() { - return getPodsFieldBuilder().addBuilder( - com.google.cloud.securitycenter.v1.Kubernetes.Pod.getDefaultInstance()); - } - /** - *
-     * Kubernetes Pods associated with the finding. This field will contain Pod
-     * records for each container that is owned by a Pod.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.Pod.Builder addPodsBuilder( - int index) { - return getPodsFieldBuilder().addBuilder( - index, com.google.cloud.securitycenter.v1.Kubernetes.Pod.getDefaultInstance()); - } - /** - *
-     * Kubernetes Pods associated with the finding. This field will contain Pod
-     * records for each container that is owned by a Pod.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; - */ - public java.util.List - getPodsBuilderList() { - return getPodsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Kubernetes.Pod, com.google.cloud.securitycenter.v1.Kubernetes.Pod.Builder, com.google.cloud.securitycenter.v1.Kubernetes.PodOrBuilder> - getPodsFieldBuilder() { - if (podsBuilder_ == null) { - podsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Kubernetes.Pod, com.google.cloud.securitycenter.v1.Kubernetes.Pod.Builder, com.google.cloud.securitycenter.v1.Kubernetes.PodOrBuilder>( - pods_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - pods_ = null; - } - return podsBuilder_; - } - - private java.util.List nodes_ = - java.util.Collections.emptyList(); - private void ensureNodesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - nodes_ = new java.util.ArrayList(nodes_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Kubernetes.Node, com.google.cloud.securitycenter.v1.Kubernetes.Node.Builder, com.google.cloud.securitycenter.v1.Kubernetes.NodeOrBuilder> nodesBuilder_; - - /** - *
-     * Provides Kubernetes Node information.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public java.util.List getNodesList() { - if (nodesBuilder_ == null) { - return java.util.Collections.unmodifiableList(nodes_); - } else { - return nodesBuilder_.getMessageList(); - } - } - /** - *
-     * Provides Kubernetes Node information.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public int getNodesCount() { - if (nodesBuilder_ == null) { - return nodes_.size(); - } else { - return nodesBuilder_.getCount(); - } - } - /** - *
-     * Provides Kubernetes Node information.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.Node getNodes(int index) { - if (nodesBuilder_ == null) { - return nodes_.get(index); - } else { - return nodesBuilder_.getMessage(index); - } - } - /** - *
-     * Provides Kubernetes Node information.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public Builder setNodes( - int index, com.google.cloud.securitycenter.v1.Kubernetes.Node value) { - if (nodesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodesIsMutable(); - nodes_.set(index, value); - onChanged(); - } else { - nodesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Provides Kubernetes Node information.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public Builder setNodes( - int index, com.google.cloud.securitycenter.v1.Kubernetes.Node.Builder builderForValue) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - nodes_.set(index, builderForValue.build()); - onChanged(); - } else { - nodesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Provides Kubernetes Node information.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public Builder addNodes(com.google.cloud.securitycenter.v1.Kubernetes.Node value) { - if (nodesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodesIsMutable(); - nodes_.add(value); - onChanged(); - } else { - nodesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Provides Kubernetes Node information.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public Builder addNodes( - int index, com.google.cloud.securitycenter.v1.Kubernetes.Node value) { - if (nodesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodesIsMutable(); - nodes_.add(index, value); - onChanged(); - } else { - nodesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Provides Kubernetes Node information.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public Builder addNodes( - com.google.cloud.securitycenter.v1.Kubernetes.Node.Builder builderForValue) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - nodes_.add(builderForValue.build()); - onChanged(); - } else { - nodesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Provides Kubernetes Node information.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public Builder addNodes( - int index, com.google.cloud.securitycenter.v1.Kubernetes.Node.Builder builderForValue) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - nodes_.add(index, builderForValue.build()); - onChanged(); - } else { - nodesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Provides Kubernetes Node information.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public Builder addAllNodes( - java.lang.Iterable values) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, nodes_); - onChanged(); - } else { - nodesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Provides Kubernetes Node information.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public Builder clearNodes() { - if (nodesBuilder_ == null) { - nodes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - nodesBuilder_.clear(); - } - return this; - } - /** - *
-     * Provides Kubernetes Node information.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public Builder removeNodes(int index) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - nodes_.remove(index); - onChanged(); - } else { - nodesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Provides Kubernetes Node information.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.Node.Builder getNodesBuilder( - int index) { - return getNodesFieldBuilder().getBuilder(index); - } - /** - *
-     * Provides Kubernetes Node information.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.NodeOrBuilder getNodesOrBuilder( - int index) { - if (nodesBuilder_ == null) { - return nodes_.get(index); } else { - return nodesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Provides Kubernetes Node information.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public java.util.List - getNodesOrBuilderList() { - if (nodesBuilder_ != null) { - return nodesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(nodes_); - } - } - /** - *
-     * Provides Kubernetes Node information.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.Node.Builder addNodesBuilder() { - return getNodesFieldBuilder().addBuilder( - com.google.cloud.securitycenter.v1.Kubernetes.Node.getDefaultInstance()); - } - /** - *
-     * Provides Kubernetes Node information.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.Node.Builder addNodesBuilder( - int index) { - return getNodesFieldBuilder().addBuilder( - index, com.google.cloud.securitycenter.v1.Kubernetes.Node.getDefaultInstance()); - } - /** - *
-     * Provides Kubernetes Node information.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - public java.util.List - getNodesBuilderList() { - return getNodesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Kubernetes.Node, com.google.cloud.securitycenter.v1.Kubernetes.Node.Builder, com.google.cloud.securitycenter.v1.Kubernetes.NodeOrBuilder> - getNodesFieldBuilder() { - if (nodesBuilder_ == null) { - nodesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Kubernetes.Node, com.google.cloud.securitycenter.v1.Kubernetes.Node.Builder, com.google.cloud.securitycenter.v1.Kubernetes.NodeOrBuilder>( - nodes_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - nodes_ = null; - } - return nodesBuilder_; - } - - private java.util.List nodePools_ = - java.util.Collections.emptyList(); - private void ensureNodePoolsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - nodePools_ = new java.util.ArrayList(nodePools_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Kubernetes.NodePool, com.google.cloud.securitycenter.v1.Kubernetes.NodePool.Builder, com.google.cloud.securitycenter.v1.Kubernetes.NodePoolOrBuilder> nodePoolsBuilder_; - - /** - *
-     * GKE Node Pools associated with the finding. This field will
-     * contain NodePool information for each Node, when it is available.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; - */ - public java.util.List getNodePoolsList() { - if (nodePoolsBuilder_ == null) { - return java.util.Collections.unmodifiableList(nodePools_); - } else { - return nodePoolsBuilder_.getMessageList(); - } - } - /** - *
-     * GKE Node Pools associated with the finding. This field will
-     * contain NodePool information for each Node, when it is available.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; - */ - public int getNodePoolsCount() { - if (nodePoolsBuilder_ == null) { - return nodePools_.size(); - } else { - return nodePoolsBuilder_.getCount(); - } - } - /** - *
-     * GKE Node Pools associated with the finding. This field will
-     * contain NodePool information for each Node, when it is available.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.NodePool getNodePools(int index) { - if (nodePoolsBuilder_ == null) { - return nodePools_.get(index); - } else { - return nodePoolsBuilder_.getMessage(index); - } - } - /** - *
-     * GKE Node Pools associated with the finding. This field will
-     * contain NodePool information for each Node, when it is available.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; - */ - public Builder setNodePools( - int index, com.google.cloud.securitycenter.v1.Kubernetes.NodePool value) { - if (nodePoolsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodePoolsIsMutable(); - nodePools_.set(index, value); - onChanged(); - } else { - nodePoolsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * GKE Node Pools associated with the finding. This field will
-     * contain NodePool information for each Node, when it is available.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; - */ - public Builder setNodePools( - int index, com.google.cloud.securitycenter.v1.Kubernetes.NodePool.Builder builderForValue) { - if (nodePoolsBuilder_ == null) { - ensureNodePoolsIsMutable(); - nodePools_.set(index, builderForValue.build()); - onChanged(); - } else { - nodePoolsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * GKE Node Pools associated with the finding. This field will
-     * contain NodePool information for each Node, when it is available.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; - */ - public Builder addNodePools(com.google.cloud.securitycenter.v1.Kubernetes.NodePool value) { - if (nodePoolsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodePoolsIsMutable(); - nodePools_.add(value); - onChanged(); - } else { - nodePoolsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * GKE Node Pools associated with the finding. This field will
-     * contain NodePool information for each Node, when it is available.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; - */ - public Builder addNodePools( - int index, com.google.cloud.securitycenter.v1.Kubernetes.NodePool value) { - if (nodePoolsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodePoolsIsMutable(); - nodePools_.add(index, value); - onChanged(); - } else { - nodePoolsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * GKE Node Pools associated with the finding. This field will
-     * contain NodePool information for each Node, when it is available.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; - */ - public Builder addNodePools( - com.google.cloud.securitycenter.v1.Kubernetes.NodePool.Builder builderForValue) { - if (nodePoolsBuilder_ == null) { - ensureNodePoolsIsMutable(); - nodePools_.add(builderForValue.build()); - onChanged(); - } else { - nodePoolsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * GKE Node Pools associated with the finding. This field will
-     * contain NodePool information for each Node, when it is available.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; - */ - public Builder addNodePools( - int index, com.google.cloud.securitycenter.v1.Kubernetes.NodePool.Builder builderForValue) { - if (nodePoolsBuilder_ == null) { - ensureNodePoolsIsMutable(); - nodePools_.add(index, builderForValue.build()); - onChanged(); - } else { - nodePoolsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * GKE Node Pools associated with the finding. This field will
-     * contain NodePool information for each Node, when it is available.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; - */ - public Builder addAllNodePools( - java.lang.Iterable values) { - if (nodePoolsBuilder_ == null) { - ensureNodePoolsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, nodePools_); - onChanged(); - } else { - nodePoolsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * GKE Node Pools associated with the finding. This field will
-     * contain NodePool information for each Node, when it is available.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; - */ - public Builder clearNodePools() { - if (nodePoolsBuilder_ == null) { - nodePools_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - nodePoolsBuilder_.clear(); - } - return this; - } - /** - *
-     * GKE Node Pools associated with the finding. This field will
-     * contain NodePool information for each Node, when it is available.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; - */ - public Builder removeNodePools(int index) { - if (nodePoolsBuilder_ == null) { - ensureNodePoolsIsMutable(); - nodePools_.remove(index); - onChanged(); - } else { - nodePoolsBuilder_.remove(index); - } - return this; - } - /** - *
-     * GKE Node Pools associated with the finding. This field will
-     * contain NodePool information for each Node, when it is available.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.NodePool.Builder getNodePoolsBuilder( - int index) { - return getNodePoolsFieldBuilder().getBuilder(index); - } - /** - *
-     * GKE Node Pools associated with the finding. This field will
-     * contain NodePool information for each Node, when it is available.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.NodePoolOrBuilder getNodePoolsOrBuilder( - int index) { - if (nodePoolsBuilder_ == null) { - return nodePools_.get(index); } else { - return nodePoolsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * GKE Node Pools associated with the finding. This field will
-     * contain NodePool information for each Node, when it is available.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; - */ - public java.util.List - getNodePoolsOrBuilderList() { - if (nodePoolsBuilder_ != null) { - return nodePoolsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(nodePools_); - } - } - /** - *
-     * GKE Node Pools associated with the finding. This field will
-     * contain NodePool information for each Node, when it is available.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.NodePool.Builder addNodePoolsBuilder() { - return getNodePoolsFieldBuilder().addBuilder( - com.google.cloud.securitycenter.v1.Kubernetes.NodePool.getDefaultInstance()); - } - /** - *
-     * GKE Node Pools associated with the finding. This field will
-     * contain NodePool information for each Node, when it is available.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.NodePool.Builder addNodePoolsBuilder( - int index) { - return getNodePoolsFieldBuilder().addBuilder( - index, com.google.cloud.securitycenter.v1.Kubernetes.NodePool.getDefaultInstance()); - } - /** - *
-     * GKE Node Pools associated with the finding. This field will
-     * contain NodePool information for each Node, when it is available.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; - */ - public java.util.List - getNodePoolsBuilderList() { - return getNodePoolsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Kubernetes.NodePool, com.google.cloud.securitycenter.v1.Kubernetes.NodePool.Builder, com.google.cloud.securitycenter.v1.Kubernetes.NodePoolOrBuilder> - getNodePoolsFieldBuilder() { - if (nodePoolsBuilder_ == null) { - nodePoolsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Kubernetes.NodePool, com.google.cloud.securitycenter.v1.Kubernetes.NodePool.Builder, com.google.cloud.securitycenter.v1.Kubernetes.NodePoolOrBuilder>( - nodePools_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - nodePools_ = null; - } - return nodePoolsBuilder_; - } - - private java.util.List roles_ = - java.util.Collections.emptyList(); - private void ensureRolesIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - roles_ = new java.util.ArrayList(roles_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Kubernetes.Role, com.google.cloud.securitycenter.v1.Kubernetes.Role.Builder, com.google.cloud.securitycenter.v1.Kubernetes.RoleOrBuilder> rolesBuilder_; - - /** - *
-     * Provides Kubernetes role information for findings that involve
-     * Roles or ClusterRoles.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; - */ - public java.util.List getRolesList() { - if (rolesBuilder_ == null) { - return java.util.Collections.unmodifiableList(roles_); - } else { - return rolesBuilder_.getMessageList(); - } - } - /** - *
-     * Provides Kubernetes role information for findings that involve
-     * Roles or ClusterRoles.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; - */ - public int getRolesCount() { - if (rolesBuilder_ == null) { - return roles_.size(); - } else { - return rolesBuilder_.getCount(); - } - } - /** - *
-     * Provides Kubernetes role information for findings that involve
-     * Roles or ClusterRoles.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.Role getRoles(int index) { - if (rolesBuilder_ == null) { - return roles_.get(index); - } else { - return rolesBuilder_.getMessage(index); - } - } - /** - *
-     * Provides Kubernetes role information for findings that involve
-     * Roles or ClusterRoles.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; - */ - public Builder setRoles( - int index, com.google.cloud.securitycenter.v1.Kubernetes.Role value) { - if (rolesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRolesIsMutable(); - roles_.set(index, value); - onChanged(); - } else { - rolesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Provides Kubernetes role information for findings that involve
-     * Roles or ClusterRoles.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; - */ - public Builder setRoles( - int index, com.google.cloud.securitycenter.v1.Kubernetes.Role.Builder builderForValue) { - if (rolesBuilder_ == null) { - ensureRolesIsMutable(); - roles_.set(index, builderForValue.build()); - onChanged(); - } else { - rolesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Provides Kubernetes role information for findings that involve
-     * Roles or ClusterRoles.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; - */ - public Builder addRoles(com.google.cloud.securitycenter.v1.Kubernetes.Role value) { - if (rolesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRolesIsMutable(); - roles_.add(value); - onChanged(); - } else { - rolesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Provides Kubernetes role information for findings that involve
-     * Roles or ClusterRoles.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; - */ - public Builder addRoles( - int index, com.google.cloud.securitycenter.v1.Kubernetes.Role value) { - if (rolesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRolesIsMutable(); - roles_.add(index, value); - onChanged(); - } else { - rolesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Provides Kubernetes role information for findings that involve
-     * Roles or ClusterRoles.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; - */ - public Builder addRoles( - com.google.cloud.securitycenter.v1.Kubernetes.Role.Builder builderForValue) { - if (rolesBuilder_ == null) { - ensureRolesIsMutable(); - roles_.add(builderForValue.build()); - onChanged(); - } else { - rolesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Provides Kubernetes role information for findings that involve
-     * Roles or ClusterRoles.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; - */ - public Builder addRoles( - int index, com.google.cloud.securitycenter.v1.Kubernetes.Role.Builder builderForValue) { - if (rolesBuilder_ == null) { - ensureRolesIsMutable(); - roles_.add(index, builderForValue.build()); - onChanged(); - } else { - rolesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Provides Kubernetes role information for findings that involve
-     * Roles or ClusterRoles.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; - */ - public Builder addAllRoles( - java.lang.Iterable values) { - if (rolesBuilder_ == null) { - ensureRolesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, roles_); - onChanged(); - } else { - rolesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Provides Kubernetes role information for findings that involve
-     * Roles or ClusterRoles.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; - */ - public Builder clearRoles() { - if (rolesBuilder_ == null) { - roles_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - rolesBuilder_.clear(); - } - return this; - } - /** - *
-     * Provides Kubernetes role information for findings that involve
-     * Roles or ClusterRoles.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; - */ - public Builder removeRoles(int index) { - if (rolesBuilder_ == null) { - ensureRolesIsMutable(); - roles_.remove(index); - onChanged(); - } else { - rolesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Provides Kubernetes role information for findings that involve
-     * Roles or ClusterRoles.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.Role.Builder getRolesBuilder( - int index) { - return getRolesFieldBuilder().getBuilder(index); - } - /** - *
-     * Provides Kubernetes role information for findings that involve
-     * Roles or ClusterRoles.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.RoleOrBuilder getRolesOrBuilder( - int index) { - if (rolesBuilder_ == null) { - return roles_.get(index); } else { - return rolesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Provides Kubernetes role information for findings that involve
-     * Roles or ClusterRoles.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; - */ - public java.util.List - getRolesOrBuilderList() { - if (rolesBuilder_ != null) { - return rolesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(roles_); - } - } - /** - *
-     * Provides Kubernetes role information for findings that involve
-     * Roles or ClusterRoles.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.Role.Builder addRolesBuilder() { - return getRolesFieldBuilder().addBuilder( - com.google.cloud.securitycenter.v1.Kubernetes.Role.getDefaultInstance()); - } - /** - *
-     * Provides Kubernetes role information for findings that involve
-     * Roles or ClusterRoles.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.Role.Builder addRolesBuilder( - int index) { - return getRolesFieldBuilder().addBuilder( - index, com.google.cloud.securitycenter.v1.Kubernetes.Role.getDefaultInstance()); - } - /** - *
-     * Provides Kubernetes role information for findings that involve
-     * Roles or ClusterRoles.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; - */ - public java.util.List - getRolesBuilderList() { - return getRolesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Kubernetes.Role, com.google.cloud.securitycenter.v1.Kubernetes.Role.Builder, com.google.cloud.securitycenter.v1.Kubernetes.RoleOrBuilder> - getRolesFieldBuilder() { - if (rolesBuilder_ == null) { - rolesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Kubernetes.Role, com.google.cloud.securitycenter.v1.Kubernetes.Role.Builder, com.google.cloud.securitycenter.v1.Kubernetes.RoleOrBuilder>( - roles_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - roles_ = null; - } - return rolesBuilder_; - } - - private java.util.List bindings_ = - java.util.Collections.emptyList(); - private void ensureBindingsIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - bindings_ = new java.util.ArrayList(bindings_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Kubernetes.Binding, com.google.cloud.securitycenter.v1.Kubernetes.Binding.Builder, com.google.cloud.securitycenter.v1.Kubernetes.BindingOrBuilder> bindingsBuilder_; - - /** - *
-     * Provides Kubernetes role binding information for findings that involve
-     * RoleBindings or ClusterRoleBindings.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; - */ - public java.util.List getBindingsList() { - if (bindingsBuilder_ == null) { - return java.util.Collections.unmodifiableList(bindings_); - } else { - return bindingsBuilder_.getMessageList(); - } - } - /** - *
-     * Provides Kubernetes role binding information for findings that involve
-     * RoleBindings or ClusterRoleBindings.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; - */ - public int getBindingsCount() { - if (bindingsBuilder_ == null) { - return bindings_.size(); - } else { - return bindingsBuilder_.getCount(); - } - } - /** - *
-     * Provides Kubernetes role binding information for findings that involve
-     * RoleBindings or ClusterRoleBindings.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.Binding getBindings(int index) { - if (bindingsBuilder_ == null) { - return bindings_.get(index); - } else { - return bindingsBuilder_.getMessage(index); - } - } - /** - *
-     * Provides Kubernetes role binding information for findings that involve
-     * RoleBindings or ClusterRoleBindings.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; - */ - public Builder setBindings( - int index, com.google.cloud.securitycenter.v1.Kubernetes.Binding value) { - if (bindingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBindingsIsMutable(); - bindings_.set(index, value); - onChanged(); - } else { - bindingsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Provides Kubernetes role binding information for findings that involve
-     * RoleBindings or ClusterRoleBindings.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; - */ - public Builder setBindings( - int index, com.google.cloud.securitycenter.v1.Kubernetes.Binding.Builder builderForValue) { - if (bindingsBuilder_ == null) { - ensureBindingsIsMutable(); - bindings_.set(index, builderForValue.build()); - onChanged(); - } else { - bindingsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Provides Kubernetes role binding information for findings that involve
-     * RoleBindings or ClusterRoleBindings.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; - */ - public Builder addBindings(com.google.cloud.securitycenter.v1.Kubernetes.Binding value) { - if (bindingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBindingsIsMutable(); - bindings_.add(value); - onChanged(); - } else { - bindingsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Provides Kubernetes role binding information for findings that involve
-     * RoleBindings or ClusterRoleBindings.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; - */ - public Builder addBindings( - int index, com.google.cloud.securitycenter.v1.Kubernetes.Binding value) { - if (bindingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBindingsIsMutable(); - bindings_.add(index, value); - onChanged(); - } else { - bindingsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Provides Kubernetes role binding information for findings that involve
-     * RoleBindings or ClusterRoleBindings.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; - */ - public Builder addBindings( - com.google.cloud.securitycenter.v1.Kubernetes.Binding.Builder builderForValue) { - if (bindingsBuilder_ == null) { - ensureBindingsIsMutable(); - bindings_.add(builderForValue.build()); - onChanged(); - } else { - bindingsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Provides Kubernetes role binding information for findings that involve
-     * RoleBindings or ClusterRoleBindings.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; - */ - public Builder addBindings( - int index, com.google.cloud.securitycenter.v1.Kubernetes.Binding.Builder builderForValue) { - if (bindingsBuilder_ == null) { - ensureBindingsIsMutable(); - bindings_.add(index, builderForValue.build()); - onChanged(); - } else { - bindingsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Provides Kubernetes role binding information for findings that involve
-     * RoleBindings or ClusterRoleBindings.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; - */ - public Builder addAllBindings( - java.lang.Iterable values) { - if (bindingsBuilder_ == null) { - ensureBindingsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, bindings_); - onChanged(); - } else { - bindingsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Provides Kubernetes role binding information for findings that involve
-     * RoleBindings or ClusterRoleBindings.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; - */ - public Builder clearBindings() { - if (bindingsBuilder_ == null) { - bindings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - bindingsBuilder_.clear(); - } - return this; - } - /** - *
-     * Provides Kubernetes role binding information for findings that involve
-     * RoleBindings or ClusterRoleBindings.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; - */ - public Builder removeBindings(int index) { - if (bindingsBuilder_ == null) { - ensureBindingsIsMutable(); - bindings_.remove(index); - onChanged(); - } else { - bindingsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Provides Kubernetes role binding information for findings that involve
-     * RoleBindings or ClusterRoleBindings.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.Binding.Builder getBindingsBuilder( - int index) { - return getBindingsFieldBuilder().getBuilder(index); - } - /** - *
-     * Provides Kubernetes role binding information for findings that involve
-     * RoleBindings or ClusterRoleBindings.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.BindingOrBuilder getBindingsOrBuilder( - int index) { - if (bindingsBuilder_ == null) { - return bindings_.get(index); } else { - return bindingsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Provides Kubernetes role binding information for findings that involve
-     * RoleBindings or ClusterRoleBindings.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; - */ - public java.util.List - getBindingsOrBuilderList() { - if (bindingsBuilder_ != null) { - return bindingsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(bindings_); - } - } - /** - *
-     * Provides Kubernetes role binding information for findings that involve
-     * RoleBindings or ClusterRoleBindings.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.Binding.Builder addBindingsBuilder() { - return getBindingsFieldBuilder().addBuilder( - com.google.cloud.securitycenter.v1.Kubernetes.Binding.getDefaultInstance()); - } - /** - *
-     * Provides Kubernetes role binding information for findings that involve
-     * RoleBindings or ClusterRoleBindings.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.Binding.Builder addBindingsBuilder( - int index) { - return getBindingsFieldBuilder().addBuilder( - index, com.google.cloud.securitycenter.v1.Kubernetes.Binding.getDefaultInstance()); - } - /** - *
-     * Provides Kubernetes role binding information for findings that involve
-     * RoleBindings or ClusterRoleBindings.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; - */ - public java.util.List - getBindingsBuilderList() { - return getBindingsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Kubernetes.Binding, com.google.cloud.securitycenter.v1.Kubernetes.Binding.Builder, com.google.cloud.securitycenter.v1.Kubernetes.BindingOrBuilder> - getBindingsFieldBuilder() { - if (bindingsBuilder_ == null) { - bindingsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Kubernetes.Binding, com.google.cloud.securitycenter.v1.Kubernetes.Binding.Builder, com.google.cloud.securitycenter.v1.Kubernetes.BindingOrBuilder>( - bindings_, - ((bitField0_ & 0x00000010) != 0), - getParentForChildren(), - isClean()); - bindings_ = null; - } - return bindingsBuilder_; - } - - private java.util.List accessReviews_ = - java.util.Collections.emptyList(); - private void ensureAccessReviewsIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { - accessReviews_ = new java.util.ArrayList(accessReviews_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Kubernetes.AccessReview, com.google.cloud.securitycenter.v1.Kubernetes.AccessReview.Builder, com.google.cloud.securitycenter.v1.Kubernetes.AccessReviewOrBuilder> accessReviewsBuilder_; - - /** - *
-     * Provides information on any Kubernetes access reviews (i.e. privilege
-     * checks) relevant to the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; - */ - public java.util.List getAccessReviewsList() { - if (accessReviewsBuilder_ == null) { - return java.util.Collections.unmodifiableList(accessReviews_); - } else { - return accessReviewsBuilder_.getMessageList(); - } - } - /** - *
-     * Provides information on any Kubernetes access reviews (i.e. privilege
-     * checks) relevant to the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; - */ - public int getAccessReviewsCount() { - if (accessReviewsBuilder_ == null) { - return accessReviews_.size(); - } else { - return accessReviewsBuilder_.getCount(); - } - } - /** - *
-     * Provides information on any Kubernetes access reviews (i.e. privilege
-     * checks) relevant to the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.AccessReview getAccessReviews(int index) { - if (accessReviewsBuilder_ == null) { - return accessReviews_.get(index); - } else { - return accessReviewsBuilder_.getMessage(index); - } - } - /** - *
-     * Provides information on any Kubernetes access reviews (i.e. privilege
-     * checks) relevant to the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; - */ - public Builder setAccessReviews( - int index, com.google.cloud.securitycenter.v1.Kubernetes.AccessReview value) { - if (accessReviewsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAccessReviewsIsMutable(); - accessReviews_.set(index, value); - onChanged(); - } else { - accessReviewsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Provides information on any Kubernetes access reviews (i.e. privilege
-     * checks) relevant to the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; - */ - public Builder setAccessReviews( - int index, com.google.cloud.securitycenter.v1.Kubernetes.AccessReview.Builder builderForValue) { - if (accessReviewsBuilder_ == null) { - ensureAccessReviewsIsMutable(); - accessReviews_.set(index, builderForValue.build()); - onChanged(); - } else { - accessReviewsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Provides information on any Kubernetes access reviews (i.e. privilege
-     * checks) relevant to the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; - */ - public Builder addAccessReviews(com.google.cloud.securitycenter.v1.Kubernetes.AccessReview value) { - if (accessReviewsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAccessReviewsIsMutable(); - accessReviews_.add(value); - onChanged(); - } else { - accessReviewsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Provides information on any Kubernetes access reviews (i.e. privilege
-     * checks) relevant to the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; - */ - public Builder addAccessReviews( - int index, com.google.cloud.securitycenter.v1.Kubernetes.AccessReview value) { - if (accessReviewsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAccessReviewsIsMutable(); - accessReviews_.add(index, value); - onChanged(); - } else { - accessReviewsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Provides information on any Kubernetes access reviews (i.e. privilege
-     * checks) relevant to the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; - */ - public Builder addAccessReviews( - com.google.cloud.securitycenter.v1.Kubernetes.AccessReview.Builder builderForValue) { - if (accessReviewsBuilder_ == null) { - ensureAccessReviewsIsMutable(); - accessReviews_.add(builderForValue.build()); - onChanged(); - } else { - accessReviewsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Provides information on any Kubernetes access reviews (i.e. privilege
-     * checks) relevant to the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; - */ - public Builder addAccessReviews( - int index, com.google.cloud.securitycenter.v1.Kubernetes.AccessReview.Builder builderForValue) { - if (accessReviewsBuilder_ == null) { - ensureAccessReviewsIsMutable(); - accessReviews_.add(index, builderForValue.build()); - onChanged(); - } else { - accessReviewsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Provides information on any Kubernetes access reviews (i.e. privilege
-     * checks) relevant to the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; - */ - public Builder addAllAccessReviews( - java.lang.Iterable values) { - if (accessReviewsBuilder_ == null) { - ensureAccessReviewsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, accessReviews_); - onChanged(); - } else { - accessReviewsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Provides information on any Kubernetes access reviews (i.e. privilege
-     * checks) relevant to the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; - */ - public Builder clearAccessReviews() { - if (accessReviewsBuilder_ == null) { - accessReviews_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - accessReviewsBuilder_.clear(); - } - return this; - } - /** - *
-     * Provides information on any Kubernetes access reviews (i.e. privilege
-     * checks) relevant to the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; - */ - public Builder removeAccessReviews(int index) { - if (accessReviewsBuilder_ == null) { - ensureAccessReviewsIsMutable(); - accessReviews_.remove(index); - onChanged(); - } else { - accessReviewsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Provides information on any Kubernetes access reviews (i.e. privilege
-     * checks) relevant to the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.AccessReview.Builder getAccessReviewsBuilder( - int index) { - return getAccessReviewsFieldBuilder().getBuilder(index); - } - /** - *
-     * Provides information on any Kubernetes access reviews (i.e. privilege
-     * checks) relevant to the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.AccessReviewOrBuilder getAccessReviewsOrBuilder( - int index) { - if (accessReviewsBuilder_ == null) { - return accessReviews_.get(index); } else { - return accessReviewsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Provides information on any Kubernetes access reviews (i.e. privilege
-     * checks) relevant to the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; - */ - public java.util.List - getAccessReviewsOrBuilderList() { - if (accessReviewsBuilder_ != null) { - return accessReviewsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(accessReviews_); - } - } - /** - *
-     * Provides information on any Kubernetes access reviews (i.e. privilege
-     * checks) relevant to the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.AccessReview.Builder addAccessReviewsBuilder() { - return getAccessReviewsFieldBuilder().addBuilder( - com.google.cloud.securitycenter.v1.Kubernetes.AccessReview.getDefaultInstance()); - } - /** - *
-     * Provides information on any Kubernetes access reviews (i.e. privilege
-     * checks) relevant to the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; - */ - public com.google.cloud.securitycenter.v1.Kubernetes.AccessReview.Builder addAccessReviewsBuilder( - int index) { - return getAccessReviewsFieldBuilder().addBuilder( - index, com.google.cloud.securitycenter.v1.Kubernetes.AccessReview.getDefaultInstance()); - } - /** - *
-     * Provides information on any Kubernetes access reviews (i.e. privilege
-     * checks) relevant to the finding.
-     * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; - */ - public java.util.List - getAccessReviewsBuilderList() { - return getAccessReviewsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Kubernetes.AccessReview, com.google.cloud.securitycenter.v1.Kubernetes.AccessReview.Builder, com.google.cloud.securitycenter.v1.Kubernetes.AccessReviewOrBuilder> - getAccessReviewsFieldBuilder() { - if (accessReviewsBuilder_ == null) { - accessReviewsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.securitycenter.v1.Kubernetes.AccessReview, com.google.cloud.securitycenter.v1.Kubernetes.AccessReview.Builder, com.google.cloud.securitycenter.v1.Kubernetes.AccessReviewOrBuilder>( - accessReviews_, - ((bitField0_ & 0x00000020) != 0), - getParentForChildren(), - isClean()); - accessReviews_ = null; - } - return accessReviewsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Kubernetes) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Kubernetes) - private static final com.google.cloud.securitycenter.v1.Kubernetes DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Kubernetes(); - } - - public static com.google.cloud.securitycenter.v1.Kubernetes getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Kubernetes parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Kubernetes(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Kubernetes getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/KubernetesOrBuilder.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/KubernetesOrBuilder.java deleted file mode 100644 index 2462ec95f820..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/KubernetesOrBuilder.java +++ /dev/null @@ -1,298 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/kubernetes.proto - -package com.google.cloud.securitycenter.v1; - -public interface KubernetesOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Kubernetes) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Kubernetes Pods associated with the finding. This field will contain Pod
-   * records for each container that is owned by a Pod.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; - */ - java.util.List - getPodsList(); - /** - *
-   * Kubernetes Pods associated with the finding. This field will contain Pod
-   * records for each container that is owned by a Pod.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; - */ - com.google.cloud.securitycenter.v1.Kubernetes.Pod getPods(int index); - /** - *
-   * Kubernetes Pods associated with the finding. This field will contain Pod
-   * records for each container that is owned by a Pod.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; - */ - int getPodsCount(); - /** - *
-   * Kubernetes Pods associated with the finding. This field will contain Pod
-   * records for each container that is owned by a Pod.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; - */ - java.util.List - getPodsOrBuilderList(); - /** - *
-   * Kubernetes Pods associated with the finding. This field will contain Pod
-   * records for each container that is owned by a Pod.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; - */ - com.google.cloud.securitycenter.v1.Kubernetes.PodOrBuilder getPodsOrBuilder( - int index); - - /** - *
-   * Provides Kubernetes Node information.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - java.util.List - getNodesList(); - /** - *
-   * Provides Kubernetes Node information.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - com.google.cloud.securitycenter.v1.Kubernetes.Node getNodes(int index); - /** - *
-   * Provides Kubernetes Node information.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - int getNodesCount(); - /** - *
-   * Provides Kubernetes Node information.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - java.util.List - getNodesOrBuilderList(); - /** - *
-   * Provides Kubernetes Node information.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - com.google.cloud.securitycenter.v1.Kubernetes.NodeOrBuilder getNodesOrBuilder( - int index); - - /** - *
-   * GKE Node Pools associated with the finding. This field will
-   * contain NodePool information for each Node, when it is available.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; - */ - java.util.List - getNodePoolsList(); - /** - *
-   * GKE Node Pools associated with the finding. This field will
-   * contain NodePool information for each Node, when it is available.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; - */ - com.google.cloud.securitycenter.v1.Kubernetes.NodePool getNodePools(int index); - /** - *
-   * GKE Node Pools associated with the finding. This field will
-   * contain NodePool information for each Node, when it is available.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; - */ - int getNodePoolsCount(); - /** - *
-   * GKE Node Pools associated with the finding. This field will
-   * contain NodePool information for each Node, when it is available.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; - */ - java.util.List - getNodePoolsOrBuilderList(); - /** - *
-   * GKE Node Pools associated with the finding. This field will
-   * contain NodePool information for each Node, when it is available.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; - */ - com.google.cloud.securitycenter.v1.Kubernetes.NodePoolOrBuilder getNodePoolsOrBuilder( - int index); - - /** - *
-   * Provides Kubernetes role information for findings that involve
-   * Roles or ClusterRoles.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; - */ - java.util.List - getRolesList(); - /** - *
-   * Provides Kubernetes role information for findings that involve
-   * Roles or ClusterRoles.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; - */ - com.google.cloud.securitycenter.v1.Kubernetes.Role getRoles(int index); - /** - *
-   * Provides Kubernetes role information for findings that involve
-   * Roles or ClusterRoles.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; - */ - int getRolesCount(); - /** - *
-   * Provides Kubernetes role information for findings that involve
-   * Roles or ClusterRoles.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; - */ - java.util.List - getRolesOrBuilderList(); - /** - *
-   * Provides Kubernetes role information for findings that involve
-   * Roles or ClusterRoles.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; - */ - com.google.cloud.securitycenter.v1.Kubernetes.RoleOrBuilder getRolesOrBuilder( - int index); - - /** - *
-   * Provides Kubernetes role binding information for findings that involve
-   * RoleBindings or ClusterRoleBindings.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; - */ - java.util.List - getBindingsList(); - /** - *
-   * Provides Kubernetes role binding information for findings that involve
-   * RoleBindings or ClusterRoleBindings.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; - */ - com.google.cloud.securitycenter.v1.Kubernetes.Binding getBindings(int index); - /** - *
-   * Provides Kubernetes role binding information for findings that involve
-   * RoleBindings or ClusterRoleBindings.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; - */ - int getBindingsCount(); - /** - *
-   * Provides Kubernetes role binding information for findings that involve
-   * RoleBindings or ClusterRoleBindings.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; - */ - java.util.List - getBindingsOrBuilderList(); - /** - *
-   * Provides Kubernetes role binding information for findings that involve
-   * RoleBindings or ClusterRoleBindings.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; - */ - com.google.cloud.securitycenter.v1.Kubernetes.BindingOrBuilder getBindingsOrBuilder( - int index); - - /** - *
-   * Provides information on any Kubernetes access reviews (i.e. privilege
-   * checks) relevant to the finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; - */ - java.util.List - getAccessReviewsList(); - /** - *
-   * Provides information on any Kubernetes access reviews (i.e. privilege
-   * checks) relevant to the finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; - */ - com.google.cloud.securitycenter.v1.Kubernetes.AccessReview getAccessReviews(int index); - /** - *
-   * Provides information on any Kubernetes access reviews (i.e. privilege
-   * checks) relevant to the finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; - */ - int getAccessReviewsCount(); - /** - *
-   * Provides information on any Kubernetes access reviews (i.e. privilege
-   * checks) relevant to the finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; - */ - java.util.List - getAccessReviewsOrBuilderList(); - /** - *
-   * Provides information on any Kubernetes access reviews (i.e. privilege
-   * checks) relevant to the finding.
-   * 
- * - * repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; - */ - com.google.cloud.securitycenter.v1.Kubernetes.AccessReviewOrBuilder getAccessReviewsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/KubernetesProto.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/KubernetesProto.java deleted file mode 100644 index 2063b484c7ef..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/KubernetesProto.java +++ /dev/null @@ -1,171 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/kubernetes.proto - -package com.google.cloud.securitycenter.v1; - -public final class KubernetesProto { - private KubernetesProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_Kubernetes_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_Kubernetes_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_Kubernetes_Pod_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_Kubernetes_Pod_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_Kubernetes_Node_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_Kubernetes_Node_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_Kubernetes_NodePool_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_Kubernetes_NodePool_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_Kubernetes_Role_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_Kubernetes_Role_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_Kubernetes_Binding_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_Kubernetes_Binding_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_Kubernetes_Subject_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_Kubernetes_Subject_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_securitycenter_v1_Kubernetes_AccessReview_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_securitycenter_v1_Kubernetes_AccessReview_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n/google/cloud/securitycenter/v1/kuberne" + - "tes.proto\022\036google.cloud.securitycenter.v" + - "1\032.google/cloud/securitycenter/v1/contai" + - "ner.proto\032*google/cloud/securitycenter/v" + - "1/label.proto\"\276\n\n\nKubernetes\022<\n\004pods\030\001 \003" + - "(\0132..google.cloud.securitycenter.v1.Kube" + - "rnetes.Pod\022>\n\005nodes\030\002 \003(\0132/.google.cloud" + - ".securitycenter.v1.Kubernetes.Node\022G\n\nno" + - "de_pools\030\003 \003(\01323.google.cloud.securityce" + - "nter.v1.Kubernetes.NodePool\022>\n\005roles\030\004 \003" + - "(\0132/.google.cloud.securitycenter.v1.Kube" + - "rnetes.Role\022D\n\010bindings\030\005 \003(\01322.google.c" + - "loud.securitycenter.v1.Kubernetes.Bindin" + - "g\022O\n\016access_reviews\030\006 \003(\01327.google.cloud" + - ".securitycenter.v1.Kubernetes.AccessRevi" + - "ew\032\225\001\n\003Pod\022\n\n\002ns\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\0225\n\006" + - "labels\030\003 \003(\0132%.google.cloud.securitycent" + - "er.v1.Label\022=\n\ncontainers\030\004 \003(\0132).google" + - ".cloud.securitycenter.v1.Container\032\024\n\004No" + - "de\022\014\n\004name\030\001 \001(\t\032X\n\010NodePool\022\014\n\004name\030\001 \001" + - "(\t\022>\n\005nodes\030\002 \003(\0132/.google.cloud.securit" + - "ycenter.v1.Kubernetes.Node\032\236\001\n\004Role\022B\n\004k" + - "ind\030\001 \001(\01624.google.cloud.securitycenter." + - "v1.Kubernetes.Role.Kind\022\n\n\002ns\030\002 \001(\t\022\014\n\004n" + - "ame\030\003 \001(\t\"8\n\004Kind\022\024\n\020KIND_UNSPECIFIED\020\000\022" + - "\010\n\004ROLE\020\001\022\020\n\014CLUSTER_ROLE\020\002\032\250\001\n\007Binding\022" + - "\n\n\002ns\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\022=\n\004role\030\003 \001(\0132" + - "/.google.cloud.securitycenter.v1.Kuberne" + - "tes.Role\022D\n\010subjects\030\004 \003(\01322.google.clou" + - "d.securitycenter.v1.Kubernetes.Subject\032\276" + - "\001\n\007Subject\022I\n\004kind\030\001 \001(\0162;.google.cloud." + - "securitycenter.v1.Kubernetes.Subject.Aut" + - "hType\022\n\n\002ns\030\002 \001(\t\022\014\n\004name\030\003 \001(\t\"N\n\010AuthT" + - "ype\022\031\n\025AUTH_TYPE_UNSPECIFIED\020\000\022\010\n\004USER\020\001" + - "\022\022\n\016SERVICEACCOUNT\020\002\022\t\n\005GROUP\020\003\032}\n\014Acces" + - "sReview\022\r\n\005group\030\001 \001(\t\022\n\n\002ns\030\002 \001(\t\022\014\n\004na" + - "me\030\003 \001(\t\022\020\n\010resource\030\004 \001(\t\022\023\n\013subresourc" + - "e\030\005 \001(\t\022\014\n\004verb\030\006 \001(\t\022\017\n\007version\030\007 \001(\tB\353" + - "\001\n\"com.google.cloud.securitycenter.v1B\017K" + - "ubernetesProtoP\001ZLgoogle.golang.org/genp" + - "roto/googleapis/cloud/securitycenter/v1;" + - "securitycenter\252\002\036Google.Cloud.SecurityCe" + - "nter.V1\312\002\036Google\\Cloud\\SecurityCenter\\V1" + - "\352\002!Google::Cloud::SecurityCenter::V1b\006pr" + - "oto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.cloud.securitycenter.v1.ContainerProto.getDescriptor(), - com.google.cloud.securitycenter.v1.LabelProto.getDescriptor(), - }); - internal_static_google_cloud_securitycenter_v1_Kubernetes_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_securitycenter_v1_Kubernetes_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_Kubernetes_descriptor, - new java.lang.String[] { "Pods", "Nodes", "NodePools", "Roles", "Bindings", "AccessReviews", }); - internal_static_google_cloud_securitycenter_v1_Kubernetes_Pod_descriptor = - internal_static_google_cloud_securitycenter_v1_Kubernetes_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_securitycenter_v1_Kubernetes_Pod_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_Kubernetes_Pod_descriptor, - new java.lang.String[] { "Ns", "Name", "Labels", "Containers", }); - internal_static_google_cloud_securitycenter_v1_Kubernetes_Node_descriptor = - internal_static_google_cloud_securitycenter_v1_Kubernetes_descriptor.getNestedTypes().get(1); - internal_static_google_cloud_securitycenter_v1_Kubernetes_Node_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_Kubernetes_Node_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_securitycenter_v1_Kubernetes_NodePool_descriptor = - internal_static_google_cloud_securitycenter_v1_Kubernetes_descriptor.getNestedTypes().get(2); - internal_static_google_cloud_securitycenter_v1_Kubernetes_NodePool_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_Kubernetes_NodePool_descriptor, - new java.lang.String[] { "Name", "Nodes", }); - internal_static_google_cloud_securitycenter_v1_Kubernetes_Role_descriptor = - internal_static_google_cloud_securitycenter_v1_Kubernetes_descriptor.getNestedTypes().get(3); - internal_static_google_cloud_securitycenter_v1_Kubernetes_Role_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_Kubernetes_Role_descriptor, - new java.lang.String[] { "Kind", "Ns", "Name", }); - internal_static_google_cloud_securitycenter_v1_Kubernetes_Binding_descriptor = - internal_static_google_cloud_securitycenter_v1_Kubernetes_descriptor.getNestedTypes().get(4); - internal_static_google_cloud_securitycenter_v1_Kubernetes_Binding_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_Kubernetes_Binding_descriptor, - new java.lang.String[] { "Ns", "Name", "Role", "Subjects", }); - internal_static_google_cloud_securitycenter_v1_Kubernetes_Subject_descriptor = - internal_static_google_cloud_securitycenter_v1_Kubernetes_descriptor.getNestedTypes().get(5); - internal_static_google_cloud_securitycenter_v1_Kubernetes_Subject_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_Kubernetes_Subject_descriptor, - new java.lang.String[] { "Kind", "Ns", "Name", }); - internal_static_google_cloud_securitycenter_v1_Kubernetes_AccessReview_descriptor = - internal_static_google_cloud_securitycenter_v1_Kubernetes_descriptor.getNestedTypes().get(6); - internal_static_google_cloud_securitycenter_v1_Kubernetes_AccessReview_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_securitycenter_v1_Kubernetes_AccessReview_descriptor, - new java.lang.String[] { "Group", "Ns", "Name", "Resource", "Subresource", "Verb", "Version", }); - com.google.cloud.securitycenter.v1.ContainerProto.getDescriptor(); - com.google.cloud.securitycenter.v1.LabelProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Label.java b/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Label.java deleted file mode 100644 index e697e7f46d56..000000000000 --- a/owl-bot-staging/java-securitycenter/v1/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Label.java +++ /dev/null @@ -1,763 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/securitycenter/v1/label.proto - -package com.google.cloud.securitycenter.v1; - -/** - *
- * Label represents a generic name=value label. Label has separate name and
- * value fields to support filtering with contains().
- * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Label} - */ -public final class Label extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Label) - LabelOrBuilder { -private static final long serialVersionUID = 0L; - // Use Label.newBuilder() to construct. - private Label(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Label() { - name_ = ""; - value_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Label(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Label( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - value_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.LabelProto.internal_static_google_cloud_securitycenter_v1_Label_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.LabelProto.internal_static_google_cloud_securitycenter_v1_Label_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Label.class, com.google.cloud.securitycenter.v1.Label.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Label name.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Label name.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VALUE_FIELD_NUMBER = 2; - private volatile java.lang.Object value_; - /** - *
-   * Label value.
-   * 
- * - * string value = 2; - * @return The value. - */ - @java.lang.Override - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - value_ = s; - return s; - } - } - /** - *
-   * Label value.
-   * 
- * - * string value = 2; - * @return The bytes for value. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.securitycenter.v1.Label)) { - return super.equals(obj); - } - com.google.cloud.securitycenter.v1.Label other = (com.google.cloud.securitycenter.v1.Label) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getValue() - .equals(other.getValue())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + getValue().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.securitycenter.v1.Label parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Label parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Label parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Label parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Label parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.securitycenter.v1.Label parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Label parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Label parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Label parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Label parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.securitycenter.v1.Label parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.securitycenter.v1.Label parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.securitycenter.v1.Label prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Label represents a generic name=value label. Label has separate name and
-   * value fields to support filtering with contains().
-   * 
- * - * Protobuf type {@code google.cloud.securitycenter.v1.Label} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Label) - com.google.cloud.securitycenter.v1.LabelOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.securitycenter.v1.LabelProto.internal_static_google_cloud_securitycenter_v1_Label_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.LabelProto.internal_static_google_cloud_securitycenter_v1_Label_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Label.class, com.google.cloud.securitycenter.v1.Label.Builder.class); - } - - // Construct using com.google.cloud.securitycenter.v1.Label.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - value_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.securitycenter.v1.LabelProto.internal_static_google_cloud_securitycenter_v1_Label_descriptor; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Label getDefaultInstanceForType() { - return com.google.cloud.securitycenter.v1.Label.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Label build() { - com.google.cloud.securitycenter.v1.Label result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.securitycenter.v1.Label buildPartial() { - com.google.cloud.securitycenter.v1.Label result = new com.google.cloud.securitycenter.v1.Label(this); - result.name_ = name_; - result.value_ = value_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.securitycenter.v1.Label) { - return mergeFrom((com.google.cloud.securitycenter.v1.Label)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.securitycenter.v1.Label other) { - if (other == com.google.cloud.securitycenter.v1.Label.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getValue().isEmpty()) { - value_ = other.value_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.securitycenter.v1.Label parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.securitycenter.v1.Label) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Label name.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Label name.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Label name.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Label name.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Label name.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object value_ = ""; - /** - *
-     * Label value.
-     * 
- * - * string value = 2; - * @return The value. - */ - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - value_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Label value.
-     * 
- * - * string value = 2; - * @return The bytes for value. - */ - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Label value.
-     * 
- * - * string value = 2; - * @param value The value to set. - * @return This builder for chaining. - */ - public Builder setValue( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - value_ = value; - onChanged(); - return this; - } - /** - *
-     * Label value.
-     * 
- * - * string value = 2; - * @return This builder for chaining. - */ - public Builder clearValue() { - - value_ = getDefaultInstance().getValue(); - onChanged(); - return this; - } - /** - *
-     * Label value.
-     * 
- * - * string value = 2; - * @param value The bytes for value to set. - * @return This builder for chaining. - */ - public Builder setValueBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - value_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.Label) - } - - // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Label) - private static final com.google.cloud.securitycenter.v1.Label DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Label(); - } - - public static com.google.cloud.securitycenter.v1.Label getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser