* 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.Builderimplements + 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.Iterablevalues) { + 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. - mapexternal_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: - * - *
- *
- * - *- 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. - *
- 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. - *
- 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 OperationFuturebulkMuteFindingsAsync( - 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 OperationFuturebulkMuteFindingsAsync( - 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 OperationFuturebulkMuteFindingsAsync( - 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- */ - public final OperationCallablefuture = - * securityCenterClient.bulkMuteFindingsOperationCallable().futureCall(request); - * // Do something. - * BulkMuteFindingsResponse response = future.get(); - * } - * } - 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- */ - public final UnaryCallablefuture = - * securityCenterClient.bulkMuteFindingsCallable().futureCall(request); - * // Do something. - * Operation response = future.get(); - * } - * } 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- */ - public final UnaryCallablecreateSourceCallable() { - 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- */ - public final UnaryCallablefuture = securityCenterClient.createFindingCallable().futureCall(request); - * // Do something. - * Finding response = future.get(); - * } - * } 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- */ - public final UnaryCallablefuture = - * securityCenterClient.createMuteConfigCallable().futureCall(request); - * // Do something. - * MuteConfig response = future.get(); - * } - * } 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- */ - public final UnaryCallablefuture = - * securityCenterClient.createNotificationConfigCallable().futureCall(request); - * // Do something. - * NotificationConfig response = future.get(); - * } - * } - 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- */ - public final UnaryCallablefuture = securityCenterClient.deleteMuteConfigCallable().futureCall(request); - * // Do something. - * future.get(); - * } - * } 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- */ - public final UnaryCallablefuture = - * securityCenterClient.deleteNotificationConfigCallable().futureCall(request); - * // Do something. - * future.get(); - * } - * } - 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- */ - public final UnaryCallablefuture = - * securityCenterClient.getBigQueryExportCallable().futureCall(request); - * // Do something. - * BigQueryExport response = future.get(); - * } - * } 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- */ - public final UnaryCallablefuture = securityCenterClient.getIamPolicyCallable().futureCall(request); - * // Do something. - * Policy response = future.get(); - * } - * } 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- */ - public final UnaryCallablefuture = - * securityCenterClient.getMuteConfigCallable().futureCall(request); - * // Do something. - * MuteConfig response = future.get(); - * } - * } 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- */ - public final UnaryCallablefuture = - * securityCenterClient.getNotificationConfigCallable().futureCall(request); - * // Do something. - * NotificationConfig response = future.get(); - * } - * } - 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- */ - public final UnaryCallablefuture = - * securityCenterClient.getOrganizationSettingsCallable().futureCall(request); - * // Do something. - * OrganizationSettings response = future.get(); - * } - * } - 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- */ - public final UnaryCallablegetSourceCallable() { - 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- */ - public final UnaryCallablefuture = - * securityCenterClient.groupAssetsPagedCallable().futureCall(request); - * // Do something. - * for (GroupResult element : future.get().iterateAll()) { - * // doThingsWith(element); - * } - * } - * } - 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 UnaryCallablegroupAssetsCallable() { - 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: - *
- *
- * - * @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. - * - *- state_change - *
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: - *
- *
- * - * @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. - * - *- state_change - *
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- */ - public final UnaryCallablefuture = - * securityCenterClient.groupFindingsPagedCallable().futureCall(request); - * // Do something. - * for (GroupResult element : future.get().iterateAll()) { - * // doThingsWith(element); - * } - * } - * } - 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 UnaryCallablegroupFindingsCallable() { - 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- */ - public final UnaryCallablefuture = - * securityCenterClient.listAssetsPagedCallable().futureCall(request); - * // Do something. - * for (ListAssetsResponse.ListAssetsResult element : future.get().iterateAll()) { - * // doThingsWith(element); - * } - * } - * } 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 UnaryCallablelistAssetsCallable() { - 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- */ - public final UnaryCallablefuture = - * securityCenterClient.listFindingsPagedCallable().futureCall(request); - * // Do something. - * for (ListFindingsResponse.ListFindingsResult element : future.get().iterateAll()) { - * // doThingsWith(element); - * } - * } - * } - 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 UnaryCallablelistFindingsCallable() { - 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- */ - public final UnaryCallablefuture = - * securityCenterClient.listMuteConfigsPagedCallable().futureCall(request); - * // Do something. - * for (MuteConfig element : future.get().iterateAll()) { - * // doThingsWith(element); - * } - * } - * } - 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- */ - public final UnaryCallablefuture = - * securityCenterClient.listNotificationConfigsPagedCallable().futureCall(request); - * // Do something. - * for (NotificationConfig element : future.get().iterateAll()) { - * // doThingsWith(element); - * } - * } - * } - 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- */ - 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 UnaryCallablelistSourcesCallable() { - 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 OperationFuturerunAssetDiscoveryAsync( - 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 OperationFuturerunAssetDiscoveryAsync( - 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 OperationFuturerunAssetDiscoveryAsync( - 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- */ - public final OperationCallablefuture = - * securityCenterClient.runAssetDiscoveryOperationCallable().futureCall(request); - * // Do something. - * RunAssetDiscoveryResponse response = future.get(); - * } - * } - 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- */ - public final UnaryCallablefuture = - * securityCenterClient.runAssetDiscoveryCallable().futureCall(request); - * // Do something. - * Operation response = future.get(); - * } - * } 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- */ - public final UnaryCallablefuture = - * securityCenterClient.setFindingStateCallable().futureCall(request); - * // Do something. - * Finding response = future.get(); - * } - * } 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- */ - public final UnaryCallablefuture = securityCenterClient.setMuteCallable().futureCall(request); - * // Do something. - * Finding response = future.get(); - * } - * } 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- */ - public final UnaryCallablefuture = securityCenterClient.setIamPolicyCallable().futureCall(request); - * // Do something. - * Policy response = future.get(); - * } - * } 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- * - * @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, Listpermissions = new ArrayList<>(); - * TestIamPermissionsResponse response = - * securityCenterClient.testIamPermissions(resource, permissions); - * } - * } 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- * - * @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, Listpermissions = new ArrayList<>(); - * TestIamPermissionsResponse response = - * securityCenterClient.testIamPermissions(resource, permissions); - * } - * } 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- * - * @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. - * - *()) - * .build(); - * TestIamPermissionsResponse response = securityCenterClient.testIamPermissions(request); - * } - * } 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- */ - public final UnaryCallable()) - * .build(); - * ApiFuture future = - * securityCenterClient.testIamPermissionsCallable().futureCall(request); - * // Do something. - * TestIamPermissionsResponse response = future.get(); - * } - * } - 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- */ - public final UnaryCallablefuture = - * securityCenterClient.updateExternalSystemCallable().futureCall(request); - * // Do something. - * ExternalSystem response = future.get(); - * } - * } - 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- */ - public final UnaryCallablefuture = securityCenterClient.updateFindingCallable().futureCall(request); - * // Do something. - * Finding response = future.get(); - * } - * } 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- */ - public final UnaryCallablefuture = - * securityCenterClient.updateMuteConfigCallable().futureCall(request); - * // Do something. - * MuteConfig response = future.get(); - * } - * } 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- */ - public final UnaryCallablefuture = - * securityCenterClient.updateNotificationConfigCallable().futureCall(request); - * // Do something. - * NotificationConfig response = future.get(); - * } - * } - 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- */ - public final UnaryCallablefuture = - * securityCenterClient.updateOrganizationSettingsCallable().futureCall(request); - * // Do something. - * OrganizationSettings response = future.get(); - * } - * } - 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- */ - public final UnaryCallableupdateSourceCallable() { - 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- */ - public final UnaryCallablefuture = - * securityCenterClient.updateSecurityMarksCallable().futureCall(request); - * // Do something. - * SecurityMarks response = future.get(); - * } - * } - 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- */ - public final UnaryCallablefuture = - * securityCenterClient.createBigQueryExportCallable().futureCall(request); - * // Do something. - * BigQueryExport response = future.get(); - * } - * } - 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- */ - public final UnaryCallablefuture = - * securityCenterClient.deleteBigQueryExportCallable().futureCall(request); - * // Do something. - * future.get(); - * } - * } 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- */ - public final UnaryCallablefuture = - * securityCenterClient.updateBigQueryExportCallable().futureCall(request); - * // Do something. - * BigQueryExport response = future.get(); - * } - * } - 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- */ - public final UnaryCallablefuture = - * securityCenterClient.listBigQueryExportsPagedCallable().futureCall(request); - * // Do something. - * for (BigQueryExport element : future.get().iterateAll()) { - * // doThingsWith(element); - * } - * } - * } - 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