diff --git a/gapic-libraries-bom/pom.xml b/gapic-libraries-bom/pom.xml
index 5e87952ad21d..c09b7e28e9bf 100644
--- a/gapic-libraries-bom/pom.xml
+++ b/gapic-libraries-bom/pom.xml
@@ -16,7 +16,7 @@
- * Optional. Uncompiled proto files associated with the descriptor set, used for
- * display purposes (server-side compilation is not supported). These
+ * Optional. Uncompiled proto files associated with the descriptor set, used
+ * for display purposes (server-side compilation is not supported). These
* should match the inputs to 'protoc' command used to generate
* file_descriptor_set.
*
@@ -1890,8 +1890,8 @@ public interface GrpcServiceDefinitionOrBuilder
*
*
*
- * Optional. Uncompiled proto files associated with the descriptor set, used for
- * display purposes (server-side compilation is not supported). These
+ * Optional. Uncompiled proto files associated with the descriptor set, used
+ * for display purposes (server-side compilation is not supported). These
* should match the inputs to 'protoc' command used to generate
* file_descriptor_set.
*
@@ -1906,8 +1906,8 @@ public interface GrpcServiceDefinitionOrBuilder
*
*
*
- * Optional. Uncompiled proto files associated with the descriptor set, used for
- * display purposes (server-side compilation is not supported). These
+ * Optional. Uncompiled proto files associated with the descriptor set, used
+ * for display purposes (server-side compilation is not supported). These
* should match the inputs to 'protoc' command used to generate
* file_descriptor_set.
*
@@ -1922,8 +1922,8 @@ public interface GrpcServiceDefinitionOrBuilder
*
*
*
- * Optional. Uncompiled proto files associated with the descriptor set, used for
- * display purposes (server-side compilation is not supported). These
+ * Optional. Uncompiled proto files associated with the descriptor set, used
+ * for display purposes (server-side compilation is not supported). These
* should match the inputs to 'protoc' command used to generate
* file_descriptor_set.
*
@@ -1939,8 +1939,8 @@ public interface GrpcServiceDefinitionOrBuilder
*
*
*
- * Optional. Uncompiled proto files associated with the descriptor set, used for
- * display purposes (server-side compilation is not supported). These
+ * Optional. Uncompiled proto files associated with the descriptor set, used
+ * for display purposes (server-side compilation is not supported). These
* should match the inputs to 'protoc' command used to generate
* file_descriptor_set.
*
@@ -2088,8 +2088,8 @@ public com.google.cloud.apigateway.v1.ApiConfig.FileOrBuilder getFileDescriptorS
*
*
*
- * Optional. Uncompiled proto files associated with the descriptor set, used for
- * display purposes (server-side compilation is not supported). These
+ * Optional. Uncompiled proto files associated with the descriptor set, used
+ * for display purposes (server-side compilation is not supported). These
* should match the inputs to 'protoc' command used to generate
* file_descriptor_set.
*
@@ -2107,8 +2107,8 @@ public java.util.List
- * Optional. Uncompiled proto files associated with the descriptor set, used for
- * display purposes (server-side compilation is not supported). These
+ * Optional. Uncompiled proto files associated with the descriptor set, used
+ * for display purposes (server-side compilation is not supported). These
* should match the inputs to 'protoc' command used to generate
* file_descriptor_set.
*
@@ -2127,8 +2127,8 @@ public java.util.List
- * Optional. Uncompiled proto files associated with the descriptor set, used for
- * display purposes (server-side compilation is not supported). These
+ * Optional. Uncompiled proto files associated with the descriptor set, used
+ * for display purposes (server-side compilation is not supported). These
* should match the inputs to 'protoc' command used to generate
* file_descriptor_set.
*
@@ -2146,8 +2146,8 @@ public int getSourceCount() {
*
*
*
- * Optional. Uncompiled proto files associated with the descriptor set, used for
- * display purposes (server-side compilation is not supported). These
+ * Optional. Uncompiled proto files associated with the descriptor set, used
+ * for display purposes (server-side compilation is not supported). These
* should match the inputs to 'protoc' command used to generate
* file_descriptor_set.
*
@@ -2165,8 +2165,8 @@ public com.google.cloud.apigateway.v1.ApiConfig.File getSource(int index) {
*
*
*
- * Optional. Uncompiled proto files associated with the descriptor set, used for
- * display purposes (server-side compilation is not supported). These
+ * Optional. Uncompiled proto files associated with the descriptor set, used
+ * for display purposes (server-side compilation is not supported). These
* should match the inputs to 'protoc' command used to generate
* file_descriptor_set.
*
@@ -2881,8 +2881,8 @@ private void ensureSourceIsMutable() {
*
*
*
- * Optional. Uncompiled proto files associated with the descriptor set, used for
- * display purposes (server-side compilation is not supported). These
+ * Optional. Uncompiled proto files associated with the descriptor set, used
+ * for display purposes (server-side compilation is not supported). These
* should match the inputs to 'protoc' command used to generate
* file_descriptor_set.
*
@@ -2903,8 +2903,8 @@ public java.util.List
- * Optional. Uncompiled proto files associated with the descriptor set, used for
- * display purposes (server-side compilation is not supported). These
+ * Optional. Uncompiled proto files associated with the descriptor set, used
+ * for display purposes (server-side compilation is not supported). These
* should match the inputs to 'protoc' command used to generate
* file_descriptor_set.
*
@@ -2925,8 +2925,8 @@ public int getSourceCount() {
*
*
*
- * Optional. Uncompiled proto files associated with the descriptor set, used for
- * display purposes (server-side compilation is not supported). These
+ * Optional. Uncompiled proto files associated with the descriptor set, used
+ * for display purposes (server-side compilation is not supported). These
* should match the inputs to 'protoc' command used to generate
* file_descriptor_set.
*
@@ -2947,8 +2947,8 @@ public com.google.cloud.apigateway.v1.ApiConfig.File getSource(int index) {
*
*
*
- * Optional. Uncompiled proto files associated with the descriptor set, used for
- * display purposes (server-side compilation is not supported). These
+ * Optional. Uncompiled proto files associated with the descriptor set, used
+ * for display purposes (server-side compilation is not supported). These
* should match the inputs to 'protoc' command used to generate
* file_descriptor_set.
*
@@ -2975,8 +2975,8 @@ public Builder setSource(int index, com.google.cloud.apigateway.v1.ApiConfig.Fil
*
*
*
- * Optional. Uncompiled proto files associated with the descriptor set, used for
- * display purposes (server-side compilation is not supported). These
+ * Optional. Uncompiled proto files associated with the descriptor set, used
+ * for display purposes (server-side compilation is not supported). These
* should match the inputs to 'protoc' command used to generate
* file_descriptor_set.
*
@@ -3001,8 +3001,8 @@ public Builder setSource(
*
*
*
- * Optional. Uncompiled proto files associated with the descriptor set, used for
- * display purposes (server-side compilation is not supported). These
+ * Optional. Uncompiled proto files associated with the descriptor set, used
+ * for display purposes (server-side compilation is not supported). These
* should match the inputs to 'protoc' command used to generate
* file_descriptor_set.
*
@@ -3029,8 +3029,8 @@ public Builder addSource(com.google.cloud.apigateway.v1.ApiConfig.File value) {
*
*
*
- * Optional. Uncompiled proto files associated with the descriptor set, used for
- * display purposes (server-side compilation is not supported). These
+ * Optional. Uncompiled proto files associated with the descriptor set, used
+ * for display purposes (server-side compilation is not supported). These
* should match the inputs to 'protoc' command used to generate
* file_descriptor_set.
*
@@ -3057,8 +3057,8 @@ public Builder addSource(int index, com.google.cloud.apigateway.v1.ApiConfig.Fil
*
*
*
- * Optional. Uncompiled proto files associated with the descriptor set, used for
- * display purposes (server-side compilation is not supported). These
+ * Optional. Uncompiled proto files associated with the descriptor set, used
+ * for display purposes (server-side compilation is not supported). These
* should match the inputs to 'protoc' command used to generate
* file_descriptor_set.
*
@@ -3083,8 +3083,8 @@ public Builder addSource(
*
*
*
- * Optional. Uncompiled proto files associated with the descriptor set, used for
- * display purposes (server-side compilation is not supported). These
+ * Optional. Uncompiled proto files associated with the descriptor set, used
+ * for display purposes (server-side compilation is not supported). These
* should match the inputs to 'protoc' command used to generate
* file_descriptor_set.
*
@@ -3109,8 +3109,8 @@ public Builder addSource(
*
*
*
- * Optional. Uncompiled proto files associated with the descriptor set, used for
- * display purposes (server-side compilation is not supported). These
+ * Optional. Uncompiled proto files associated with the descriptor set, used
+ * for display purposes (server-side compilation is not supported). These
* should match the inputs to 'protoc' command used to generate
* file_descriptor_set.
*
@@ -3135,8 +3135,8 @@ public Builder addAllSource(
*
*
*
- * Optional. Uncompiled proto files associated with the descriptor set, used for
- * display purposes (server-side compilation is not supported). These
+ * Optional. Uncompiled proto files associated with the descriptor set, used
+ * for display purposes (server-side compilation is not supported). These
* should match the inputs to 'protoc' command used to generate
* file_descriptor_set.
*
@@ -3160,8 +3160,8 @@ public Builder clearSource() {
*
*
*
- * Optional. Uncompiled proto files associated with the descriptor set, used for
- * display purposes (server-side compilation is not supported). These
+ * Optional. Uncompiled proto files associated with the descriptor set, used
+ * for display purposes (server-side compilation is not supported). These
* should match the inputs to 'protoc' command used to generate
* file_descriptor_set.
*
@@ -3185,8 +3185,8 @@ public Builder removeSource(int index) {
*
*
*
- * Optional. Uncompiled proto files associated with the descriptor set, used for
- * display purposes (server-side compilation is not supported). These
+ * Optional. Uncompiled proto files associated with the descriptor set, used
+ * for display purposes (server-side compilation is not supported). These
* should match the inputs to 'protoc' command used to generate
* file_descriptor_set.
*
@@ -3203,8 +3203,8 @@ public com.google.cloud.apigateway.v1.ApiConfig.File.Builder getSourceBuilder(in
*
*
*
- * Optional. Uncompiled proto files associated with the descriptor set, used for
- * display purposes (server-side compilation is not supported). These
+ * Optional. Uncompiled proto files associated with the descriptor set, used
+ * for display purposes (server-side compilation is not supported). These
* should match the inputs to 'protoc' command used to generate
* file_descriptor_set.
*
@@ -3225,8 +3225,8 @@ public com.google.cloud.apigateway.v1.ApiConfig.FileOrBuilder getSourceOrBuilder
*
*
*
- * Optional. Uncompiled proto files associated with the descriptor set, used for
- * display purposes (server-side compilation is not supported). These
+ * Optional. Uncompiled proto files associated with the descriptor set, used
+ * for display purposes (server-side compilation is not supported). These
* should match the inputs to 'protoc' command used to generate
* file_descriptor_set.
*
@@ -3248,8 +3248,8 @@ public com.google.cloud.apigateway.v1.ApiConfig.FileOrBuilder getSourceOrBuilder
*
*
*
- * Optional. Uncompiled proto files associated with the descriptor set, used for
- * display purposes (server-side compilation is not supported). These
+ * Optional. Uncompiled proto files associated with the descriptor set, used
+ * for display purposes (server-side compilation is not supported). These
* should match the inputs to 'protoc' command used to generate
* file_descriptor_set.
*
@@ -3267,8 +3267,8 @@ public com.google.cloud.apigateway.v1.ApiConfig.File.Builder addSourceBuilder()
*
*
*
- * Optional. Uncompiled proto files associated with the descriptor set, used for
- * display purposes (server-side compilation is not supported). These
+ * Optional. Uncompiled proto files associated with the descriptor set, used
+ * for display purposes (server-side compilation is not supported). These
* should match the inputs to 'protoc' command used to generate
* file_descriptor_set.
*
@@ -3286,8 +3286,8 @@ public com.google.cloud.apigateway.v1.ApiConfig.File.Builder addSourceBuilder(in
*
*
*
- * Optional. Uncompiled proto files associated with the descriptor set, used for
- * display purposes (server-side compilation is not supported). These
+ * Optional. Uncompiled proto files associated with the descriptor set, used
+ * for display purposes (server-side compilation is not supported). These
* should match the inputs to 'protoc' command used to generate
* file_descriptor_set.
*
@@ -3710,8 +3710,8 @@ public com.google.protobuf.ByteString getDisplayNameBytes() {
*
*
*
- * Immutable. The Google Cloud IAM Service Account that Gateways serving this config
- * should use to authenticate to other services. This may either be the
+ * Immutable. The Google Cloud IAM Service Account that Gateways serving this
+ * config should use to authenticate to other services. This may either be the
* Service Account's email
* (`{ACCOUNT_ID}@{PROJECT}.iam.gserviceaccount.com`) or its full resource
* name (`projects/{PROJECT}/accounts/{UNIQUE_ID}`). This is most often used
@@ -3742,8 +3742,8 @@ public java.lang.String getGatewayServiceAccount() {
*
*
*
- * Immutable. The Google Cloud IAM Service Account that Gateways serving this config
- * should use to authenticate to other services. This may either be the
+ * Immutable. The Google Cloud IAM Service Account that Gateways serving this
+ * config should use to authenticate to other services. This may either be the
* Service Account's email
* (`{ACCOUNT_ID}@{PROJECT}.iam.gserviceaccount.com`) or its full resource
* name (`projects/{PROJECT}/accounts/{UNIQUE_ID}`). This is most often used
@@ -3974,8 +3974,8 @@ public com.google.cloud.apigateway.v1.ApiConfig.OpenApiDocument getOpenapiDocume
*
*
*
- * Optional. gRPC service definition files. If specified, openapi_documents must
- * not be included.
+ * Optional. gRPC service definition files. If specified, openapi_documents
+ * must not be included.
*
*
*
@@ -3992,8 +3992,8 @@ public com.google.cloud.apigateway.v1.ApiConfig.OpenApiDocument getOpenapiDocume
*
*
*
- * Optional. gRPC service definition files. If specified, openapi_documents must
- * not be included.
+ * Optional. gRPC service definition files. If specified, openapi_documents
+ * must not be included.
*
*
*
@@ -4011,8 +4011,8 @@ public com.google.cloud.apigateway.v1.ApiConfig.OpenApiDocument getOpenapiDocume
*
*
*
- * Optional. gRPC service definition files. If specified, openapi_documents must
- * not be included.
+ * Optional. gRPC service definition files. If specified, openapi_documents
+ * must not be included.
*
*
*
@@ -4028,8 +4028,8 @@ public int getGrpcServicesCount() {
*
*
*
- * Optional. gRPC service definition files. If specified, openapi_documents must
- * not be included.
+ * Optional. gRPC service definition files. If specified, openapi_documents
+ * must not be included.
*
*
*
@@ -4045,8 +4045,8 @@ public com.google.cloud.apigateway.v1.ApiConfig.GrpcServiceDefinition getGrpcSer
*
*
*
- * Optional. gRPC service definition files. If specified, openapi_documents must
- * not be included.
+ * Optional. gRPC service definition files. If specified, openapi_documents
+ * must not be included.
*
*
*
@@ -4068,8 +4068,8 @@ public com.google.cloud.apigateway.v1.ApiConfig.GrpcServiceDefinition getGrpcSer
*
*
*
- * Optional. Service Configuration files. At least one must be included when using gRPC
- * service definitions. See
+ * Optional. Service Configuration files. At least one must be included when
+ * using gRPC service definitions. See
* https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview
* for the expected file contents.
*
@@ -4096,8 +4096,8 @@ public com.google.cloud.apigateway.v1.ApiConfig.GrpcServiceDefinition getGrpcSer
*
*
*
- * Optional. Service Configuration files. At least one must be included when using gRPC
- * service definitions. See
+ * Optional. Service Configuration files. At least one must be included when
+ * using gRPC service definitions. See
* https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview
* for the expected file contents.
*
@@ -4124,8 +4124,8 @@ public com.google.cloud.apigateway.v1.ApiConfig.GrpcServiceDefinition getGrpcSer
*
*
*
- * Optional. Service Configuration files. At least one must be included when using gRPC
- * service definitions. See
+ * Optional. Service Configuration files. At least one must be included when
+ * using gRPC service definitions. See
* https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview
* for the expected file contents.
*
@@ -4151,8 +4151,8 @@ public int getManagedServiceConfigsCount() {
*
*
*
- * Optional. Service Configuration files. At least one must be included when using gRPC
- * service definitions. See
+ * Optional. Service Configuration files. At least one must be included when
+ * using gRPC service definitions. See
* https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview
* for the expected file contents.
*
@@ -4178,8 +4178,8 @@ public com.google.cloud.apigateway.v1.ApiConfig.File getManagedServiceConfigs(in
*
*
*
- * Optional. Service Configuration files. At least one must be included when using gRPC
- * service definitions. See
+ * Optional. Service Configuration files. At least one must be included when
+ * using gRPC service definitions. See
* https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview
* for the expected file contents.
*
@@ -5796,8 +5796,8 @@ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
*
*
*
- * Immutable. The Google Cloud IAM Service Account that Gateways serving this config
- * should use to authenticate to other services. This may either be the
+ * Immutable. The Google Cloud IAM Service Account that Gateways serving this
+ * config should use to authenticate to other services. This may either be the
* Service Account's email
* (`{ACCOUNT_ID}@{PROJECT}.iam.gserviceaccount.com`) or its full resource
* name (`projects/{PROJECT}/accounts/{UNIQUE_ID}`). This is most often used
@@ -5827,8 +5827,8 @@ public java.lang.String getGatewayServiceAccount() {
*
*
*
- * Immutable. The Google Cloud IAM Service Account that Gateways serving this config
- * should use to authenticate to other services. This may either be the
+ * Immutable. The Google Cloud IAM Service Account that Gateways serving this
+ * config should use to authenticate to other services. This may either be the
* Service Account's email
* (`{ACCOUNT_ID}@{PROJECT}.iam.gserviceaccount.com`) or its full resource
* name (`projects/{PROJECT}/accounts/{UNIQUE_ID}`). This is most often used
@@ -5858,8 +5858,8 @@ public com.google.protobuf.ByteString getGatewayServiceAccountBytes() {
*
*
*
- * Immutable. The Google Cloud IAM Service Account that Gateways serving this config
- * should use to authenticate to other services. This may either be the
+ * Immutable. The Google Cloud IAM Service Account that Gateways serving this
+ * config should use to authenticate to other services. This may either be the
* Service Account's email
* (`{ACCOUNT_ID}@{PROJECT}.iam.gserviceaccount.com`) or its full resource
* name (`projects/{PROJECT}/accounts/{UNIQUE_ID}`). This is most often used
@@ -5888,8 +5888,8 @@ public Builder setGatewayServiceAccount(java.lang.String value) {
*
*
*
- * Immutable. The Google Cloud IAM Service Account that Gateways serving this config
- * should use to authenticate to other services. This may either be the
+ * Immutable. The Google Cloud IAM Service Account that Gateways serving this
+ * config should use to authenticate to other services. This may either be the
* Service Account's email
* (`{ACCOUNT_ID}@{PROJECT}.iam.gserviceaccount.com`) or its full resource
* name (`projects/{PROJECT}/accounts/{UNIQUE_ID}`). This is most often used
@@ -5914,8 +5914,8 @@ public Builder clearGatewayServiceAccount() {
*
*
*
- * Immutable. The Google Cloud IAM Service Account that Gateways serving this config
- * should use to authenticate to other services. This may either be the
+ * Immutable. The Google Cloud IAM Service Account that Gateways serving this
+ * config should use to authenticate to other services. This may either be the
* Service Account's email
* (`{ACCOUNT_ID}@{PROJECT}.iam.gserviceaccount.com`) or its full resource
* name (`projects/{PROJECT}/accounts/{UNIQUE_ID}`). This is most often used
@@ -6634,8 +6634,8 @@ private void ensureGrpcServicesIsMutable() {
*
*
*
- * Optional. gRPC service definition files. If specified, openapi_documents must
- * not be included.
+ * Optional. gRPC service definition files. If specified, openapi_documents
+ * must not be included.
*
*
*
@@ -6655,8 +6655,8 @@ private void ensureGrpcServicesIsMutable() {
*
*
*
- * Optional. gRPC service definition files. If specified, openapi_documents must
- * not be included.
+ * Optional. gRPC service definition files. If specified, openapi_documents
+ * must not be included.
*
*
*
@@ -6675,8 +6675,8 @@ public int getGrpcServicesCount() {
*
*
*
- * Optional. gRPC service definition files. If specified, openapi_documents must
- * not be included.
+ * Optional. gRPC service definition files. If specified, openapi_documents
+ * must not be included.
*
*
*
@@ -6696,8 +6696,8 @@ public com.google.cloud.apigateway.v1.ApiConfig.GrpcServiceDefinition getGrpcSer
*
*
*
- * Optional. gRPC service definition files. If specified, openapi_documents must
- * not be included.
+ * Optional. gRPC service definition files. If specified, openapi_documents
+ * must not be included.
*
*
*
@@ -6723,8 +6723,8 @@ public Builder setGrpcServices(
*
*
*
- * Optional. gRPC service definition files. If specified, openapi_documents must
- * not be included.
+ * Optional. gRPC service definition files. If specified, openapi_documents
+ * must not be included.
*
*
*
@@ -6748,8 +6748,8 @@ public Builder setGrpcServices(
*
*
*
- * Optional. gRPC service definition files. If specified, openapi_documents must
- * not be included.
+ * Optional. gRPC service definition files. If specified, openapi_documents
+ * must not be included.
*
*
*
@@ -6775,8 +6775,8 @@ public Builder addGrpcServices(
*
*
*
- * Optional. gRPC service definition files. If specified, openapi_documents must
- * not be included.
+ * Optional. gRPC service definition files. If specified, openapi_documents
+ * must not be included.
*
*
*
@@ -6802,8 +6802,8 @@ public Builder addGrpcServices(
*
*
*
- * Optional. gRPC service definition files. If specified, openapi_documents must
- * not be included.
+ * Optional. gRPC service definition files. If specified, openapi_documents
+ * must not be included.
*
*
*
@@ -6826,8 +6826,8 @@ public Builder addGrpcServices(
*
*
*
- * Optional. gRPC service definition files. If specified, openapi_documents must
- * not be included.
+ * Optional. gRPC service definition files. If specified, openapi_documents
+ * must not be included.
*
*
*
@@ -6851,8 +6851,8 @@ public Builder addGrpcServices(
*
*
*
- * Optional. gRPC service definition files. If specified, openapi_documents must
- * not be included.
+ * Optional. gRPC service definition files. If specified, openapi_documents
+ * must not be included.
*
*
*
@@ -6876,8 +6876,8 @@ public Builder addAllGrpcServices(
*
*
*
- * Optional. gRPC service definition files. If specified, openapi_documents must
- * not be included.
+ * Optional. gRPC service definition files. If specified, openapi_documents
+ * must not be included.
*
*
*
@@ -6899,8 +6899,8 @@ public Builder clearGrpcServices() {
*
*
*
- * Optional. gRPC service definition files. If specified, openapi_documents must
- * not be included.
+ * Optional. gRPC service definition files. If specified, openapi_documents
+ * must not be included.
*
*
*
@@ -6922,8 +6922,8 @@ public Builder removeGrpcServices(int index) {
*
*
*
- * Optional. gRPC service definition files. If specified, openapi_documents must
- * not be included.
+ * Optional. gRPC service definition files. If specified, openapi_documents
+ * must not be included.
*
*
*
@@ -6939,8 +6939,8 @@ public Builder removeGrpcServices(int index) {
*
*
*
- * Optional. gRPC service definition files. If specified, openapi_documents must
- * not be included.
+ * Optional. gRPC service definition files. If specified, openapi_documents
+ * must not be included.
*
*
*
@@ -6960,8 +6960,8 @@ public Builder removeGrpcServices(int index) {
*
*
*
- * Optional. gRPC service definition files. If specified, openapi_documents must
- * not be included.
+ * Optional. gRPC service definition files. If specified, openapi_documents
+ * must not be included.
*
*
*
@@ -6982,8 +6982,8 @@ public Builder removeGrpcServices(int index) {
*
*
*
- * Optional. gRPC service definition files. If specified, openapi_documents must
- * not be included.
+ * Optional. gRPC service definition files. If specified, openapi_documents
+ * must not be included.
*
*
*
@@ -7001,8 +7001,8 @@ public Builder removeGrpcServices(int index) {
*
*
*
- * Optional. gRPC service definition files. If specified, openapi_documents must
- * not be included.
+ * Optional. gRPC service definition files. If specified, openapi_documents
+ * must not be included.
*
*
*
@@ -7021,8 +7021,8 @@ public Builder removeGrpcServices(int index) {
*
*
*
- * Optional. gRPC service definition files. If specified, openapi_documents must
- * not be included.
+ * Optional. gRPC service definition files. If specified, openapi_documents
+ * must not be included.
*
*
*
@@ -7073,8 +7073,8 @@ private void ensureManagedServiceConfigsIsMutable() {
*
*
*
- * Optional. Service Configuration files. At least one must be included when using gRPC
- * service definitions. See
+ * Optional. Service Configuration files. At least one must be included when
+ * using gRPC service definitions. See
* https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview
* for the expected file contents.
*
@@ -7104,8 +7104,8 @@ private void ensureManagedServiceConfigsIsMutable() {
*
*
*
- * Optional. Service Configuration files. At least one must be included when using gRPC
- * service definitions. See
+ * Optional. Service Configuration files. At least one must be included when
+ * using gRPC service definitions. See
* https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview
* for the expected file contents.
*
@@ -7134,8 +7134,8 @@ public int getManagedServiceConfigsCount() {
*
*
*
- * Optional. Service Configuration files. At least one must be included when using gRPC
- * service definitions. See
+ * Optional. Service Configuration files. At least one must be included when
+ * using gRPC service definitions. See
* https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview
* for the expected file contents.
*
@@ -7164,8 +7164,8 @@ public com.google.cloud.apigateway.v1.ApiConfig.File getManagedServiceConfigs(in
*
*
*
- * Optional. Service Configuration files. At least one must be included when using gRPC
- * service definitions. See
+ * Optional. Service Configuration files. At least one must be included when
+ * using gRPC service definitions. See
* https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview
* for the expected file contents.
*
@@ -7201,8 +7201,8 @@ public Builder setManagedServiceConfigs(
*
*
*
- * Optional. Service Configuration files. At least one must be included when using gRPC
- * service definitions. See
+ * Optional. Service Configuration files. At least one must be included when
+ * using gRPC service definitions. See
* https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview
* for the expected file contents.
*
@@ -7235,8 +7235,8 @@ public Builder setManagedServiceConfigs(
*
*
*
- * Optional. Service Configuration files. At least one must be included when using gRPC
- * service definitions. See
+ * Optional. Service Configuration files. At least one must be included when
+ * using gRPC service definitions. See
* https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview
* for the expected file contents.
*
@@ -7271,8 +7271,8 @@ public Builder addManagedServiceConfigs(com.google.cloud.apigateway.v1.ApiConfig
*
*
*
- * Optional. Service Configuration files. At least one must be included when using gRPC
- * service definitions. See
+ * Optional. Service Configuration files. At least one must be included when
+ * using gRPC service definitions. See
* https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview
* for the expected file contents.
*
@@ -7308,8 +7308,8 @@ public Builder addManagedServiceConfigs(
*
*
*
- * Optional. Service Configuration files. At least one must be included when using gRPC
- * service definitions. See
+ * Optional. Service Configuration files. At least one must be included when
+ * using gRPC service definitions. See
* https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview
* for the expected file contents.
*
@@ -7342,8 +7342,8 @@ public Builder addManagedServiceConfigs(
*
*
*
- * Optional. Service Configuration files. At least one must be included when using gRPC
- * service definitions. See
+ * Optional. Service Configuration files. At least one must be included when
+ * using gRPC service definitions. See
* https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview
* for the expected file contents.
*
@@ -7376,8 +7376,8 @@ public Builder addManagedServiceConfigs(
*
*
*
- * Optional. Service Configuration files. At least one must be included when using gRPC
- * service definitions. See
+ * Optional. Service Configuration files. At least one must be included when
+ * using gRPC service definitions. See
* https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview
* for the expected file contents.
*
@@ -7410,8 +7410,8 @@ public Builder addAllManagedServiceConfigs(
*
*
*
- * Optional. Service Configuration files. At least one must be included when using gRPC
- * service definitions. See
+ * Optional. Service Configuration files. At least one must be included when
+ * using gRPC service definitions. See
* https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview
* for the expected file contents.
*
@@ -7443,8 +7443,8 @@ public Builder clearManagedServiceConfigs() {
*
*
*
- * Optional. Service Configuration files. At least one must be included when using gRPC
- * service definitions. See
+ * Optional. Service Configuration files. At least one must be included when
+ * using gRPC service definitions. See
* https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview
* for the expected file contents.
*
@@ -7476,8 +7476,8 @@ public Builder removeManagedServiceConfigs(int index) {
*
*
*
- * Optional. Service Configuration files. At least one must be included when using gRPC
- * service definitions. See
+ * Optional. Service Configuration files. At least one must be included when
+ * using gRPC service definitions. See
* https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview
* for the expected file contents.
*
@@ -7503,8 +7503,8 @@ public com.google.cloud.apigateway.v1.ApiConfig.File.Builder getManagedServiceCo
*
*
*
- * Optional. Service Configuration files. At least one must be included when using gRPC
- * service definitions. See
+ * Optional. Service Configuration files. At least one must be included when
+ * using gRPC service definitions. See
* https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview
* for the expected file contents.
*
@@ -7534,8 +7534,8 @@ public com.google.cloud.apigateway.v1.ApiConfig.FileOrBuilder getManagedServiceC
*
*
*
- * Optional. Service Configuration files. At least one must be included when using gRPC
- * service definitions. See
+ * Optional. Service Configuration files. At least one must be included when
+ * using gRPC service definitions. See
* https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview
* for the expected file contents.
*
@@ -7565,8 +7565,8 @@ public com.google.cloud.apigateway.v1.ApiConfig.FileOrBuilder getManagedServiceC
*
*
*
- * Optional. Service Configuration files. At least one must be included when using gRPC
- * service definitions. See
+ * Optional. Service Configuration files. At least one must be included when
+ * using gRPC service definitions. See
* https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview
* for the expected file contents.
*
@@ -7592,8 +7592,8 @@ public com.google.cloud.apigateway.v1.ApiConfig.File.Builder addManagedServiceCo
*
*
*
- * Optional. Service Configuration files. At least one must be included when using gRPC
- * service definitions. See
+ * Optional. Service Configuration files. At least one must be included when
+ * using gRPC service definitions. See
* https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview
* for the expected file contents.
*
@@ -7620,8 +7620,8 @@ public com.google.cloud.apigateway.v1.ApiConfig.File.Builder addManagedServiceCo
*
*
*
- * Optional. Service Configuration files. At least one must be included when using gRPC
- * service definitions. See
+ * Optional. Service Configuration files. At least one must be included when
+ * using gRPC service definitions. See
* https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview
* for the expected file contents.
*
diff --git a/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/java/com/google/cloud/apigateway/v1/ApiConfigOrBuilder.java b/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/java/com/google/cloud/apigateway/v1/ApiConfigOrBuilder.java
index de2e37bd3d83..e0a3df2fac1b 100644
--- a/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/java/com/google/cloud/apigateway/v1/ApiConfigOrBuilder.java
+++ b/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/java/com/google/cloud/apigateway/v1/ApiConfigOrBuilder.java
@@ -237,8 +237,8 @@ java.lang.String getLabelsOrDefault(
*
*
*
- * Immutable. The Google Cloud IAM Service Account that Gateways serving this config
- * should use to authenticate to other services. This may either be the
+ * Immutable. The Google Cloud IAM Service Account that Gateways serving this
+ * config should use to authenticate to other services. This may either be the
* Service Account's email
* (`{ACCOUNT_ID}@{PROJECT}.iam.gserviceaccount.com`) or its full resource
* name (`projects/{PROJECT}/accounts/{UNIQUE_ID}`). This is most often used
@@ -258,8 +258,8 @@ java.lang.String getLabelsOrDefault(
*
*
*
- * Immutable. The Google Cloud IAM Service Account that Gateways serving this config
- * should use to authenticate to other services. This may either be the
+ * Immutable. The Google Cloud IAM Service Account that Gateways serving this
+ * config should use to authenticate to other services. This may either be the
* Service Account's email
* (`{ACCOUNT_ID}@{PROJECT}.iam.gserviceaccount.com`) or its full resource
* name (`projects/{PROJECT}/accounts/{UNIQUE_ID}`). This is most often used
@@ -414,8 +414,8 @@ com.google.cloud.apigateway.v1.ApiConfig.OpenApiDocumentOrBuilder getOpenapiDocu
*
*
*
- * Optional. gRPC service definition files. If specified, openapi_documents must
- * not be included.
+ * Optional. gRPC service definition files. If specified, openapi_documents
+ * must not be included.
*
*
*
@@ -429,8 +429,8 @@ com.google.cloud.apigateway.v1.ApiConfig.OpenApiDocumentOrBuilder getOpenapiDocu
*
*
*
- * Optional. gRPC service definition files. If specified, openapi_documents must
- * not be included.
+ * Optional. gRPC service definition files. If specified, openapi_documents
+ * must not be included.
*
*
*
@@ -443,8 +443,8 @@ com.google.cloud.apigateway.v1.ApiConfig.OpenApiDocumentOrBuilder getOpenapiDocu
*
*
*
- * Optional. gRPC service definition files. If specified, openapi_documents must
- * not be included.
+ * Optional. gRPC service definition files. If specified, openapi_documents
+ * must not be included.
*
*
*
@@ -457,8 +457,8 @@ com.google.cloud.apigateway.v1.ApiConfig.OpenApiDocumentOrBuilder getOpenapiDocu
*
*
*
- * Optional. gRPC service definition files. If specified, openapi_documents must
- * not be included.
+ * Optional. gRPC service definition files. If specified, openapi_documents
+ * must not be included.
*
*
*
@@ -472,8 +472,8 @@ com.google.cloud.apigateway.v1.ApiConfig.OpenApiDocumentOrBuilder getOpenapiDocu
*
*
*
- * Optional. gRPC service definition files. If specified, openapi_documents must
- * not be included.
+ * Optional. gRPC service definition files. If specified, openapi_documents
+ * must not be included.
*
*
*
@@ -487,8 +487,8 @@ com.google.cloud.apigateway.v1.ApiConfig.GrpcServiceDefinitionOrBuilder getGrpcS
*
*
*
- * Optional. Service Configuration files. At least one must be included when using gRPC
- * service definitions. See
+ * Optional. Service Configuration files. At least one must be included when
+ * using gRPC service definitions. See
* https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview
* for the expected file contents.
*
@@ -511,8 +511,8 @@ com.google.cloud.apigateway.v1.ApiConfig.GrpcServiceDefinitionOrBuilder getGrpcS
*
*
*
- * Optional. Service Configuration files. At least one must be included when using gRPC
- * service definitions. See
+ * Optional. Service Configuration files. At least one must be included when
+ * using gRPC service definitions. See
* https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview
* for the expected file contents.
*
@@ -535,8 +535,8 @@ com.google.cloud.apigateway.v1.ApiConfig.GrpcServiceDefinitionOrBuilder getGrpcS
*
*
*
- * Optional. Service Configuration files. At least one must be included when using gRPC
- * service definitions. See
+ * Optional. Service Configuration files. At least one must be included when
+ * using gRPC service definitions. See
* https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview
* for the expected file contents.
*
@@ -559,8 +559,8 @@ com.google.cloud.apigateway.v1.ApiConfig.GrpcServiceDefinitionOrBuilder getGrpcS
*
*
*
- * Optional. Service Configuration files. At least one must be included when using gRPC
- * service definitions. See
+ * Optional. Service Configuration files. At least one must be included when
+ * using gRPC service definitions. See
* https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview
* for the expected file contents.
*
@@ -584,8 +584,8 @@ com.google.cloud.apigateway.v1.ApiConfig.GrpcServiceDefinitionOrBuilder getGrpcS
*
*
*
- * Optional. Service Configuration files. At least one must be included when using gRPC
- * service definitions. See
+ * Optional. Service Configuration files. At least one must be included when
+ * using gRPC service definitions. See
* https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview
* for the expected file contents.
*
diff --git a/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/java/com/google/cloud/apigateway/v1/CreateApiConfigRequest.java b/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/java/com/google/cloud/apigateway/v1/CreateApiConfigRequest.java
index c71105004a94..8eb26555bbbd 100644
--- a/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/java/com/google/cloud/apigateway/v1/CreateApiConfigRequest.java
+++ b/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/java/com/google/cloud/apigateway/v1/CreateApiConfigRequest.java
@@ -140,8 +140,8 @@ public com.google.protobuf.ByteString getParentBytes() {
*
*
*
- * Required. Identifier to assign to the API Config. Must be unique within scope of
- * the parent resource.
+ * Required. Identifier to assign to the API Config. Must be unique within
+ * scope of the parent resource.
*
*
* string api_config_id = 2 [(.google.api.field_behavior) = REQUIRED];
@@ -165,8 +165,8 @@ public java.lang.String getApiConfigId() {
*
*
*
- * Required. Identifier to assign to the API Config. Must be unique within scope of
- * the parent resource.
+ * Required. Identifier to assign to the API Config. Must be unique within
+ * scope of the parent resource.
*
*
* string api_config_id = 2 [(.google.api.field_behavior) = REQUIRED];
@@ -756,8 +756,8 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) {
*
*
*
- * Required. Identifier to assign to the API Config. Must be unique within scope of
- * the parent resource.
+ * Required. Identifier to assign to the API Config. Must be unique within
+ * scope of the parent resource.
*
*
* string api_config_id = 2 [(.google.api.field_behavior) = REQUIRED];
@@ -780,8 +780,8 @@ public java.lang.String getApiConfigId() {
*
*
*
- * Required. Identifier to assign to the API Config. Must be unique within scope of
- * the parent resource.
+ * Required. Identifier to assign to the API Config. Must be unique within
+ * scope of the parent resource.
*
*
* string api_config_id = 2 [(.google.api.field_behavior) = REQUIRED];
@@ -804,8 +804,8 @@ public com.google.protobuf.ByteString getApiConfigIdBytes() {
*
*
*
- * Required. Identifier to assign to the API Config. Must be unique within scope of
- * the parent resource.
+ * Required. Identifier to assign to the API Config. Must be unique within
+ * scope of the parent resource.
*
*
* string api_config_id = 2 [(.google.api.field_behavior) = REQUIRED];
@@ -827,8 +827,8 @@ public Builder setApiConfigId(java.lang.String value) {
*
*
*
- * Required. Identifier to assign to the API Config. Must be unique within scope of
- * the parent resource.
+ * Required. Identifier to assign to the API Config. Must be unique within
+ * scope of the parent resource.
*
*
* string api_config_id = 2 [(.google.api.field_behavior) = REQUIRED];
@@ -846,8 +846,8 @@ public Builder clearApiConfigId() {
*
*
*
- * Required. Identifier to assign to the API Config. Must be unique within scope of
- * the parent resource.
+ * Required. Identifier to assign to the API Config. Must be unique within
+ * scope of the parent resource.
*
*
* string api_config_id = 2 [(.google.api.field_behavior) = REQUIRED];
diff --git a/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/java/com/google/cloud/apigateway/v1/CreateApiConfigRequestOrBuilder.java b/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/java/com/google/cloud/apigateway/v1/CreateApiConfigRequestOrBuilder.java
index 4707dc7afade..73c4f35a34ec 100644
--- a/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/java/com/google/cloud/apigateway/v1/CreateApiConfigRequestOrBuilder.java
+++ b/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/java/com/google/cloud/apigateway/v1/CreateApiConfigRequestOrBuilder.java
@@ -62,8 +62,8 @@ public interface CreateApiConfigRequestOrBuilder
*
*
*
- * Required. Identifier to assign to the API Config. Must be unique within scope of
- * the parent resource.
+ * Required. Identifier to assign to the API Config. Must be unique within
+ * scope of the parent resource.
*
*
* string api_config_id = 2 [(.google.api.field_behavior) = REQUIRED];
@@ -76,8 +76,8 @@ public interface CreateApiConfigRequestOrBuilder
*
*
*
- * Required. Identifier to assign to the API Config. Must be unique within scope of
- * the parent resource.
+ * Required. Identifier to assign to the API Config. Must be unique within
+ * scope of the parent resource.
*
*
* string api_config_id = 2 [(.google.api.field_behavior) = REQUIRED];
diff --git a/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/java/com/google/cloud/apigateway/v1/CreateGatewayRequest.java b/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/java/com/google/cloud/apigateway/v1/CreateGatewayRequest.java
index b18697e8d7b7..3ba13514d3a4 100644
--- a/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/java/com/google/cloud/apigateway/v1/CreateGatewayRequest.java
+++ b/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/java/com/google/cloud/apigateway/v1/CreateGatewayRequest.java
@@ -140,8 +140,8 @@ public com.google.protobuf.ByteString getParentBytes() {
*
*
*
- * Required. Identifier to assign to the Gateway. Must be unique within scope of
- * the parent resource.
+ * Required. Identifier to assign to the Gateway. Must be unique within scope
+ * of the parent resource.
*
*
* string gateway_id = 2 [(.google.api.field_behavior) = REQUIRED];
@@ -165,8 +165,8 @@ public java.lang.String getGatewayId() {
*
*
*
- * Required. Identifier to assign to the Gateway. Must be unique within scope of
- * the parent resource.
+ * Required. Identifier to assign to the Gateway. Must be unique within scope
+ * of the parent resource.
*
*
* string gateway_id = 2 [(.google.api.field_behavior) = REQUIRED];
@@ -754,8 +754,8 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) {
*
*
*
- * Required. Identifier to assign to the Gateway. Must be unique within scope of
- * the parent resource.
+ * Required. Identifier to assign to the Gateway. Must be unique within scope
+ * of the parent resource.
*
*
* string gateway_id = 2 [(.google.api.field_behavior) = REQUIRED];
@@ -778,8 +778,8 @@ public java.lang.String getGatewayId() {
*
*
*
- * Required. Identifier to assign to the Gateway. Must be unique within scope of
- * the parent resource.
+ * Required. Identifier to assign to the Gateway. Must be unique within scope
+ * of the parent resource.
*
*
* string gateway_id = 2 [(.google.api.field_behavior) = REQUIRED];
@@ -802,8 +802,8 @@ public com.google.protobuf.ByteString getGatewayIdBytes() {
*
*
*
- * Required. Identifier to assign to the Gateway. Must be unique within scope of
- * the parent resource.
+ * Required. Identifier to assign to the Gateway. Must be unique within scope
+ * of the parent resource.
*
*
* string gateway_id = 2 [(.google.api.field_behavior) = REQUIRED];
@@ -825,8 +825,8 @@ public Builder setGatewayId(java.lang.String value) {
*
*
*
- * Required. Identifier to assign to the Gateway. Must be unique within scope of
- * the parent resource.
+ * Required. Identifier to assign to the Gateway. Must be unique within scope
+ * of the parent resource.
*
*
* string gateway_id = 2 [(.google.api.field_behavior) = REQUIRED];
@@ -844,8 +844,8 @@ public Builder clearGatewayId() {
*
*
*
- * Required. Identifier to assign to the Gateway. Must be unique within scope of
- * the parent resource.
+ * Required. Identifier to assign to the Gateway. Must be unique within scope
+ * of the parent resource.
*
*
* string gateway_id = 2 [(.google.api.field_behavior) = REQUIRED];
diff --git a/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/java/com/google/cloud/apigateway/v1/CreateGatewayRequestOrBuilder.java b/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/java/com/google/cloud/apigateway/v1/CreateGatewayRequestOrBuilder.java
index 98005637704b..b9f6960e1ef8 100644
--- a/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/java/com/google/cloud/apigateway/v1/CreateGatewayRequestOrBuilder.java
+++ b/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/java/com/google/cloud/apigateway/v1/CreateGatewayRequestOrBuilder.java
@@ -62,8 +62,8 @@ public interface CreateGatewayRequestOrBuilder
*
*
*
- * Required. Identifier to assign to the Gateway. Must be unique within scope of
- * the parent resource.
+ * Required. Identifier to assign to the Gateway. Must be unique within scope
+ * of the parent resource.
*
*
* string gateway_id = 2 [(.google.api.field_behavior) = REQUIRED];
@@ -76,8 +76,8 @@ public interface CreateGatewayRequestOrBuilder
*
*
*
- * Required. Identifier to assign to the Gateway. Must be unique within scope of
- * the parent resource.
+ * Required. Identifier to assign to the Gateway. Must be unique within scope
+ * of the parent resource.
*
*
* string gateway_id = 2 [(.google.api.field_behavior) = REQUIRED];
diff --git a/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/java/com/google/cloud/apigateway/v1/OperationMetadata.java b/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/java/com/google/cloud/apigateway/v1/OperationMetadata.java
index b7e7916ed14f..40e44536c52e 100644
--- a/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/java/com/google/cloud/apigateway/v1/OperationMetadata.java
+++ b/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/java/com/google/cloud/apigateway/v1/OperationMetadata.java
@@ -1174,7 +1174,9 @@ public com.google.protobuf.ByteString getStatusMessageBytes() {
*
* Output only. Identifies whether the user has requested cancellation
* of the operation. Operations that have successfully been cancelled
- * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+ * have
+ * [google.longrunning.Operation.error][google.longrunning.Operation.error]
+ * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
* corresponding to `Code.CANCELLED`.
*
*
@@ -1249,7 +1251,8 @@ public com.google.protobuf.ByteString getApiVersionBytes() {
*
*
*
- * Output only. Diagnostics generated during processing of configuration source files.
+ * Output only. Diagnostics generated during processing of configuration
+ * source files.
*
*
*
@@ -1266,7 +1269,8 @@ public com.google.protobuf.ByteString getApiVersionBytes() {
*
*
*
- * Output only. Diagnostics generated during processing of configuration source files.
+ * Output only. Diagnostics generated during processing of configuration
+ * source files.
*
*
*
@@ -1284,7 +1288,8 @@ public com.google.protobuf.ByteString getApiVersionBytes() {
*
*
*
- * Output only. Diagnostics generated during processing of configuration source files.
+ * Output only. Diagnostics generated during processing of configuration
+ * source files.
*
*
*
@@ -1300,7 +1305,8 @@ public int getDiagnosticsCount() {
*
*
*
- * Output only. Diagnostics generated during processing of configuration source files.
+ * Output only. Diagnostics generated during processing of configuration
+ * source files.
*
*
*
@@ -1316,7 +1322,8 @@ public com.google.cloud.apigateway.v1.OperationMetadata.Diagnostic getDiagnostic
*
*
*
- * Output only. Diagnostics generated during processing of configuration source files.
+ * Output only. Diagnostics generated during processing of configuration
+ * source files.
*
*
*
@@ -2636,7 +2643,9 @@ public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) {
*
* Output only. Identifies whether the user has requested cancellation
* of the operation. Operations that have successfully been cancelled
- * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+ * have
+ * [google.longrunning.Operation.error][google.longrunning.Operation.error]
+ * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
* corresponding to `Code.CANCELLED`.
*
*
@@ -2655,7 +2664,9 @@ public boolean getRequestedCancellation() {
*
* Output only. Identifies whether the user has requested cancellation
* of the operation. Operations that have successfully been cancelled
- * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+ * have
+ * [google.longrunning.Operation.error][google.longrunning.Operation.error]
+ * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
* corresponding to `Code.CANCELLED`.
*
*
@@ -2678,7 +2689,9 @@ public Builder setRequestedCancellation(boolean value) {
*
* Output only. Identifies whether the user has requested cancellation
* of the operation. Operations that have successfully been cancelled
- * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+ * have
+ * [google.longrunning.Operation.error][google.longrunning.Operation.error]
+ * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
* corresponding to `Code.CANCELLED`.
*
*
@@ -2826,7 +2839,8 @@ private void ensureDiagnosticsIsMutable() {
*
*
*
- * Output only. Diagnostics generated during processing of configuration source files.
+ * Output only. Diagnostics generated during processing of configuration
+ * source files.
*
*
*
@@ -2846,7 +2860,8 @@ private void ensureDiagnosticsIsMutable() {
*
*
*
- * Output only. Diagnostics generated during processing of configuration source files.
+ * Output only. Diagnostics generated during processing of configuration
+ * source files.
*
*
*
@@ -2865,7 +2880,8 @@ public int getDiagnosticsCount() {
*
*
*
- * Output only. Diagnostics generated during processing of configuration source files.
+ * Output only. Diagnostics generated during processing of configuration
+ * source files.
*
*
*
@@ -2884,7 +2900,8 @@ public com.google.cloud.apigateway.v1.OperationMetadata.Diagnostic getDiagnostic
*
*
*
- * Output only. Diagnostics generated during processing of configuration source files.
+ * Output only. Diagnostics generated during processing of configuration
+ * source files.
*
*
*
@@ -2910,7 +2927,8 @@ public Builder setDiagnostics(
*
*
*
- * Output only. Diagnostics generated during processing of configuration source files.
+ * Output only. Diagnostics generated during processing of configuration
+ * source files.
*
*
*
@@ -2934,7 +2952,8 @@ public Builder setDiagnostics(
*
*
*
- * Output only. Diagnostics generated during processing of configuration source files.
+ * Output only. Diagnostics generated during processing of configuration
+ * source files.
*
*
*
@@ -2960,7 +2979,8 @@ public Builder addDiagnostics(
*
*
*
- * Output only. Diagnostics generated during processing of configuration source files.
+ * Output only. Diagnostics generated during processing of configuration
+ * source files.
*
*
*
@@ -2986,7 +3006,8 @@ public Builder addDiagnostics(
*
*
*
- * Output only. Diagnostics generated during processing of configuration source files.
+ * Output only. Diagnostics generated during processing of configuration
+ * source files.
*
*
*
@@ -3009,7 +3030,8 @@ public Builder addDiagnostics(
*
*
*
- * Output only. Diagnostics generated during processing of configuration source files.
+ * Output only. Diagnostics generated during processing of configuration
+ * source files.
*
*
*
@@ -3033,7 +3055,8 @@ public Builder addDiagnostics(
*
*
*
- * Output only. Diagnostics generated during processing of configuration source files.
+ * Output only. Diagnostics generated during processing of configuration
+ * source files.
*
*
*
@@ -3057,7 +3080,8 @@ public Builder addAllDiagnostics(
*
*
*
- * Output only. Diagnostics generated during processing of configuration source files.
+ * Output only. Diagnostics generated during processing of configuration
+ * source files.
*
*
*
@@ -3079,7 +3103,8 @@ public Builder clearDiagnostics() {
*
*
*
- * Output only. Diagnostics generated during processing of configuration source files.
+ * Output only. Diagnostics generated during processing of configuration
+ * source files.
*
*
*
@@ -3101,7 +3126,8 @@ public Builder removeDiagnostics(int index) {
*
*
*
- * Output only. Diagnostics generated during processing of configuration source files.
+ * Output only. Diagnostics generated during processing of configuration
+ * source files.
*
*
*
@@ -3117,7 +3143,8 @@ public Builder removeDiagnostics(int index) {
*
*
*
- * Output only. Diagnostics generated during processing of configuration source files.
+ * Output only. Diagnostics generated during processing of configuration
+ * source files.
*
*
*
@@ -3137,7 +3164,8 @@ public Builder removeDiagnostics(int index) {
*
*
*
- * Output only. Diagnostics generated during processing of configuration source files.
+ * Output only. Diagnostics generated during processing of configuration
+ * source files.
*
*
*
@@ -3158,7 +3186,8 @@ public Builder removeDiagnostics(int index) {
*
*
*
- * Output only. Diagnostics generated during processing of configuration source files.
+ * Output only. Diagnostics generated during processing of configuration
+ * source files.
*
*
*
@@ -3176,7 +3205,8 @@ public Builder removeDiagnostics(int index) {
*
*
*
- * Output only. Diagnostics generated during processing of configuration source files.
+ * Output only. Diagnostics generated during processing of configuration
+ * source files.
*
*
*
@@ -3195,7 +3225,8 @@ public Builder removeDiagnostics(int index) {
*
*
*
- * Output only. Diagnostics generated during processing of configuration source files.
+ * Output only. Diagnostics generated during processing of configuration
+ * source files.
*
*
*
diff --git a/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/java/com/google/cloud/apigateway/v1/OperationMetadataOrBuilder.java b/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/java/com/google/cloud/apigateway/v1/OperationMetadataOrBuilder.java
index 73e4d026bcd8..715940d1e332 100644
--- a/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/java/com/google/cloud/apigateway/v1/OperationMetadataOrBuilder.java
+++ b/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/java/com/google/cloud/apigateway/v1/OperationMetadataOrBuilder.java
@@ -190,7 +190,9 @@ public interface OperationMetadataOrBuilder
*
* Output only. Identifies whether the user has requested cancellation
* of the operation. Operations that have successfully been cancelled
- * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+ * have
+ * [google.longrunning.Operation.error][google.longrunning.Operation.error]
+ * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
* corresponding to `Code.CANCELLED`.
*
*
@@ -230,7 +232,8 @@ public interface OperationMetadataOrBuilder
*
*
*
- * Output only. Diagnostics generated during processing of configuration source files.
+ * Output only. Diagnostics generated during processing of configuration
+ * source files.
*
*
*
@@ -243,7 +246,8 @@ public interface OperationMetadataOrBuilder
*
*
*
- * Output only. Diagnostics generated during processing of configuration source files.
+ * Output only. Diagnostics generated during processing of configuration
+ * source files.
*
*
*
@@ -256,7 +260,8 @@ public interface OperationMetadataOrBuilder
*
*
*
- * Output only. Diagnostics generated during processing of configuration source files.
+ * Output only. Diagnostics generated during processing of configuration
+ * source files.
*
*
*
@@ -269,7 +274,8 @@ public interface OperationMetadataOrBuilder
*
*
*
- * Output only. Diagnostics generated during processing of configuration source files.
+ * Output only. Diagnostics generated during processing of configuration
+ * source files.
*
*
*
@@ -283,7 +289,8 @@ public interface OperationMetadataOrBuilder
*
*
*
- * Output only. Diagnostics generated during processing of configuration source files.
+ * Output only. Diagnostics generated during processing of configuration
+ * source files.
*
*
*
diff --git a/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/proto/google/cloud/apigateway/v1/apigateway.proto b/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/proto/google/cloud/apigateway/v1/apigateway.proto
index 127e916597eb..40779fc769fa 100644
--- a/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/proto/google/cloud/apigateway/v1/apigateway.proto
+++ b/java-api-gateway/proto-google-cloud-api-gateway-v1/src/main/proto/google/cloud/apigateway/v1/apigateway.proto
@@ -1,4 +1,4 @@
-// Copyright 2025 Google LLC
+// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -73,10 +73,12 @@ message Api {
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Created time.
- google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
+ google.protobuf.Timestamp create_time = 2
+ [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Updated time.
- google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
+ google.protobuf.Timestamp update_time = 3
+ [(google.api.field_behavior) = OUTPUT_ONLY];
// Optional. Resource labels to represent user-provided metadata.
// Refer to cloud documentation on labels for more details.
@@ -137,8 +139,8 @@ message ApiConfig {
// $ protoc --include_imports --include_source_info test.proto -o out.pb
File file_descriptor_set = 1 [(google.api.field_behavior) = INPUT_ONLY];
- // Optional. Uncompiled proto files associated with the descriptor set, used for
- // display purposes (server-side compilation is not supported). These
+ // Optional. Uncompiled proto files associated with the descriptor set, used
+ // for display purposes (server-side compilation is not supported). These
// should match the inputs to 'protoc' command used to generate
// file_descriptor_set.
repeated File source = 2 [(google.api.field_behavior) = OPTIONAL];
@@ -174,10 +176,12 @@ message ApiConfig {
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Created time.
- google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
+ google.protobuf.Timestamp create_time = 2
+ [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Updated time.
- google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
+ google.protobuf.Timestamp update_time = 3
+ [(google.api.field_behavior) = OUTPUT_ONLY];
// Optional. Resource labels to represent user-provided metadata.
// Refer to cloud documentation on labels for more details.
@@ -187,8 +191,8 @@ message ApiConfig {
// Optional. Display name.
string display_name = 5 [(google.api.field_behavior) = OPTIONAL];
- // Immutable. The Google Cloud IAM Service Account that Gateways serving this config
- // should use to authenticate to other services. This may either be the
+ // Immutable. The Google Cloud IAM Service Account that Gateways serving this
+ // config should use to authenticate to other services. This may either be the
// Service Account's email
// (`{ACCOUNT_ID}@{PROJECT}.iam.gserviceaccount.com`) or its full resource
// name (`projects/{PROJECT}/accounts/{UNIQUE_ID}`). This is most often used
@@ -215,14 +219,16 @@ message ApiConfig {
// Optional. OpenAPI specification documents. If specified, grpc_services and
// managed_service_configs must not be included.
- repeated OpenApiDocument openapi_documents = 9 [(google.api.field_behavior) = OPTIONAL];
+ repeated OpenApiDocument openapi_documents = 9
+ [(google.api.field_behavior) = OPTIONAL];
- // Optional. gRPC service definition files. If specified, openapi_documents must
- // not be included.
- repeated GrpcServiceDefinition grpc_services = 10 [(google.api.field_behavior) = OPTIONAL];
+ // Optional. gRPC service definition files. If specified, openapi_documents
+ // must not be included.
+ repeated GrpcServiceDefinition grpc_services = 10
+ [(google.api.field_behavior) = OPTIONAL];
- // Optional. Service Configuration files. At least one must be included when using gRPC
- // service definitions. See
+ // Optional. Service Configuration files. At least one must be included when
+ // using gRPC service definitions. See
// https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview
// for the expected file contents.
//
@@ -233,7 +239,8 @@ message ApiConfig {
// * Repeated fields are concatenated.
// * Singular embedded messages are merged using these rules for nested
// fields.
- repeated File managed_service_configs = 11 [(google.api.field_behavior) = OPTIONAL];
+ repeated File managed_service_configs = 11
+ [(google.api.field_behavior) = OPTIONAL];
}
// A Gateway is an API-aware HTTP proxy. It performs API-Method and/or
@@ -271,10 +278,12 @@ message Gateway {
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Created time.
- google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
+ google.protobuf.Timestamp create_time = 2
+ [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Updated time.
- google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
+ google.protobuf.Timestamp update_time = 3
+ [(google.api.field_behavior) = OUTPUT_ONLY];
// Optional. Resource labels to represent user-provided metadata.
// Refer to cloud documentation on labels for more details.
@@ -360,8 +369,8 @@ message CreateGatewayRequest {
}
];
- // Required. Identifier to assign to the Gateway. Must be unique within scope of
- // the parent resource.
+ // Required. Identifier to assign to the Gateway. Must be unique within scope
+ // of the parent resource.
string gateway_id = 2 [(google.api.field_behavior) = REQUIRED];
// Required. Gateway resource.
@@ -435,9 +444,7 @@ message GetApiRequest {
// `projects/*/locations/global/apis/*`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "apigateway.googleapis.com/Api"
- }
+ (google.api.resource_reference) = { type: "apigateway.googleapis.com/Api" }
];
}
@@ -479,9 +486,7 @@ message DeleteApiRequest {
// `projects/*/locations/global/apis/*`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "apigateway.googleapis.com/Api"
- }
+ (google.api.resource_reference) = { type: "apigateway.googleapis.com/Api" }
];
}
@@ -491,9 +496,7 @@ message ListApiConfigsRequest {
// `projects/*/locations/global/apis/*`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "apigateway.googleapis.com/Api"
- }
+ (google.api.resource_reference) = { type: "apigateway.googleapis.com/Api" }
];
// Page size.
@@ -554,13 +557,11 @@ message CreateApiConfigRequest {
// `projects/*/locations/global/apis/*`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "apigateway.googleapis.com/Api"
- }
+ (google.api.resource_reference) = { type: "apigateway.googleapis.com/Api" }
];
- // Required. Identifier to assign to the API Config. Must be unique within scope of
- // the parent resource.
+ // Required. Identifier to assign to the API Config. Must be unique within
+ // scope of the parent resource.
string api_config_id = 2 [(google.api.field_behavior) = REQUIRED];
// Required. API resource.
@@ -604,10 +605,12 @@ message OperationMetadata {
}
// Output only. The time the operation was created.
- google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
+ google.protobuf.Timestamp create_time = 1
+ [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The time the operation finished running.
- google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
+ google.protobuf.Timestamp end_time = 2
+ [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Server-defined resource path for the target of the operation.
string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
@@ -620,13 +623,17 @@ message OperationMetadata {
// Output only. Identifies whether the user has requested cancellation
// of the operation. Operations that have successfully been cancelled
- // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+ // have
+ // [google.longrunning.Operation.error][google.longrunning.Operation.error]
+ // value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
// corresponding to `Code.CANCELLED`.
bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. API version used to start the operation.
string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
- // Output only. Diagnostics generated during processing of configuration source files.
- repeated Diagnostic diagnostics = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
+ // Output only. Diagnostics generated during processing of configuration
+ // source files.
+ repeated Diagnostic diagnostics = 8
+ [(google.api.field_behavior) = OUTPUT_ONLY];
}
diff --git a/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/AuditManagerClient.java b/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/AuditManagerClient.java
index a713678d88f2..f0080187a3c9 100644
--- a/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/AuditManagerClient.java
+++ b/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/AuditManagerClient.java
@@ -36,6 +36,7 @@
import com.google.cloud.location.Location;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.longrunning.Operation;
+import com.google.protobuf.FieldMask;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.TimeUnit;
@@ -57,9 +58,12 @@
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (AuditManagerClient auditManagerClient = AuditManagerClient.create()) {
- * String scope = "scope109264468";
- * List destinations = new ArrayList<>();
- * Enrollment response = auditManagerClient.enrollResource(scope, destinations);
+ * EnrollmentStatusScopeName parent =
+ * EnrollmentStatusScopeName.ofFolderLocationName("[FOLDER]", "[LOCATION]");
+ * AuditSchedule auditSchedule = AuditSchedule.newBuilder().build();
+ * String auditScheduleId = "auditScheduleId1594553421";
+ * AuditSchedule response =
+ * auditManagerClient.createAuditSchedule(parent, auditSchedule, auditScheduleId);
* }
* }
*
@@ -74,6 +78,84 @@
* Method Variants
*
*
+ * CreateAuditSchedule
+ * Creates a new audit schedule in a given project and location.
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *
+ * createAuditSchedule(CreateAuditScheduleRequest request)
+ *
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *
+ * createAuditSchedule(EnrollmentStatusScopeName parent, AuditSchedule auditSchedule, String auditScheduleId)
+ *
createAuditSchedule(LocationName parent, AuditSchedule auditSchedule, String auditScheduleId)
+ *
createAuditSchedule(String parent, AuditSchedule auditSchedule, String auditScheduleId)
+ *
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *
+ * createAuditScheduleCallable()
+ *
+ *
+ *
+ *
+ * UpdateAuditSchedule
+ * Updates an existing audit schedule.
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *
+ * updateAuditSchedule(UpdateAuditScheduleRequest request)
+ *
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *
+ * updateAuditSchedule(AuditSchedule auditSchedule, FieldMask updateMask)
+ *
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *
+ * updateAuditScheduleCallable()
+ *
+ *
+ *
+ *
+ * GetAuditSchedule
+ * Gets details of a single audit schedule.
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *
+ * getAuditSchedule(GetAuditScheduleRequest request)
+ *
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *
+ * getAuditSchedule(AuditScheduleName name)
+ *
getAuditSchedule(String name)
+ *
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *
+ * getAuditScheduleCallable()
+ *
+ *
+ *
+ *
+ * ListAuditSchedules
+ * Lists audit schedules in a given project and location.
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *
+ * listAuditSchedules(ListAuditSchedulesRequest request)
+ *
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *
+ * listAuditSchedules(EnrollmentStatusScopeName parent)
+ *
listAuditSchedules(LocationName parent)
+ *
listAuditSchedules(String parent)
+ *
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *
+ * listAuditSchedulesPagedCallable()
+ *
listAuditSchedulesCallable()
+ *
+ *
+ *
+ *
* EnrollResource
* Adds your project, folder, or organization to Audit Manager. This method creates the Audit Manager service agent in your workload and grants required permissions to the service agent. If you make this request on a workload that's already enrolled, then this method overrides the existing set of destinations.
*
@@ -331,65 +413,706 @@ public static final AuditManagerClient create() throws IOException {
}
/**
- * Constructs an instance of AuditManagerClient, using the given settings. The channels are
- * created based on the settings passed in, or defaults for any settings that are not set.
+ * Constructs an instance of AuditManagerClient, 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 AuditManagerClient create(AuditManagerSettings settings) throws IOException {
+ return new AuditManagerClient(settings);
+ }
+
+ /**
+ * Constructs an instance of AuditManagerClient, using the given stub for making calls. This is
+ * for advanced usage - prefer using create(AuditManagerSettings).
+ */
+ public static final AuditManagerClient create(AuditManagerStub stub) {
+ return new AuditManagerClient(stub);
+ }
+
+ /**
+ * Constructs an instance of AuditManagerClient, 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 AuditManagerClient(AuditManagerSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((AuditManagerStubSettings) settings.getStubSettings()).createStub();
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
+ }
+
+ protected AuditManagerClient(AuditManagerStub 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 @Nullable AuditManagerSettings getSettings() {
+ return settings;
+ }
+
+ public AuditManagerStub 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.
+ /**
+ * Creates a new audit schedule in a given project and location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AuditManagerClient auditManagerClient = AuditManagerClient.create()) {
+ * EnrollmentStatusScopeName parent =
+ * EnrollmentStatusScopeName.ofFolderLocationName("[FOLDER]", "[LOCATION]");
+ * AuditSchedule auditSchedule = AuditSchedule.newBuilder().build();
+ * String auditScheduleId = "auditScheduleId1594553421";
+ * AuditSchedule response =
+ * auditManagerClient.createAuditSchedule(parent, auditSchedule, auditScheduleId);
+ * }
+ * }
+ *
+ * @param parent Required. Project or folder that this audit schedule is for, in one of the
+ * following formats:
+ *
+ * - `projects/{project}/locations/{location}`
+ *
- `folders/{folder}/locations/{location}`
+ *
+ *
+ * @param auditSchedule Required. Audit schedule to create.
+ * @param auditScheduleId Required. ID to use for the audit schedule, which becomes the final
+ * component of the audit schedule's resource name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AuditSchedule createAuditSchedule(
+ @Nullable EnrollmentStatusScopeName parent,
+ AuditSchedule auditSchedule,
+ String auditScheduleId) {
+ CreateAuditScheduleRequest request =
+ CreateAuditScheduleRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setAuditSchedule(auditSchedule)
+ .setAuditScheduleId(auditScheduleId)
+ .build();
+ return createAuditSchedule(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new audit schedule in a given project and location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AuditManagerClient auditManagerClient = AuditManagerClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * AuditSchedule auditSchedule = AuditSchedule.newBuilder().build();
+ * String auditScheduleId = "auditScheduleId1594553421";
+ * AuditSchedule response =
+ * auditManagerClient.createAuditSchedule(parent, auditSchedule, auditScheduleId);
+ * }
+ * }
+ *
+ * @param parent Required. Project or folder that this audit schedule is for, in one of the
+ * following formats:
+ *
+ * - `projects/{project}/locations/{location}`
+ *
- `folders/{folder}/locations/{location}`
+ *
+ *
+ * @param auditSchedule Required. Audit schedule to create.
+ * @param auditScheduleId Required. ID to use for the audit schedule, which becomes the final
+ * component of the audit schedule's resource name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AuditSchedule createAuditSchedule(
+ @Nullable LocationName parent, AuditSchedule auditSchedule, String auditScheduleId) {
+ CreateAuditScheduleRequest request =
+ CreateAuditScheduleRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setAuditSchedule(auditSchedule)
+ .setAuditScheduleId(auditScheduleId)
+ .build();
+ return createAuditSchedule(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new audit schedule in a given project and location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AuditManagerClient auditManagerClient = AuditManagerClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * AuditSchedule auditSchedule = AuditSchedule.newBuilder().build();
+ * String auditScheduleId = "auditScheduleId1594553421";
+ * AuditSchedule response =
+ * auditManagerClient.createAuditSchedule(parent, auditSchedule, auditScheduleId);
+ * }
+ * }
+ *
+ * @param parent Required. Project or folder that this audit schedule is for, in one of the
+ * following formats:
+ *
+ * - `projects/{project}/locations/{location}`
+ *
- `folders/{folder}/locations/{location}`
+ *
+ *
+ * @param auditSchedule Required. Audit schedule to create.
+ * @param auditScheduleId Required. ID to use for the audit schedule, which becomes the final
+ * component of the audit schedule's resource name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AuditSchedule createAuditSchedule(
+ String parent, AuditSchedule auditSchedule, String auditScheduleId) {
+ CreateAuditScheduleRequest request =
+ CreateAuditScheduleRequest.newBuilder()
+ .setParent(parent)
+ .setAuditSchedule(auditSchedule)
+ .setAuditScheduleId(auditScheduleId)
+ .build();
+ return createAuditSchedule(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new audit schedule in a given project and location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AuditManagerClient auditManagerClient = AuditManagerClient.create()) {
+ * CreateAuditScheduleRequest request =
+ * CreateAuditScheduleRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setAuditSchedule(AuditSchedule.newBuilder().build())
+ * .setAuditScheduleId("auditScheduleId1594553421")
+ * .setValidateOnly(true)
+ * .build();
+ * AuditSchedule response = auditManagerClient.createAuditSchedule(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 AuditSchedule createAuditSchedule(CreateAuditScheduleRequest request) {
+ return createAuditScheduleCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new audit schedule in a given project and location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AuditManagerClient auditManagerClient = AuditManagerClient.create()) {
+ * CreateAuditScheduleRequest request =
+ * CreateAuditScheduleRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setAuditSchedule(AuditSchedule.newBuilder().build())
+ * .setAuditScheduleId("auditScheduleId1594553421")
+ * .setValidateOnly(true)
+ * .build();
+ * ApiFuture future =
+ * auditManagerClient.createAuditScheduleCallable().futureCall(request);
+ * // Do something.
+ * AuditSchedule response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ createAuditScheduleCallable() {
+ return stub.createAuditScheduleCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an existing audit schedule.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AuditManagerClient auditManagerClient = AuditManagerClient.create()) {
+ * AuditSchedule auditSchedule = AuditSchedule.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * AuditSchedule response = auditManagerClient.updateAuditSchedule(auditSchedule, updateMask);
+ * }
+ * }
+ *
+ * @param auditSchedule Required. Audit schedule to update.
+ * @param updateMask Optional. List of fields to update.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AuditSchedule updateAuditSchedule(
+ AuditSchedule auditSchedule, FieldMask updateMask) {
+ UpdateAuditScheduleRequest request =
+ UpdateAuditScheduleRequest.newBuilder()
+ .setAuditSchedule(auditSchedule)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateAuditSchedule(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an existing audit schedule.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AuditManagerClient auditManagerClient = AuditManagerClient.create()) {
+ * UpdateAuditScheduleRequest request =
+ * UpdateAuditScheduleRequest.newBuilder()
+ * .setAuditSchedule(AuditSchedule.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * AuditSchedule response = auditManagerClient.updateAuditSchedule(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 AuditSchedule updateAuditSchedule(UpdateAuditScheduleRequest request) {
+ return updateAuditScheduleCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an existing audit schedule.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AuditManagerClient auditManagerClient = AuditManagerClient.create()) {
+ * UpdateAuditScheduleRequest request =
+ * UpdateAuditScheduleRequest.newBuilder()
+ * .setAuditSchedule(AuditSchedule.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * ApiFuture future =
+ * auditManagerClient.updateAuditScheduleCallable().futureCall(request);
+ * // Do something.
+ * AuditSchedule response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ updateAuditScheduleCallable() {
+ return stub.updateAuditScheduleCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single audit schedule.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AuditManagerClient auditManagerClient = AuditManagerClient.create()) {
+ * AuditScheduleName name =
+ * AuditScheduleName.ofProjectLocationAuditScheduleName(
+ * "[PROJECT]", "[LOCATION]", "[AUDIT_SCHEDULE]");
+ * AuditSchedule response = auditManagerClient.getAuditSchedule(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the audit schedule to retrieve, in one of the following formats:
+ *
+ * - `projects/{project}/locations/{location}/auditSchedules/{audit_schedule}`
+ *
- `folders/{folder}/locations/{location}/auditSchedules/{audit_schedule}`
+ *
- `organizations/{organization}/locations/{location}/auditSchedules/{audit_schedule}`
+ *
+ *
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AuditSchedule getAuditSchedule(@Nullable AuditScheduleName name) {
+ GetAuditScheduleRequest request =
+ GetAuditScheduleRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getAuditSchedule(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single audit schedule.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AuditManagerClient auditManagerClient = AuditManagerClient.create()) {
+ * String name =
+ * AuditScheduleName.ofProjectLocationAuditScheduleName(
+ * "[PROJECT]", "[LOCATION]", "[AUDIT_SCHEDULE]")
+ * .toString();
+ * AuditSchedule response = auditManagerClient.getAuditSchedule(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the audit schedule to retrieve, in one of the following formats:
+ *
+ * - `projects/{project}/locations/{location}/auditSchedules/{audit_schedule}`
+ *
- `folders/{folder}/locations/{location}/auditSchedules/{audit_schedule}`
+ *
- `organizations/{organization}/locations/{location}/auditSchedules/{audit_schedule}`
+ *
+ *
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AuditSchedule getAuditSchedule(String name) {
+ GetAuditScheduleRequest request = GetAuditScheduleRequest.newBuilder().setName(name).build();
+ return getAuditSchedule(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single audit schedule.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AuditManagerClient auditManagerClient = AuditManagerClient.create()) {
+ * GetAuditScheduleRequest request =
+ * GetAuditScheduleRequest.newBuilder()
+ * .setName(
+ * AuditScheduleName.ofProjectLocationAuditScheduleName(
+ * "[PROJECT]", "[LOCATION]", "[AUDIT_SCHEDULE]")
+ * .toString())
+ * .build();
+ * AuditSchedule response = auditManagerClient.getAuditSchedule(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 AuditSchedule getAuditSchedule(GetAuditScheduleRequest request) {
+ return getAuditScheduleCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single audit schedule.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AuditManagerClient auditManagerClient = AuditManagerClient.create()) {
+ * GetAuditScheduleRequest request =
+ * GetAuditScheduleRequest.newBuilder()
+ * .setName(
+ * AuditScheduleName.ofProjectLocationAuditScheduleName(
+ * "[PROJECT]", "[LOCATION]", "[AUDIT_SCHEDULE]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * auditManagerClient.getAuditScheduleCallable().futureCall(request);
+ * // Do something.
+ * AuditSchedule response = future.get();
+ * }
+ * }
*/
- public static final AuditManagerClient create(AuditManagerSettings settings) throws IOException {
- return new AuditManagerClient(settings);
+ public final UnaryCallable getAuditScheduleCallable() {
+ return stub.getAuditScheduleCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Constructs an instance of AuditManagerClient, using the given stub for making calls. This is
- * for advanced usage - prefer using create(AuditManagerSettings).
+ * Lists audit schedules in a given project and location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AuditManagerClient auditManagerClient = AuditManagerClient.create()) {
+ * EnrollmentStatusScopeName parent =
+ * EnrollmentStatusScopeName.ofFolderLocationName("[FOLDER]", "[LOCATION]");
+ * for (AuditSchedule element : auditManagerClient.listAuditSchedules(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent for the audit schedule, in one of the following formats:
+ *
+ * - `projects/{project}/locations/{location}`
+ *
- `folders/{folder}/locations/{location}`
+ *
- `organizations/{organization}/locations/{location}`
+ *
+ *
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public static final AuditManagerClient create(AuditManagerStub stub) {
- return new AuditManagerClient(stub);
+ public final ListAuditSchedulesPagedResponse listAuditSchedules(
+ @Nullable EnrollmentStatusScopeName parent) {
+ ListAuditSchedulesRequest request =
+ ListAuditSchedulesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listAuditSchedules(request);
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Constructs an instance of AuditManagerClient, 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.
+ * Lists audit schedules in a given project and location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AuditManagerClient auditManagerClient = AuditManagerClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (AuditSchedule element : auditManagerClient.listAuditSchedules(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent for the audit schedule, in one of the following formats:
+ *
+ * - `projects/{project}/locations/{location}`
+ *
- `folders/{folder}/locations/{location}`
+ *
- `organizations/{organization}/locations/{location}`
+ *
+ *
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- protected AuditManagerClient(AuditManagerSettings settings) throws IOException {
- this.settings = settings;
- this.stub = ((AuditManagerStubSettings) settings.getStubSettings()).createStub();
- this.operationsClient =
- com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
- this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
- }
-
- protected AuditManagerClient(AuditManagerStub 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 ListAuditSchedulesPagedResponse listAuditSchedules(@Nullable LocationName parent) {
+ ListAuditSchedulesRequest request =
+ ListAuditSchedulesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listAuditSchedules(request);
}
- public final @Nullable AuditManagerSettings getSettings() {
- return settings;
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists audit schedules in a given project and location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AuditManagerClient auditManagerClient = AuditManagerClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (AuditSchedule element : auditManagerClient.listAuditSchedules(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent for the audit schedule, in one of the following formats:
+ *
+ * - `projects/{project}/locations/{location}`
+ *
- `folders/{folder}/locations/{location}`
+ *
- `organizations/{organization}/locations/{location}`
+ *
+ *
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListAuditSchedulesPagedResponse listAuditSchedules(String parent) {
+ ListAuditSchedulesRequest request =
+ ListAuditSchedulesRequest.newBuilder().setParent(parent).build();
+ return listAuditSchedules(request);
}
- public AuditManagerStub getStub() {
- return stub;
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists audit schedules in a given project and location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AuditManagerClient auditManagerClient = AuditManagerClient.create()) {
+ * ListAuditSchedulesRequest request =
+ * ListAuditSchedulesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (AuditSchedule element : auditManagerClient.listAuditSchedules(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 ListAuditSchedulesPagedResponse listAuditSchedules(
+ ListAuditSchedulesRequest request) {
+ return listAuditSchedulesPagedCallable().call(request);
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Returns the OperationsClient that can be used to query the status of a long-running operation
- * returned by another API method call.
+ * Lists audit schedules in a given project and location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AuditManagerClient auditManagerClient = AuditManagerClient.create()) {
+ * ListAuditSchedulesRequest request =
+ * ListAuditSchedulesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * auditManagerClient.listAuditSchedulesPagedCallable().futureCall(request);
+ * // Do something.
+ * for (AuditSchedule element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
*/
- public final com.google.longrunning.OperationsClient getOperationsClient() {
- return operationsClient;
+ public final UnaryCallable
+ listAuditSchedulesPagedCallable() {
+ return stub.listAuditSchedulesPagedCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Returns the OperationsClient that can be used to query the status of a long-running operation
- * returned by another API method call.
+ * Lists audit schedules in a given project and location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AuditManagerClient auditManagerClient = AuditManagerClient.create()) {
+ * ListAuditSchedulesRequest request =
+ * ListAuditSchedulesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListAuditSchedulesResponse response =
+ * auditManagerClient.listAuditSchedulesCallable().call(request);
+ * for (AuditSchedule element : response.getAuditSchedulesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
*/
- @BetaApi
- public final OperationsClient getHttpJsonOperationsClient() {
- return httpJsonOperationsClient;
+ public final UnaryCallable
+ listAuditSchedulesCallable() {
+ return stub.listAuditSchedulesCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
@@ -457,6 +1180,7 @@ public final Enrollment enrollResource(
* EnrollResourceRequest.newBuilder()
* .setScope("scope109264468")
* .addAllDestinations(new ArrayList())
+ * .setValidateOnly(true)
* .build();
* Enrollment response = auditManagerClient.enrollResource(request);
* }
@@ -489,6 +1213,7 @@ public final Enrollment enrollResource(EnrollResourceRequest request) {
* EnrollResourceRequest.newBuilder()
* .setScope("scope109264468")
* .addAllDestinations(new ArrayList())
+ * .setValidateOnly(true)
* .build();
* ApiFuture future =
* auditManagerClient.enrollResourceCallable().futureCall(request);
@@ -584,6 +1309,7 @@ public final AuditScopeReport generateAuditScopeReport(
* .setScope("scope109264468")
* .setComplianceStandard("complianceStandard-1534269448")
* .setComplianceFramework("complianceFramework-1808314333")
+ * .setValidateOnly(true)
* .build();
* AuditScopeReport response = auditManagerClient.generateAuditScopeReport(request);
* }
@@ -622,6 +1348,7 @@ public final AuditScopeReport generateAuditScopeReport(GenerateAuditScopeReportR
* .setScope("scope109264468")
* .setComplianceStandard("complianceStandard-1534269448")
* .setComplianceFramework("complianceFramework-1808314333")
+ * .setValidateOnly(true)
* .build();
* ApiFuture future =
* auditManagerClient.generateAuditScopeReportCallable().futureCall(request);
@@ -1888,6 +2615,89 @@ public boolean awaitTermination(long duration, TimeUnit unit) throws Interrupted
return stub.awaitTermination(duration, unit);
}
+ public static class ListAuditSchedulesPagedResponse
+ extends AbstractPagedListResponse<
+ ListAuditSchedulesRequest,
+ ListAuditSchedulesResponse,
+ AuditSchedule,
+ ListAuditSchedulesPage,
+ ListAuditSchedulesFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ ListAuditSchedulesPage.createEmptyPage().createPageAsync(context, futureResponse);
+ return ApiFutures.transform(
+ futurePage,
+ input -> new ListAuditSchedulesPagedResponse(input),
+ MoreExecutors.directExecutor());
+ }
+
+ private ListAuditSchedulesPagedResponse(ListAuditSchedulesPage page) {
+ super(page, ListAuditSchedulesFixedSizeCollection.createEmptyCollection());
+ }
+ }
+
+ public static class ListAuditSchedulesPage
+ extends AbstractPage<
+ ListAuditSchedulesRequest,
+ ListAuditSchedulesResponse,
+ AuditSchedule,
+ ListAuditSchedulesPage> {
+
+ private ListAuditSchedulesPage(
+ @Nullable PageContext
+ context,
+ @Nullable ListAuditSchedulesResponse response) {
+ super(context, response);
+ }
+
+ private static ListAuditSchedulesPage createEmptyPage() {
+ return new ListAuditSchedulesPage(null, null);
+ }
+
+ @Override
+ protected ListAuditSchedulesPage createPage(
+ @Nullable PageContext
+ context,
+ @Nullable ListAuditSchedulesResponse response) {
+ return new ListAuditSchedulesPage(context, response);
+ }
+
+ @Override
+ public ApiFuture createPageAsync(
+ @Nullable PageContext
+ context,
+ ApiFuture futureResponse) {
+ return super.createPageAsync(context, futureResponse);
+ }
+ }
+
+ public static class ListAuditSchedulesFixedSizeCollection
+ extends AbstractFixedSizeCollection<
+ ListAuditSchedulesRequest,
+ ListAuditSchedulesResponse,
+ AuditSchedule,
+ ListAuditSchedulesPage,
+ ListAuditSchedulesFixedSizeCollection> {
+
+ private ListAuditSchedulesFixedSizeCollection(
+ @Nullable List pages, int collectionSize) {
+ super(pages, collectionSize);
+ }
+
+ private static ListAuditSchedulesFixedSizeCollection createEmptyCollection() {
+ return new ListAuditSchedulesFixedSizeCollection(null, 0);
+ }
+
+ @Override
+ protected ListAuditSchedulesFixedSizeCollection createCollection(
+ @Nullable List pages, int collectionSize) {
+ return new ListAuditSchedulesFixedSizeCollection(pages, collectionSize);
+ }
+ }
+
public static class ListAuditReportsPagedResponse
extends AbstractPagedListResponse<
ListAuditReportsRequest,
diff --git a/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/AuditManagerSettings.java b/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/AuditManagerSettings.java
index 03531da4c073..6578cd45d307 100644
--- a/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/AuditManagerSettings.java
+++ b/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/AuditManagerSettings.java
@@ -17,6 +17,7 @@
package com.google.cloud.auditmanager.v1;
import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListAuditReportsPagedResponse;
+import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListAuditSchedulesPagedResponse;
import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListControlsPagedResponse;
import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListLocationsPagedResponse;
import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListResourceEnrollmentStatusesPagedResponse;
@@ -63,7 +64,7 @@
*
* For example, to set the
* [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
- * of enrollResource:
+ * of createAuditSchedule:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
@@ -73,10 +74,10 @@
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* AuditManagerSettings.Builder auditManagerSettingsBuilder = AuditManagerSettings.newBuilder();
* auditManagerSettingsBuilder
- * .enrollResourceSettings()
+ * .createAuditScheduleSettings()
* .setRetrySettings(
* auditManagerSettingsBuilder
- * .enrollResourceSettings()
+ * .createAuditScheduleSettings()
* .getRetrySettings()
* .toBuilder()
* .setInitialRetryDelayDuration(Duration.ofSeconds(1))
@@ -124,6 +125,30 @@
@Generated("by gapic-generator-java")
public class AuditManagerSettings extends ClientSettings {
+ /** Returns the object with the settings used for calls to createAuditSchedule. */
+ public UnaryCallSettings
+ createAuditScheduleSettings() {
+ return ((AuditManagerStubSettings) getStubSettings()).createAuditScheduleSettings();
+ }
+
+ /** Returns the object with the settings used for calls to updateAuditSchedule. */
+ public UnaryCallSettings
+ updateAuditScheduleSettings() {
+ return ((AuditManagerStubSettings) getStubSettings()).updateAuditScheduleSettings();
+ }
+
+ /** Returns the object with the settings used for calls to getAuditSchedule. */
+ public UnaryCallSettings getAuditScheduleSettings() {
+ return ((AuditManagerStubSettings) getStubSettings()).getAuditScheduleSettings();
+ }
+
+ /** Returns the object with the settings used for calls to listAuditSchedules. */
+ public PagedCallSettings<
+ ListAuditSchedulesRequest, ListAuditSchedulesResponse, ListAuditSchedulesPagedResponse>
+ listAuditSchedulesSettings() {
+ return ((AuditManagerStubSettings) getStubSettings()).listAuditSchedulesSettings();
+ }
+
/** Returns the object with the settings used for calls to enrollResource. */
public UnaryCallSettings enrollResourceSettings() {
return ((AuditManagerStubSettings) getStubSettings()).enrollResourceSettings();
@@ -302,6 +327,31 @@ public Builder applyToAllUnaryMethods(
return this;
}
+ /** Returns the builder for the settings used for calls to createAuditSchedule. */
+ public UnaryCallSettings.Builder
+ createAuditScheduleSettings() {
+ return getStubSettingsBuilder().createAuditScheduleSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to updateAuditSchedule. */
+ public UnaryCallSettings.Builder
+ updateAuditScheduleSettings() {
+ return getStubSettingsBuilder().updateAuditScheduleSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to getAuditSchedule. */
+ public UnaryCallSettings.Builder
+ getAuditScheduleSettings() {
+ return getStubSettingsBuilder().getAuditScheduleSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to listAuditSchedules. */
+ public PagedCallSettings.Builder<
+ ListAuditSchedulesRequest, ListAuditSchedulesResponse, ListAuditSchedulesPagedResponse>
+ listAuditSchedulesSettings() {
+ return getStubSettingsBuilder().listAuditSchedulesSettings();
+ }
+
/** Returns the builder for the settings used for calls to enrollResource. */
public UnaryCallSettings.Builder enrollResourceSettings() {
return getStubSettingsBuilder().enrollResourceSettings();
diff --git a/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/gapic_metadata.json b/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/gapic_metadata.json
index c32410329f8b..270a2e78d37c 100644
--- a/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/gapic_metadata.json
+++ b/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/gapic_metadata.json
@@ -10,6 +10,9 @@
"grpc": {
"libraryClient": "AuditManagerClient",
"rpcs": {
+ "CreateAuditSchedule": {
+ "methods": ["createAuditSchedule", "createAuditSchedule", "createAuditSchedule", "createAuditSchedule", "createAuditScheduleCallable"]
+ },
"EnrollResource": {
"methods": ["enrollResource", "enrollResource", "enrollResourceCallable"]
},
@@ -22,6 +25,9 @@
"GetAuditReport": {
"methods": ["getAuditReport", "getAuditReport", "getAuditReport", "getAuditReportCallable"]
},
+ "GetAuditSchedule": {
+ "methods": ["getAuditSchedule", "getAuditSchedule", "getAuditSchedule", "getAuditScheduleCallable"]
+ },
"GetLocation": {
"methods": ["getLocation", "getLocationCallable"]
},
@@ -31,6 +37,9 @@
"ListAuditReports": {
"methods": ["listAuditReports", "listAuditReports", "listAuditReports", "listAuditReports", "listAuditReportsPagedCallable", "listAuditReportsCallable"]
},
+ "ListAuditSchedules": {
+ "methods": ["listAuditSchedules", "listAuditSchedules", "listAuditSchedules", "listAuditSchedules", "listAuditSchedulesPagedCallable", "listAuditSchedulesCallable"]
+ },
"ListControls": {
"methods": ["listControls", "listControls", "listControls", "listControlsPagedCallable", "listControlsCallable"]
},
@@ -39,6 +48,9 @@
},
"ListResourceEnrollmentStatuses": {
"methods": ["listResourceEnrollmentStatuses", "listResourceEnrollmentStatuses", "listResourceEnrollmentStatuses", "listResourceEnrollmentStatusesPagedCallable", "listResourceEnrollmentStatusesCallable"]
+ },
+ "UpdateAuditSchedule": {
+ "methods": ["updateAuditSchedule", "updateAuditSchedule", "updateAuditScheduleCallable"]
}
}
}
diff --git a/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/package-info.java b/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/package-info.java
index b684d8055c2c..9a2a364325a0 100644
--- a/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/package-info.java
+++ b/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/package-info.java
@@ -32,9 +32,12 @@
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (AuditManagerClient auditManagerClient = AuditManagerClient.create()) {
- * String scope = "scope109264468";
- * List destinations = new ArrayList<>();
- * Enrollment response = auditManagerClient.enrollResource(scope, destinations);
+ * EnrollmentStatusScopeName parent =
+ * EnrollmentStatusScopeName.ofFolderLocationName("[FOLDER]", "[LOCATION]");
+ * AuditSchedule auditSchedule = AuditSchedule.newBuilder().build();
+ * String auditScheduleId = "auditScheduleId1594553421";
+ * AuditSchedule response =
+ * auditManagerClient.createAuditSchedule(parent, auditSchedule, auditScheduleId);
* }
* }
*/
diff --git a/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/stub/AuditManagerStub.java b/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/stub/AuditManagerStub.java
index 58743ceb60ef..5148bcbfc749 100644
--- a/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/stub/AuditManagerStub.java
+++ b/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/stub/AuditManagerStub.java
@@ -17,6 +17,7 @@
package com.google.cloud.auditmanager.v1.stub;
import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListAuditReportsPagedResponse;
+import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListAuditSchedulesPagedResponse;
import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListControlsPagedResponse;
import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListLocationsPagedResponse;
import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListResourceEnrollmentStatusesPagedResponse;
@@ -25,21 +26,27 @@
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.auditmanager.v1.AuditReport;
+import com.google.cloud.auditmanager.v1.AuditSchedule;
import com.google.cloud.auditmanager.v1.AuditScopeReport;
+import com.google.cloud.auditmanager.v1.CreateAuditScheduleRequest;
import com.google.cloud.auditmanager.v1.EnrollResourceRequest;
import com.google.cloud.auditmanager.v1.Enrollment;
import com.google.cloud.auditmanager.v1.GenerateAuditReportRequest;
import com.google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest;
import com.google.cloud.auditmanager.v1.GetAuditReportRequest;
+import com.google.cloud.auditmanager.v1.GetAuditScheduleRequest;
import com.google.cloud.auditmanager.v1.GetResourceEnrollmentStatusRequest;
import com.google.cloud.auditmanager.v1.ListAuditReportsRequest;
import com.google.cloud.auditmanager.v1.ListAuditReportsResponse;
+import com.google.cloud.auditmanager.v1.ListAuditSchedulesRequest;
+import com.google.cloud.auditmanager.v1.ListAuditSchedulesResponse;
import com.google.cloud.auditmanager.v1.ListControlsRequest;
import com.google.cloud.auditmanager.v1.ListControlsResponse;
import com.google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesRequest;
import com.google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesResponse;
import com.google.cloud.auditmanager.v1.OperationMetadata;
import com.google.cloud.auditmanager.v1.ResourceEnrollmentStatus;
+import com.google.cloud.auditmanager.v1.UpdateAuditScheduleRequest;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
@@ -69,6 +76,28 @@ public abstract class AuditManagerStub implements BackgroundResource {
return null;
}
+ public UnaryCallable createAuditScheduleCallable() {
+ throw new UnsupportedOperationException("Not implemented: createAuditScheduleCallable()");
+ }
+
+ public UnaryCallable updateAuditScheduleCallable() {
+ throw new UnsupportedOperationException("Not implemented: updateAuditScheduleCallable()");
+ }
+
+ public UnaryCallable getAuditScheduleCallable() {
+ throw new UnsupportedOperationException("Not implemented: getAuditScheduleCallable()");
+ }
+
+ public UnaryCallable
+ listAuditSchedulesPagedCallable() {
+ throw new UnsupportedOperationException("Not implemented: listAuditSchedulesPagedCallable()");
+ }
+
+ public UnaryCallable
+ listAuditSchedulesCallable() {
+ throw new UnsupportedOperationException("Not implemented: listAuditSchedulesCallable()");
+ }
+
public UnaryCallable enrollResourceCallable() {
throw new UnsupportedOperationException("Not implemented: enrollResourceCallable()");
}
diff --git a/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/stub/AuditManagerStubSettings.java b/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/stub/AuditManagerStubSettings.java
index 0cc708d90792..a8dd51416fb8 100644
--- a/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/stub/AuditManagerStubSettings.java
+++ b/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/stub/AuditManagerStubSettings.java
@@ -17,6 +17,7 @@
package com.google.cloud.auditmanager.v1.stub;
import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListAuditReportsPagedResponse;
+import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListAuditSchedulesPagedResponse;
import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListControlsPagedResponse;
import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListLocationsPagedResponse;
import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListResourceEnrollmentStatusesPagedResponse;
@@ -53,22 +54,28 @@
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.auditmanager.v1.AuditReport;
+import com.google.cloud.auditmanager.v1.AuditSchedule;
import com.google.cloud.auditmanager.v1.AuditScopeReport;
import com.google.cloud.auditmanager.v1.Control;
+import com.google.cloud.auditmanager.v1.CreateAuditScheduleRequest;
import com.google.cloud.auditmanager.v1.EnrollResourceRequest;
import com.google.cloud.auditmanager.v1.Enrollment;
import com.google.cloud.auditmanager.v1.GenerateAuditReportRequest;
import com.google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest;
import com.google.cloud.auditmanager.v1.GetAuditReportRequest;
+import com.google.cloud.auditmanager.v1.GetAuditScheduleRequest;
import com.google.cloud.auditmanager.v1.GetResourceEnrollmentStatusRequest;
import com.google.cloud.auditmanager.v1.ListAuditReportsRequest;
import com.google.cloud.auditmanager.v1.ListAuditReportsResponse;
+import com.google.cloud.auditmanager.v1.ListAuditSchedulesRequest;
+import com.google.cloud.auditmanager.v1.ListAuditSchedulesResponse;
import com.google.cloud.auditmanager.v1.ListControlsRequest;
import com.google.cloud.auditmanager.v1.ListControlsResponse;
import com.google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesRequest;
import com.google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesResponse;
import com.google.cloud.auditmanager.v1.OperationMetadata;
import com.google.cloud.auditmanager.v1.ResourceEnrollmentStatus;
+import com.google.cloud.auditmanager.v1.UpdateAuditScheduleRequest;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
@@ -102,7 +109,7 @@
*
* For example, to set the
* [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
- * of enrollResource:
+ * of createAuditSchedule:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
@@ -113,10 +120,10 @@
* AuditManagerStubSettings.Builder auditManagerSettingsBuilder =
* AuditManagerStubSettings.newBuilder();
* auditManagerSettingsBuilder
- * .enrollResourceSettings()
+ * .createAuditScheduleSettings()
* .setRetrySettings(
* auditManagerSettingsBuilder
- * .enrollResourceSettings()
+ * .createAuditScheduleSettings()
* .getRetrySettings()
* .toBuilder()
* .setInitialRetryDelayDuration(Duration.ofSeconds(1))
@@ -172,6 +179,14 @@ public class AuditManagerStubSettings extends StubSettings
+ createAuditScheduleSettings;
+ private final UnaryCallSettings
+ updateAuditScheduleSettings;
+ private final UnaryCallSettings getAuditScheduleSettings;
+ private final PagedCallSettings<
+ ListAuditSchedulesRequest, ListAuditSchedulesResponse, ListAuditSchedulesPagedResponse>
+ listAuditSchedulesSettings;
private final UnaryCallSettings enrollResourceSettings;
private final UnaryCallSettings
generateAuditScopeReportSettings;
@@ -198,6 +213,44 @@ public class AuditManagerStubSettings extends StubSettings getLocationSettings;
+ private static final PagedListDescriptor<
+ ListAuditSchedulesRequest, ListAuditSchedulesResponse, AuditSchedule>
+ LIST_AUDIT_SCHEDULES_PAGE_STR_DESC =
+ new PagedListDescriptor<
+ ListAuditSchedulesRequest, ListAuditSchedulesResponse, AuditSchedule>() {
+ @Override
+ public String emptyToken() {
+ return "";
+ }
+
+ @Override
+ public ListAuditSchedulesRequest injectToken(
+ ListAuditSchedulesRequest payload, String token) {
+ return ListAuditSchedulesRequest.newBuilder(payload).setPageToken(token).build();
+ }
+
+ @Override
+ public ListAuditSchedulesRequest injectPageSize(
+ ListAuditSchedulesRequest payload, int pageSize) {
+ return ListAuditSchedulesRequest.newBuilder(payload).setPageSize(pageSize).build();
+ }
+
+ @Override
+ public Integer extractPageSize(ListAuditSchedulesRequest payload) {
+ return payload.getPageSize();
+ }
+
+ @Override
+ public String extractNextToken(ListAuditSchedulesResponse payload) {
+ return payload.getNextPageToken();
+ }
+
+ @Override
+ public Iterable extractResources(ListAuditSchedulesResponse payload) {
+ return payload.getAuditSchedulesList();
+ }
+ };
+
private static final PagedListDescriptor<
ListAuditReportsRequest, ListAuditReportsResponse, AuditReport>
LIST_AUDIT_REPORTS_PAGE_STR_DESC =
@@ -351,6 +404,27 @@ public Iterable extractResources(ListLocationsResponse payload) {
}
};
+ private static final PagedListResponseFactory<
+ ListAuditSchedulesRequest, ListAuditSchedulesResponse, ListAuditSchedulesPagedResponse>
+ LIST_AUDIT_SCHEDULES_PAGE_STR_FACT =
+ new PagedListResponseFactory<
+ ListAuditSchedulesRequest,
+ ListAuditSchedulesResponse,
+ ListAuditSchedulesPagedResponse>() {
+ @Override
+ public ApiFuture getFuturePagedResponse(
+ UnaryCallable callable,
+ ListAuditSchedulesRequest request,
+ ApiCallContext context,
+ ApiFuture futureResponse) {
+ PageContext
+ pageContext =
+ PageContext.create(
+ callable, LIST_AUDIT_SCHEDULES_PAGE_STR_DESC, request, context);
+ return ListAuditSchedulesPagedResponse.createAsync(pageContext, futureResponse);
+ }
+ };
+
private static final PagedListResponseFactory<
ListAuditReportsRequest, ListAuditReportsResponse, ListAuditReportsPagedResponse>
LIST_AUDIT_REPORTS_PAGE_STR_FACT =
@@ -437,6 +511,30 @@ public ApiFuture getFuturePagedResponse(
}
};
+ /** Returns the object with the settings used for calls to createAuditSchedule. */
+ public UnaryCallSettings
+ createAuditScheduleSettings() {
+ return createAuditScheduleSettings;
+ }
+
+ /** Returns the object with the settings used for calls to updateAuditSchedule. */
+ public UnaryCallSettings
+ updateAuditScheduleSettings() {
+ return updateAuditScheduleSettings;
+ }
+
+ /** Returns the object with the settings used for calls to getAuditSchedule. */
+ public UnaryCallSettings getAuditScheduleSettings() {
+ return getAuditScheduleSettings;
+ }
+
+ /** Returns the object with the settings used for calls to listAuditSchedules. */
+ public PagedCallSettings<
+ ListAuditSchedulesRequest, ListAuditSchedulesResponse, ListAuditSchedulesPagedResponse>
+ listAuditSchedulesSettings() {
+ return listAuditSchedulesSettings;
+ }
+
/** Returns the object with the settings used for calls to enrollResource. */
public UnaryCallSettings enrollResourceSettings() {
return enrollResourceSettings;
@@ -614,6 +712,10 @@ public Builder toBuilder() {
protected AuditManagerStubSettings(Builder settingsBuilder) throws IOException {
super(settingsBuilder);
+ createAuditScheduleSettings = settingsBuilder.createAuditScheduleSettings().build();
+ updateAuditScheduleSettings = settingsBuilder.updateAuditScheduleSettings().build();
+ getAuditScheduleSettings = settingsBuilder.getAuditScheduleSettings().build();
+ listAuditSchedulesSettings = settingsBuilder.listAuditSchedulesSettings().build();
enrollResourceSettings = settingsBuilder.enrollResourceSettings().build();
generateAuditScopeReportSettings = settingsBuilder.generateAuditScopeReportSettings().build();
generateAuditReportSettings = settingsBuilder.generateAuditReportSettings().build();
@@ -642,6 +744,15 @@ protected LibraryMetadata getLibraryMetadata() {
/** Builder for AuditManagerStubSettings. */
public static class Builder extends StubSettings.Builder {
private final ImmutableList> unaryMethodSettingsBuilders;
+ private final UnaryCallSettings.Builder
+ createAuditScheduleSettings;
+ private final UnaryCallSettings.Builder
+ updateAuditScheduleSettings;
+ private final UnaryCallSettings.Builder
+ getAuditScheduleSettings;
+ private final PagedCallSettings.Builder<
+ ListAuditSchedulesRequest, ListAuditSchedulesResponse, ListAuditSchedulesPagedResponse>
+ listAuditSchedulesSettings;
private final UnaryCallSettings.Builder
enrollResourceSettings;
private final UnaryCallSettings.Builder
@@ -679,10 +790,10 @@ public static class Builder extends StubSettings.BuildernewArrayList()));
+ definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList()));
definitions.put(
"retry_policy_0_codes",
ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE)));
- definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList()));
RETRYABLE_CODE_DEFINITIONS = definitions.build();
}
@@ -699,6 +810,8 @@ public static class Builder extends StubSettings.Builder>of(
+ createAuditScheduleSettings,
+ updateAuditScheduleSettings,
+ getAuditScheduleSettings,
+ listAuditSchedulesSettings,
enrollResourceSettings,
generateAuditScopeReportSettings,
generateAuditReportSettings,
@@ -753,6 +872,10 @@ protected Builder(@Nullable ClientContext clientContext) {
protected Builder(AuditManagerStubSettings settings) {
super(settings);
+ createAuditScheduleSettings = settings.createAuditScheduleSettings.toBuilder();
+ updateAuditScheduleSettings = settings.updateAuditScheduleSettings.toBuilder();
+ getAuditScheduleSettings = settings.getAuditScheduleSettings.toBuilder();
+ listAuditSchedulesSettings = settings.listAuditSchedulesSettings.toBuilder();
enrollResourceSettings = settings.enrollResourceSettings.toBuilder();
generateAuditScopeReportSettings = settings.generateAuditScopeReportSettings.toBuilder();
generateAuditReportSettings = settings.generateAuditReportSettings.toBuilder();
@@ -770,6 +893,10 @@ protected Builder(AuditManagerStubSettings settings) {
unaryMethodSettingsBuilders =
ImmutableList.>of(
+ createAuditScheduleSettings,
+ updateAuditScheduleSettings,
+ getAuditScheduleSettings,
+ listAuditSchedulesSettings,
enrollResourceSettings,
generateAuditScopeReportSettings,
generateAuditReportSettings,
@@ -807,6 +934,26 @@ private static Builder createHttpJsonDefault() {
}
private static Builder initDefaults(Builder builder) {
+ builder
+ .createAuditScheduleSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
+
+ builder
+ .updateAuditScheduleSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
+
+ builder
+ .getAuditScheduleSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .listAuditSchedulesSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+
builder
.enrollResourceSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
@@ -899,6 +1046,31 @@ public Builder applyToAllUnaryMethods(
return unaryMethodSettingsBuilders;
}
+ /** Returns the builder for the settings used for calls to createAuditSchedule. */
+ public UnaryCallSettings.Builder
+ createAuditScheduleSettings() {
+ return createAuditScheduleSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to updateAuditSchedule. */
+ public UnaryCallSettings.Builder
+ updateAuditScheduleSettings() {
+ return updateAuditScheduleSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to getAuditSchedule. */
+ public UnaryCallSettings.Builder
+ getAuditScheduleSettings() {
+ return getAuditScheduleSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to listAuditSchedules. */
+ public PagedCallSettings.Builder<
+ ListAuditSchedulesRequest, ListAuditSchedulesResponse, ListAuditSchedulesPagedResponse>
+ listAuditSchedulesSettings() {
+ return listAuditSchedulesSettings;
+ }
+
/** Returns the builder for the settings used for calls to enrollResource. */
public UnaryCallSettings.Builder enrollResourceSettings() {
return enrollResourceSettings;
diff --git a/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/stub/GrpcAuditManagerStub.java b/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/stub/GrpcAuditManagerStub.java
index c0b7d98914c8..39f6e808fa13 100644
--- a/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/stub/GrpcAuditManagerStub.java
+++ b/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/stub/GrpcAuditManagerStub.java
@@ -17,6 +17,7 @@
package com.google.cloud.auditmanager.v1.stub;
import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListAuditReportsPagedResponse;
+import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListAuditSchedulesPagedResponse;
import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListControlsPagedResponse;
import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListLocationsPagedResponse;
import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListResourceEnrollmentStatusesPagedResponse;
@@ -30,21 +31,27 @@
import com.google.api.gax.rpc.RequestParamsBuilder;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.auditmanager.v1.AuditReport;
+import com.google.cloud.auditmanager.v1.AuditSchedule;
import com.google.cloud.auditmanager.v1.AuditScopeReport;
+import com.google.cloud.auditmanager.v1.CreateAuditScheduleRequest;
import com.google.cloud.auditmanager.v1.EnrollResourceRequest;
import com.google.cloud.auditmanager.v1.Enrollment;
import com.google.cloud.auditmanager.v1.GenerateAuditReportRequest;
import com.google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest;
import com.google.cloud.auditmanager.v1.GetAuditReportRequest;
+import com.google.cloud.auditmanager.v1.GetAuditScheduleRequest;
import com.google.cloud.auditmanager.v1.GetResourceEnrollmentStatusRequest;
import com.google.cloud.auditmanager.v1.ListAuditReportsRequest;
import com.google.cloud.auditmanager.v1.ListAuditReportsResponse;
+import com.google.cloud.auditmanager.v1.ListAuditSchedulesRequest;
+import com.google.cloud.auditmanager.v1.ListAuditSchedulesResponse;
import com.google.cloud.auditmanager.v1.ListControlsRequest;
import com.google.cloud.auditmanager.v1.ListControlsResponse;
import com.google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesRequest;
import com.google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesResponse;
import com.google.cloud.auditmanager.v1.OperationMetadata;
import com.google.cloud.auditmanager.v1.ResourceEnrollmentStatus;
+import com.google.cloud.auditmanager.v1.UpdateAuditScheduleRequest;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
@@ -67,6 +74,51 @@
@NullMarked
@Generated("by gapic-generator-java")
public class GrpcAuditManagerStub extends AuditManagerStub {
+ private static final MethodDescriptor
+ createAuditScheduleMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.auditmanager.v1.AuditManager/CreateAuditSchedule")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(CreateAuditScheduleRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(AuditSchedule.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
+ .build();
+
+ private static final MethodDescriptor
+ updateAuditScheduleMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.auditmanager.v1.AuditManager/UpdateAuditSchedule")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(UpdateAuditScheduleRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(AuditSchedule.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
+ .build();
+
+ private static final MethodDescriptor
+ getAuditScheduleMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.auditmanager.v1.AuditManager/GetAuditSchedule")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(GetAuditScheduleRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(AuditSchedule.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
+ .build();
+
+ private static final MethodDescriptor
+ listAuditSchedulesMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.auditmanager.v1.AuditManager/ListAuditSchedules")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(ListAuditSchedulesRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(ListAuditSchedulesResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
+ .build();
+
private static final MethodDescriptor
enrollResourceMethodDescriptor =
MethodDescriptor.newBuilder()
@@ -188,6 +240,15 @@ public class GrpcAuditManagerStub extends AuditManagerStub {
.setSampledToLocalTracing(true)
.build();
+ private final UnaryCallable
+ createAuditScheduleCallable;
+ private final UnaryCallable
+ updateAuditScheduleCallable;
+ private final UnaryCallable getAuditScheduleCallable;
+ private final UnaryCallable
+ listAuditSchedulesCallable;
+ private final UnaryCallable
+ listAuditSchedulesPagedCallable;
private final UnaryCallable enrollResourceCallable;
private final UnaryCallable
generateAuditScopeReportCallable;
@@ -257,6 +318,54 @@ protected GrpcAuditManagerStub(
this.callableFactory = callableFactory;
this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory);
+ GrpcCallSettings
+ createAuditScheduleTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(createAuditScheduleMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("parent", String.valueOf(request.getParent()));
+ return builder.build();
+ })
+ .setResourceNameExtractor(request -> request.getParent())
+ .build();
+ GrpcCallSettings
+ updateAuditScheduleTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(updateAuditScheduleMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add(
+ "audit_schedule.name",
+ String.valueOf(request.getAuditSchedule().getName()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings getAuditScheduleTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getAuditScheduleMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("name", String.valueOf(request.getName()));
+ return builder.build();
+ })
+ .setResourceNameExtractor(request -> request.getName())
+ .build();
+ GrpcCallSettings
+ listAuditSchedulesTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(listAuditSchedulesMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("parent", String.valueOf(request.getParent()));
+ return builder.build();
+ })
+ .setResourceNameExtractor(request -> request.getParent())
+ .build();
GrpcCallSettings enrollResourceTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(enrollResourceMethodDescriptor)
@@ -370,6 +479,29 @@ protected GrpcAuditManagerStub(
})
.build();
+ this.createAuditScheduleCallable =
+ callableFactory.createUnaryCallable(
+ createAuditScheduleTransportSettings,
+ settings.createAuditScheduleSettings(),
+ clientContext);
+ this.updateAuditScheduleCallable =
+ callableFactory.createUnaryCallable(
+ updateAuditScheduleTransportSettings,
+ settings.updateAuditScheduleSettings(),
+ clientContext);
+ this.getAuditScheduleCallable =
+ callableFactory.createUnaryCallable(
+ getAuditScheduleTransportSettings, settings.getAuditScheduleSettings(), clientContext);
+ this.listAuditSchedulesCallable =
+ callableFactory.createUnaryCallable(
+ listAuditSchedulesTransportSettings,
+ settings.listAuditSchedulesSettings(),
+ clientContext);
+ this.listAuditSchedulesPagedCallable =
+ callableFactory.createPagedCallable(
+ listAuditSchedulesTransportSettings,
+ settings.listAuditSchedulesSettings(),
+ clientContext);
this.enrollResourceCallable =
callableFactory.createUnaryCallable(
enrollResourceTransportSettings, settings.enrollResourceSettings(), clientContext);
@@ -437,6 +569,33 @@ public GrpcOperationsStub getOperationsStub() {
return operationsStub;
}
+ @Override
+ public UnaryCallable createAuditScheduleCallable() {
+ return createAuditScheduleCallable;
+ }
+
+ @Override
+ public UnaryCallable updateAuditScheduleCallable() {
+ return updateAuditScheduleCallable;
+ }
+
+ @Override
+ public UnaryCallable getAuditScheduleCallable() {
+ return getAuditScheduleCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ listAuditSchedulesCallable() {
+ return listAuditSchedulesCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ listAuditSchedulesPagedCallable() {
+ return listAuditSchedulesPagedCallable;
+ }
+
@Override
public UnaryCallable enrollResourceCallable() {
return enrollResourceCallable;
diff --git a/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/stub/HttpJsonAuditManagerStub.java b/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/stub/HttpJsonAuditManagerStub.java
index 7236bb92e9ab..c84d9ebdd5d8 100644
--- a/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/stub/HttpJsonAuditManagerStub.java
+++ b/java-auditmanager/google-cloud-auditmanager/src/main/java/com/google/cloud/auditmanager/v1/stub/HttpJsonAuditManagerStub.java
@@ -17,6 +17,7 @@
package com.google.cloud.auditmanager.v1.stub;
import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListAuditReportsPagedResponse;
+import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListAuditSchedulesPagedResponse;
import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListControlsPagedResponse;
import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListLocationsPagedResponse;
import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListResourceEnrollmentStatusesPagedResponse;
@@ -38,21 +39,27 @@
import com.google.api.gax.rpc.RequestParamsBuilder;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.auditmanager.v1.AuditReport;
+import com.google.cloud.auditmanager.v1.AuditSchedule;
import com.google.cloud.auditmanager.v1.AuditScopeReport;
+import com.google.cloud.auditmanager.v1.CreateAuditScheduleRequest;
import com.google.cloud.auditmanager.v1.EnrollResourceRequest;
import com.google.cloud.auditmanager.v1.Enrollment;
import com.google.cloud.auditmanager.v1.GenerateAuditReportRequest;
import com.google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest;
import com.google.cloud.auditmanager.v1.GetAuditReportRequest;
+import com.google.cloud.auditmanager.v1.GetAuditScheduleRequest;
import com.google.cloud.auditmanager.v1.GetResourceEnrollmentStatusRequest;
import com.google.cloud.auditmanager.v1.ListAuditReportsRequest;
import com.google.cloud.auditmanager.v1.ListAuditReportsResponse;
+import com.google.cloud.auditmanager.v1.ListAuditSchedulesRequest;
+import com.google.cloud.auditmanager.v1.ListAuditSchedulesResponse;
import com.google.cloud.auditmanager.v1.ListControlsRequest;
import com.google.cloud.auditmanager.v1.ListControlsResponse;
import com.google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesRequest;
import com.google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesResponse;
import com.google.cloud.auditmanager.v1.OperationMetadata;
import com.google.cloud.auditmanager.v1.ResourceEnrollmentStatus;
+import com.google.cloud.auditmanager.v1.UpdateAuditScheduleRequest;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
@@ -84,6 +91,170 @@ public class HttpJsonAuditManagerStub extends AuditManagerStub {
.add(AuditReport.getDescriptor())
.build();
+ private static final ApiMethodDescriptor
+ createAuditScheduleMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.cloud.auditmanager.v1.AuditManager/CreateAuditSchedule")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{parent=projects/*/locations/*}/auditSchedules",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "parent", request.getParent());
+ return fields;
+ })
+ .setAdditionalPaths(
+ "/v1/{parent=folders/*/locations/*}/auditSchedules",
+ "/v1/{parent=organizations/*/locations/*}/auditSchedules")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(
+ fields, "auditScheduleId", request.getAuditScheduleId());
+ serializer.putQueryParam(
+ fields, "validateOnly", request.getValidateOnly());
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody("auditSchedule", request.getAuditSchedule(), true))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(AuditSchedule.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ updateAuditScheduleMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.cloud.auditmanager.v1.AuditManager/UpdateAuditSchedule")
+ .setHttpMethod("PATCH")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{auditSchedule.name=projects/*/locations/*/auditSchedules/*}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(
+ fields, "auditSchedule.name", request.getAuditSchedule().getName());
+ return fields;
+ })
+ .setAdditionalPaths(
+ "/v1/{auditSchedule.name=folders/*/locations/*/auditSchedules/*}",
+ "/v1/{auditSchedule.name=organizations/*/locations/*/auditSchedules/*}")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "updateMask", request.getUpdateMask());
+ serializer.putQueryParam(
+ fields, "validateOnly", request.getValidateOnly());
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody("auditSchedule", request.getAuditSchedule(), true))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(AuditSchedule.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ getAuditScheduleMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.cloud.auditmanager.v1.AuditManager/GetAuditSchedule")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/auditSchedules/*}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "name", request.getName());
+ return fields;
+ })
+ .setAdditionalPaths(
+ "/v1/{name=folders/*/locations/*/auditSchedules/*}",
+ "/v1/{name=organizations/*/locations/*/auditSchedules/*}")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(AuditSchedule.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ listAuditSchedulesMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.cloud.auditmanager.v1.AuditManager/ListAuditSchedules")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{parent=projects/*/locations/*}/auditSchedules",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "parent", request.getParent());
+ return fields;
+ })
+ .setAdditionalPaths(
+ "/v1/{parent=folders/*/locations/*}/auditSchedules",
+ "/v1/{parent=organizations/*/locations/*}/auditSchedules")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "pageSize", request.getPageSize());
+ serializer.putQueryParam(fields, "pageToken", request.getPageToken());
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(ListAuditSchedulesResponse.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
private static final ApiMethodDescriptor
enrollResourceMethodDescriptor =
ApiMethodDescriptor.newBuilder()
@@ -474,6 +645,15 @@ public class HttpJsonAuditManagerStub extends AuditManagerStub {
.build())
.build();
+ private final UnaryCallable
+ createAuditScheduleCallable;
+ private final UnaryCallable
+ updateAuditScheduleCallable;
+ private final UnaryCallable getAuditScheduleCallable;
+ private final UnaryCallable
+ listAuditSchedulesCallable;
+ private final UnaryCallable
+ listAuditSchedulesPagedCallable;
private final UnaryCallable enrollResourceCallable;
private final UnaryCallable
generateAuditScopeReportCallable;
@@ -588,6 +768,58 @@ protected HttpJsonAuditManagerStub(
.build())
.build());
+ HttpJsonCallSettings
+ createAuditScheduleTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(createAuditScheduleMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("parent", String.valueOf(request.getParent()));
+ return builder.build();
+ })
+ .setResourceNameExtractor(request -> request.getParent())
+ .build();
+ HttpJsonCallSettings
+ updateAuditScheduleTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(updateAuditScheduleMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add(
+ "audit_schedule.name",
+ String.valueOf(request.getAuditSchedule().getName()));
+ return builder.build();
+ })
+ .build();
+ HttpJsonCallSettings getAuditScheduleTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(getAuditScheduleMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("name", String.valueOf(request.getName()));
+ return builder.build();
+ })
+ .setResourceNameExtractor(request -> request.getName())
+ .build();
+ HttpJsonCallSettings
+ listAuditSchedulesTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(listAuditSchedulesMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("parent", String.valueOf(request.getParent()));
+ return builder.build();
+ })
+ .setResourceNameExtractor(request -> request.getParent())
+ .build();
HttpJsonCallSettings enrollResourceTransportSettings =
HttpJsonCallSettings.newBuilder()
.setMethodDescriptor(enrollResourceMethodDescriptor)
@@ -714,6 +946,29 @@ protected HttpJsonAuditManagerStub(
})
.build();
+ this.createAuditScheduleCallable =
+ callableFactory.createUnaryCallable(
+ createAuditScheduleTransportSettings,
+ settings.createAuditScheduleSettings(),
+ clientContext);
+ this.updateAuditScheduleCallable =
+ callableFactory.createUnaryCallable(
+ updateAuditScheduleTransportSettings,
+ settings.updateAuditScheduleSettings(),
+ clientContext);
+ this.getAuditScheduleCallable =
+ callableFactory.createUnaryCallable(
+ getAuditScheduleTransportSettings, settings.getAuditScheduleSettings(), clientContext);
+ this.listAuditSchedulesCallable =
+ callableFactory.createUnaryCallable(
+ listAuditSchedulesTransportSettings,
+ settings.listAuditSchedulesSettings(),
+ clientContext);
+ this.listAuditSchedulesPagedCallable =
+ callableFactory.createPagedCallable(
+ listAuditSchedulesTransportSettings,
+ settings.listAuditSchedulesSettings(),
+ clientContext);
this.enrollResourceCallable =
callableFactory.createUnaryCallable(
enrollResourceTransportSettings, settings.enrollResourceSettings(), clientContext);
@@ -780,6 +1035,10 @@ protected HttpJsonAuditManagerStub(
@InternalApi
public static List getMethodDescriptors() {
List methodDescriptors = new ArrayList<>();
+ methodDescriptors.add(createAuditScheduleMethodDescriptor);
+ methodDescriptors.add(updateAuditScheduleMethodDescriptor);
+ methodDescriptors.add(getAuditScheduleMethodDescriptor);
+ methodDescriptors.add(listAuditSchedulesMethodDescriptor);
methodDescriptors.add(enrollResourceMethodDescriptor);
methodDescriptors.add(generateAuditScopeReportMethodDescriptor);
methodDescriptors.add(generateAuditReportMethodDescriptor);
@@ -797,6 +1056,33 @@ public HttpJsonOperationsStub getHttpJsonOperationsStub() {
return httpJsonOperationsStub;
}
+ @Override
+ public UnaryCallable createAuditScheduleCallable() {
+ return createAuditScheduleCallable;
+ }
+
+ @Override
+ public UnaryCallable updateAuditScheduleCallable() {
+ return updateAuditScheduleCallable;
+ }
+
+ @Override
+ public UnaryCallable getAuditScheduleCallable() {
+ return getAuditScheduleCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ listAuditSchedulesCallable() {
+ return listAuditSchedulesCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ listAuditSchedulesPagedCallable() {
+ return listAuditSchedulesPagedCallable;
+ }
+
@Override
public UnaryCallable enrollResourceCallable() {
return enrollResourceCallable;
diff --git a/java-auditmanager/google-cloud-auditmanager/src/main/resources/META-INF/native-image/com.google.cloud.auditmanager.v1/reflect-config.json b/java-auditmanager/google-cloud-auditmanager/src/main/resources/META-INF/native-image/com.google.cloud.auditmanager.v1/reflect-config.json
index 471eeb568ebe..1cbe9a93d26c 100644
--- a/java-auditmanager/google-cloud-auditmanager/src/main/resources/META-INF/native-image/com.google.cloud.auditmanager.v1/reflect-config.json
+++ b/java-auditmanager/google-cloud-auditmanager/src/main/resources/META-INF/native-image/com.google.cloud.auditmanager.v1/reflect-config.json
@@ -503,6 +503,33 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
+ {
+ "name": "com.google.cloud.auditmanager.v1.AuditSchedule",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.cloud.auditmanager.v1.AuditSchedule$AuditReportFormat",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.cloud.auditmanager.v1.AuditSchedule$Builder",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
{
"name": "com.google.cloud.auditmanager.v1.AuditScopeReport",
"queryAllDeclaredConstructors": true,
@@ -593,6 +620,24 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
+ {
+ "name": "com.google.cloud.auditmanager.v1.CreateAuditScheduleRequest",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.cloud.auditmanager.v1.CreateAuditScheduleRequest$Builder",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
{
"name": "com.google.cloud.auditmanager.v1.DestinationDetails",
"queryAllDeclaredConstructors": true,
@@ -737,6 +782,24 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
+ {
+ "name": "com.google.cloud.auditmanager.v1.GetAuditScheduleRequest",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.cloud.auditmanager.v1.GetAuditScheduleRequest$Builder",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
{
"name": "com.google.cloud.auditmanager.v1.GetResourceEnrollmentStatusRequest",
"queryAllDeclaredConstructors": true,
@@ -791,6 +854,42 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
+ {
+ "name": "com.google.cloud.auditmanager.v1.ListAuditSchedulesRequest",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.cloud.auditmanager.v1.ListAuditSchedulesRequest$Builder",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.cloud.auditmanager.v1.ListAuditSchedulesResponse",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.cloud.auditmanager.v1.ListAuditSchedulesResponse$Builder",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
{
"name": "com.google.cloud.auditmanager.v1.ListControlsRequest",
"queryAllDeclaredConstructors": true,
@@ -953,6 +1052,60 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
+ {
+ "name": "com.google.cloud.auditmanager.v1.ScheduleConfig",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.cloud.auditmanager.v1.ScheduleConfig$Builder",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.cloud.auditmanager.v1.ScheduleConfig$Frequency",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.cloud.auditmanager.v1.ScheduleState",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.cloud.auditmanager.v1.UpdateAuditScheduleRequest",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.cloud.auditmanager.v1.UpdateAuditScheduleRequest$Builder",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
{
"name": "com.google.cloud.location.GetLocationRequest",
"queryAllDeclaredConstructors": true,
@@ -2015,6 +2168,24 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
+ {
+ "name": "com.google.protobuf.FieldMask",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.protobuf.FieldMask$Builder",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
{
"name": "com.google.protobuf.Timestamp",
"queryAllDeclaredConstructors": true,
diff --git a/java-auditmanager/google-cloud-auditmanager/src/test/java/com/google/cloud/auditmanager/v1/AuditManagerClientHttpJsonTest.java b/java-auditmanager/google-cloud-auditmanager/src/test/java/com/google/cloud/auditmanager/v1/AuditManagerClientHttpJsonTest.java
index 6646e6948b6e..37c2aff4455a 100644
--- a/java-auditmanager/google-cloud-auditmanager/src/test/java/com/google/cloud/auditmanager/v1/AuditManagerClientHttpJsonTest.java
+++ b/java-auditmanager/google-cloud-auditmanager/src/test/java/com/google/cloud/auditmanager/v1/AuditManagerClientHttpJsonTest.java
@@ -17,6 +17,7 @@
package com.google.cloud.auditmanager.v1;
import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListAuditReportsPagedResponse;
+import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListAuditSchedulesPagedResponse;
import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListControlsPagedResponse;
import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListLocationsPagedResponse;
import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListResourceEnrollmentStatusesPagedResponse;
@@ -38,6 +39,7 @@
import com.google.common.collect.Lists;
import com.google.longrunning.Operation;
import com.google.protobuf.Any;
+import com.google.protobuf.FieldMask;
import com.google.protobuf.Timestamp;
import java.io.IOException;
import java.util.ArrayList;
@@ -88,6 +90,556 @@ public void tearDown() throws Exception {
mockService.reset();
}
+ @Test
+ public void createAuditScheduleTest() throws Exception {
+ AuditSchedule expectedResponse =
+ AuditSchedule.newBuilder()
+ .setName(
+ AuditScheduleName.ofProjectLocationAuditScheduleName(
+ "[PROJECT]", "[LOCATION]", "[AUDIT_SCHEDULE]")
+ .toString())
+ .setDisplayName("displayName1714148973")
+ .setGcsUri("gcsUri-1251224875")
+ .setComplianceFramework("complianceFramework-1808314333")
+ .setScheduleConfig(ScheduleConfig.newBuilder().build())
+ .setState(ScheduleState.forNumber(0))
+ .setCreateTime(Timestamp.newBuilder().build())
+ .setUpdateTime(Timestamp.newBuilder().build())
+ .setNextRunTime(Timestamp.newBuilder().build())
+ .setLastTriggerTime(Timestamp.newBuilder().build())
+ .setErrorMessage("errorMessage1203236063")
+ .build();
+ mockService.addResponse(expectedResponse);
+
+ EnrollmentStatusScopeName parent =
+ EnrollmentStatusScopeName.ofFolderLocationName("[FOLDER]", "[LOCATION]");
+ AuditSchedule auditSchedule = AuditSchedule.newBuilder().build();
+ String auditScheduleId = "auditScheduleId1594553421";
+
+ AuditSchedule actualResponse =
+ client.createAuditSchedule(parent, auditSchedule, auditScheduleId);
+ Assert.assertEquals(expectedResponse, actualResponse);
+
+ List actualRequests = mockService.getRequestPaths();
+ Assert.assertEquals(1, actualRequests.size());
+
+ String apiClientHeaderKey =
+ mockService
+ .getRequestHeaders()
+ .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey())
+ .iterator()
+ .next();
+ Assert.assertTrue(
+ GaxHttpJsonProperties.getDefaultApiClientHeaderPattern()
+ .matcher(apiClientHeaderKey)
+ .matches());
+ }
+
+ @Test
+ public void createAuditScheduleExceptionTest() throws Exception {
+ ApiException exception =
+ ApiExceptionFactory.createException(
+ new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+ mockService.addException(exception);
+
+ try {
+ EnrollmentStatusScopeName parent =
+ EnrollmentStatusScopeName.ofFolderLocationName("[FOLDER]", "[LOCATION]");
+ AuditSchedule auditSchedule = AuditSchedule.newBuilder().build();
+ String auditScheduleId = "auditScheduleId1594553421";
+ client.createAuditSchedule(parent, auditSchedule, auditScheduleId);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+
+ @Test
+ public void createAuditScheduleTest2() throws Exception {
+ AuditSchedule expectedResponse =
+ AuditSchedule.newBuilder()
+ .setName(
+ AuditScheduleName.ofProjectLocationAuditScheduleName(
+ "[PROJECT]", "[LOCATION]", "[AUDIT_SCHEDULE]")
+ .toString())
+ .setDisplayName("displayName1714148973")
+ .setGcsUri("gcsUri-1251224875")
+ .setComplianceFramework("complianceFramework-1808314333")
+ .setScheduleConfig(ScheduleConfig.newBuilder().build())
+ .setState(ScheduleState.forNumber(0))
+ .setCreateTime(Timestamp.newBuilder().build())
+ .setUpdateTime(Timestamp.newBuilder().build())
+ .setNextRunTime(Timestamp.newBuilder().build())
+ .setLastTriggerTime(Timestamp.newBuilder().build())
+ .setErrorMessage("errorMessage1203236063")
+ .build();
+ mockService.addResponse(expectedResponse);
+
+ LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ AuditSchedule auditSchedule = AuditSchedule.newBuilder().build();
+ String auditScheduleId = "auditScheduleId1594553421";
+
+ AuditSchedule actualResponse =
+ client.createAuditSchedule(parent, auditSchedule, auditScheduleId);
+ Assert.assertEquals(expectedResponse, actualResponse);
+
+ List actualRequests = mockService.getRequestPaths();
+ Assert.assertEquals(1, actualRequests.size());
+
+ String apiClientHeaderKey =
+ mockService
+ .getRequestHeaders()
+ .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey())
+ .iterator()
+ .next();
+ Assert.assertTrue(
+ GaxHttpJsonProperties.getDefaultApiClientHeaderPattern()
+ .matcher(apiClientHeaderKey)
+ .matches());
+ }
+
+ @Test
+ public void createAuditScheduleExceptionTest2() throws Exception {
+ ApiException exception =
+ ApiExceptionFactory.createException(
+ new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+ mockService.addException(exception);
+
+ try {
+ LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ AuditSchedule auditSchedule = AuditSchedule.newBuilder().build();
+ String auditScheduleId = "auditScheduleId1594553421";
+ client.createAuditSchedule(parent, auditSchedule, auditScheduleId);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+
+ @Test
+ public void createAuditScheduleTest3() throws Exception {
+ AuditSchedule expectedResponse =
+ AuditSchedule.newBuilder()
+ .setName(
+ AuditScheduleName.ofProjectLocationAuditScheduleName(
+ "[PROJECT]", "[LOCATION]", "[AUDIT_SCHEDULE]")
+ .toString())
+ .setDisplayName("displayName1714148973")
+ .setGcsUri("gcsUri-1251224875")
+ .setComplianceFramework("complianceFramework-1808314333")
+ .setScheduleConfig(ScheduleConfig.newBuilder().build())
+ .setState(ScheduleState.forNumber(0))
+ .setCreateTime(Timestamp.newBuilder().build())
+ .setUpdateTime(Timestamp.newBuilder().build())
+ .setNextRunTime(Timestamp.newBuilder().build())
+ .setLastTriggerTime(Timestamp.newBuilder().build())
+ .setErrorMessage("errorMessage1203236063")
+ .build();
+ mockService.addResponse(expectedResponse);
+
+ String parent = "projects/project-5833/locations/location-5833";
+ AuditSchedule auditSchedule = AuditSchedule.newBuilder().build();
+ String auditScheduleId = "auditScheduleId1594553421";
+
+ AuditSchedule actualResponse =
+ client.createAuditSchedule(parent, auditSchedule, auditScheduleId);
+ Assert.assertEquals(expectedResponse, actualResponse);
+
+ List actualRequests = mockService.getRequestPaths();
+ Assert.assertEquals(1, actualRequests.size());
+
+ String apiClientHeaderKey =
+ mockService
+ .getRequestHeaders()
+ .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey())
+ .iterator()
+ .next();
+ Assert.assertTrue(
+ GaxHttpJsonProperties.getDefaultApiClientHeaderPattern()
+ .matcher(apiClientHeaderKey)
+ .matches());
+ }
+
+ @Test
+ public void createAuditScheduleExceptionTest3() throws Exception {
+ ApiException exception =
+ ApiExceptionFactory.createException(
+ new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+ mockService.addException(exception);
+
+ try {
+ String parent = "projects/project-5833/locations/location-5833";
+ AuditSchedule auditSchedule = AuditSchedule.newBuilder().build();
+ String auditScheduleId = "auditScheduleId1594553421";
+ client.createAuditSchedule(parent, auditSchedule, auditScheduleId);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+
+ @Test
+ public void updateAuditScheduleTest() throws Exception {
+ AuditSchedule expectedResponse =
+ AuditSchedule.newBuilder()
+ .setName(
+ AuditScheduleName.ofProjectLocationAuditScheduleName(
+ "[PROJECT]", "[LOCATION]", "[AUDIT_SCHEDULE]")
+ .toString())
+ .setDisplayName("displayName1714148973")
+ .setGcsUri("gcsUri-1251224875")
+ .setComplianceFramework("complianceFramework-1808314333")
+ .setScheduleConfig(ScheduleConfig.newBuilder().build())
+ .setState(ScheduleState.forNumber(0))
+ .setCreateTime(Timestamp.newBuilder().build())
+ .setUpdateTime(Timestamp.newBuilder().build())
+ .setNextRunTime(Timestamp.newBuilder().build())
+ .setLastTriggerTime(Timestamp.newBuilder().build())
+ .setErrorMessage("errorMessage1203236063")
+ .build();
+ mockService.addResponse(expectedResponse);
+
+ AuditSchedule auditSchedule =
+ AuditSchedule.newBuilder()
+ .setName(
+ AuditScheduleName.ofProjectLocationAuditScheduleName(
+ "[PROJECT]", "[LOCATION]", "[AUDIT_SCHEDULE]")
+ .toString())
+ .setDisplayName("displayName1714148973")
+ .setGcsUri("gcsUri-1251224875")
+ .setComplianceFramework("complianceFramework-1808314333")
+ .setScheduleConfig(ScheduleConfig.newBuilder().build())
+ .setState(ScheduleState.forNumber(0))
+ .setCreateTime(Timestamp.newBuilder().build())
+ .setUpdateTime(Timestamp.newBuilder().build())
+ .setNextRunTime(Timestamp.newBuilder().build())
+ .setLastTriggerTime(Timestamp.newBuilder().build())
+ .setErrorMessage("errorMessage1203236063")
+ .build();
+ FieldMask updateMask = FieldMask.newBuilder().build();
+
+ AuditSchedule actualResponse = client.updateAuditSchedule(auditSchedule, updateMask);
+ Assert.assertEquals(expectedResponse, actualResponse);
+
+ List actualRequests = mockService.getRequestPaths();
+ Assert.assertEquals(1, actualRequests.size());
+
+ String apiClientHeaderKey =
+ mockService
+ .getRequestHeaders()
+ .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey())
+ .iterator()
+ .next();
+ Assert.assertTrue(
+ GaxHttpJsonProperties.getDefaultApiClientHeaderPattern()
+ .matcher(apiClientHeaderKey)
+ .matches());
+ }
+
+ @Test
+ public void updateAuditScheduleExceptionTest() throws Exception {
+ ApiException exception =
+ ApiExceptionFactory.createException(
+ new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+ mockService.addException(exception);
+
+ try {
+ AuditSchedule auditSchedule =
+ AuditSchedule.newBuilder()
+ .setName(
+ AuditScheduleName.ofProjectLocationAuditScheduleName(
+ "[PROJECT]", "[LOCATION]", "[AUDIT_SCHEDULE]")
+ .toString())
+ .setDisplayName("displayName1714148973")
+ .setGcsUri("gcsUri-1251224875")
+ .setComplianceFramework("complianceFramework-1808314333")
+ .setScheduleConfig(ScheduleConfig.newBuilder().build())
+ .setState(ScheduleState.forNumber(0))
+ .setCreateTime(Timestamp.newBuilder().build())
+ .setUpdateTime(Timestamp.newBuilder().build())
+ .setNextRunTime(Timestamp.newBuilder().build())
+ .setLastTriggerTime(Timestamp.newBuilder().build())
+ .setErrorMessage("errorMessage1203236063")
+ .build();
+ FieldMask updateMask = FieldMask.newBuilder().build();
+ client.updateAuditSchedule(auditSchedule, updateMask);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+
+ @Test
+ public void getAuditScheduleTest() throws Exception {
+ AuditSchedule expectedResponse =
+ AuditSchedule.newBuilder()
+ .setName(
+ AuditScheduleName.ofProjectLocationAuditScheduleName(
+ "[PROJECT]", "[LOCATION]", "[AUDIT_SCHEDULE]")
+ .toString())
+ .setDisplayName("displayName1714148973")
+ .setGcsUri("gcsUri-1251224875")
+ .setComplianceFramework("complianceFramework-1808314333")
+ .setScheduleConfig(ScheduleConfig.newBuilder().build())
+ .setState(ScheduleState.forNumber(0))
+ .setCreateTime(Timestamp.newBuilder().build())
+ .setUpdateTime(Timestamp.newBuilder().build())
+ .setNextRunTime(Timestamp.newBuilder().build())
+ .setLastTriggerTime(Timestamp.newBuilder().build())
+ .setErrorMessage("errorMessage1203236063")
+ .build();
+ mockService.addResponse(expectedResponse);
+
+ AuditScheduleName name =
+ AuditScheduleName.ofProjectLocationAuditScheduleName(
+ "[PROJECT]", "[LOCATION]", "[AUDIT_SCHEDULE]");
+
+ AuditSchedule actualResponse = client.getAuditSchedule(name);
+ Assert.assertEquals(expectedResponse, actualResponse);
+
+ List actualRequests = mockService.getRequestPaths();
+ Assert.assertEquals(1, actualRequests.size());
+
+ String apiClientHeaderKey =
+ mockService
+ .getRequestHeaders()
+ .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey())
+ .iterator()
+ .next();
+ Assert.assertTrue(
+ GaxHttpJsonProperties.getDefaultApiClientHeaderPattern()
+ .matcher(apiClientHeaderKey)
+ .matches());
+ }
+
+ @Test
+ public void getAuditScheduleExceptionTest() throws Exception {
+ ApiException exception =
+ ApiExceptionFactory.createException(
+ new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+ mockService.addException(exception);
+
+ try {
+ AuditScheduleName name =
+ AuditScheduleName.ofProjectLocationAuditScheduleName(
+ "[PROJECT]", "[LOCATION]", "[AUDIT_SCHEDULE]");
+ client.getAuditSchedule(name);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+
+ @Test
+ public void getAuditScheduleTest2() throws Exception {
+ AuditSchedule expectedResponse =
+ AuditSchedule.newBuilder()
+ .setName(
+ AuditScheduleName.ofProjectLocationAuditScheduleName(
+ "[PROJECT]", "[LOCATION]", "[AUDIT_SCHEDULE]")
+ .toString())
+ .setDisplayName("displayName1714148973")
+ .setGcsUri("gcsUri-1251224875")
+ .setComplianceFramework("complianceFramework-1808314333")
+ .setScheduleConfig(ScheduleConfig.newBuilder().build())
+ .setState(ScheduleState.forNumber(0))
+ .setCreateTime(Timestamp.newBuilder().build())
+ .setUpdateTime(Timestamp.newBuilder().build())
+ .setNextRunTime(Timestamp.newBuilder().build())
+ .setLastTriggerTime(Timestamp.newBuilder().build())
+ .setErrorMessage("errorMessage1203236063")
+ .build();
+ mockService.addResponse(expectedResponse);
+
+ String name = "projects/project-8209/locations/location-8209/auditSchedules/auditSchedule-8209";
+
+ AuditSchedule actualResponse = client.getAuditSchedule(name);
+ Assert.assertEquals(expectedResponse, actualResponse);
+
+ List actualRequests = mockService.getRequestPaths();
+ Assert.assertEquals(1, actualRequests.size());
+
+ String apiClientHeaderKey =
+ mockService
+ .getRequestHeaders()
+ .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey())
+ .iterator()
+ .next();
+ Assert.assertTrue(
+ GaxHttpJsonProperties.getDefaultApiClientHeaderPattern()
+ .matcher(apiClientHeaderKey)
+ .matches());
+ }
+
+ @Test
+ public void getAuditScheduleExceptionTest2() throws Exception {
+ ApiException exception =
+ ApiExceptionFactory.createException(
+ new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+ mockService.addException(exception);
+
+ try {
+ String name =
+ "projects/project-8209/locations/location-8209/auditSchedules/auditSchedule-8209";
+ client.getAuditSchedule(name);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+
+ @Test
+ public void listAuditSchedulesTest() throws Exception {
+ AuditSchedule responsesElement = AuditSchedule.newBuilder().build();
+ ListAuditSchedulesResponse expectedResponse =
+ ListAuditSchedulesResponse.newBuilder()
+ .setNextPageToken("")
+ .addAllAuditSchedules(Arrays.asList(responsesElement))
+ .build();
+ mockService.addResponse(expectedResponse);
+
+ EnrollmentStatusScopeName parent =
+ EnrollmentStatusScopeName.ofFolderLocationName("[FOLDER]", "[LOCATION]");
+
+ ListAuditSchedulesPagedResponse pagedListResponse = client.listAuditSchedules(parent);
+
+ List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+
+ Assert.assertEquals(1, resources.size());
+ Assert.assertEquals(expectedResponse.getAuditSchedulesList().get(0), resources.get(0));
+
+ List actualRequests = mockService.getRequestPaths();
+ Assert.assertEquals(1, actualRequests.size());
+
+ String apiClientHeaderKey =
+ mockService
+ .getRequestHeaders()
+ .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey())
+ .iterator()
+ .next();
+ Assert.assertTrue(
+ GaxHttpJsonProperties.getDefaultApiClientHeaderPattern()
+ .matcher(apiClientHeaderKey)
+ .matches());
+ }
+
+ @Test
+ public void listAuditSchedulesExceptionTest() throws Exception {
+ ApiException exception =
+ ApiExceptionFactory.createException(
+ new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+ mockService.addException(exception);
+
+ try {
+ EnrollmentStatusScopeName parent =
+ EnrollmentStatusScopeName.ofFolderLocationName("[FOLDER]", "[LOCATION]");
+ client.listAuditSchedules(parent);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+
+ @Test
+ public void listAuditSchedulesTest2() throws Exception {
+ AuditSchedule responsesElement = AuditSchedule.newBuilder().build();
+ ListAuditSchedulesResponse expectedResponse =
+ ListAuditSchedulesResponse.newBuilder()
+ .setNextPageToken("")
+ .addAllAuditSchedules(Arrays.asList(responsesElement))
+ .build();
+ mockService.addResponse(expectedResponse);
+
+ LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+
+ ListAuditSchedulesPagedResponse pagedListResponse = client.listAuditSchedules(parent);
+
+ List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+
+ Assert.assertEquals(1, resources.size());
+ Assert.assertEquals(expectedResponse.getAuditSchedulesList().get(0), resources.get(0));
+
+ List actualRequests = mockService.getRequestPaths();
+ Assert.assertEquals(1, actualRequests.size());
+
+ String apiClientHeaderKey =
+ mockService
+ .getRequestHeaders()
+ .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey())
+ .iterator()
+ .next();
+ Assert.assertTrue(
+ GaxHttpJsonProperties.getDefaultApiClientHeaderPattern()
+ .matcher(apiClientHeaderKey)
+ .matches());
+ }
+
+ @Test
+ public void listAuditSchedulesExceptionTest2() throws Exception {
+ ApiException exception =
+ ApiExceptionFactory.createException(
+ new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+ mockService.addException(exception);
+
+ try {
+ LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ client.listAuditSchedules(parent);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+
+ @Test
+ public void listAuditSchedulesTest3() throws Exception {
+ AuditSchedule responsesElement = AuditSchedule.newBuilder().build();
+ ListAuditSchedulesResponse expectedResponse =
+ ListAuditSchedulesResponse.newBuilder()
+ .setNextPageToken("")
+ .addAllAuditSchedules(Arrays.asList(responsesElement))
+ .build();
+ mockService.addResponse(expectedResponse);
+
+ String parent = "projects/project-5833/locations/location-5833";
+
+ ListAuditSchedulesPagedResponse pagedListResponse = client.listAuditSchedules(parent);
+
+ List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+
+ Assert.assertEquals(1, resources.size());
+ Assert.assertEquals(expectedResponse.getAuditSchedulesList().get(0), resources.get(0));
+
+ List actualRequests = mockService.getRequestPaths();
+ Assert.assertEquals(1, actualRequests.size());
+
+ String apiClientHeaderKey =
+ mockService
+ .getRequestHeaders()
+ .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey())
+ .iterator()
+ .next();
+ Assert.assertTrue(
+ GaxHttpJsonProperties.getDefaultApiClientHeaderPattern()
+ .matcher(apiClientHeaderKey)
+ .matches());
+ }
+
+ @Test
+ public void listAuditSchedulesExceptionTest3() throws Exception {
+ ApiException exception =
+ ApiExceptionFactory.createException(
+ new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+ mockService.addException(exception);
+
+ try {
+ String parent = "projects/project-5833/locations/location-5833";
+ client.listAuditSchedules(parent);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+
@Test
public void enrollResourceTest() throws Exception {
Enrollment expectedResponse =
diff --git a/java-auditmanager/google-cloud-auditmanager/src/test/java/com/google/cloud/auditmanager/v1/AuditManagerClientTest.java b/java-auditmanager/google-cloud-auditmanager/src/test/java/com/google/cloud/auditmanager/v1/AuditManagerClientTest.java
index 94e5b9045f38..c32e70f192b8 100644
--- a/java-auditmanager/google-cloud-auditmanager/src/test/java/com/google/cloud/auditmanager/v1/AuditManagerClientTest.java
+++ b/java-auditmanager/google-cloud-auditmanager/src/test/java/com/google/cloud/auditmanager/v1/AuditManagerClientTest.java
@@ -17,6 +17,7 @@
package com.google.cloud.auditmanager.v1;
import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListAuditReportsPagedResponse;
+import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListAuditSchedulesPagedResponse;
import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListControlsPagedResponse;
import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListLocationsPagedResponse;
import static com.google.cloud.auditmanager.v1.AuditManagerClient.ListResourceEnrollmentStatusesPagedResponse;
@@ -37,6 +38,7 @@
import com.google.longrunning.Operation;
import com.google.protobuf.AbstractMessage;
import com.google.protobuf.Any;
+import com.google.protobuf.FieldMask;
import com.google.protobuf.Timestamp;
import io.grpc.StatusRuntimeException;
import java.io.IOException;
@@ -95,6 +97,476 @@ public void tearDown() throws Exception {
client.close();
}
+ @Test
+ public void createAuditScheduleTest() throws Exception {
+ AuditSchedule expectedResponse =
+ AuditSchedule.newBuilder()
+ .setName(
+ AuditScheduleName.ofProjectLocationAuditScheduleName(
+ "[PROJECT]", "[LOCATION]", "[AUDIT_SCHEDULE]")
+ .toString())
+ .setDisplayName("displayName1714148973")
+ .setGcsUri("gcsUri-1251224875")
+ .setComplianceFramework("complianceFramework-1808314333")
+ .setScheduleConfig(ScheduleConfig.newBuilder().build())
+ .setState(ScheduleState.forNumber(0))
+ .setCreateTime(Timestamp.newBuilder().build())
+ .setUpdateTime(Timestamp.newBuilder().build())
+ .setNextRunTime(Timestamp.newBuilder().build())
+ .setLastTriggerTime(Timestamp.newBuilder().build())
+ .setErrorMessage("errorMessage1203236063")
+ .build();
+ mockAuditManager.addResponse(expectedResponse);
+
+ EnrollmentStatusScopeName parent =
+ EnrollmentStatusScopeName.ofFolderLocationName("[FOLDER]", "[LOCATION]");
+ AuditSchedule auditSchedule = AuditSchedule.newBuilder().build();
+ String auditScheduleId = "auditScheduleId1594553421";
+
+ AuditSchedule actualResponse =
+ client.createAuditSchedule(parent, auditSchedule, auditScheduleId);
+ Assert.assertEquals(expectedResponse, actualResponse);
+
+ List actualRequests = mockAuditManager.getRequests();
+ Assert.assertEquals(1, actualRequests.size());
+ CreateAuditScheduleRequest actualRequest = ((CreateAuditScheduleRequest) actualRequests.get(0));
+
+ Assert.assertEquals(parent.toString(), actualRequest.getParent());
+ Assert.assertEquals(auditSchedule, actualRequest.getAuditSchedule());
+ Assert.assertEquals(auditScheduleId, actualRequest.getAuditScheduleId());
+ Assert.assertTrue(
+ channelProvider.isHeaderSent(
+ ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+ GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+ }
+
+ @Test
+ public void createAuditScheduleExceptionTest() throws Exception {
+ StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+ mockAuditManager.addException(exception);
+
+ try {
+ EnrollmentStatusScopeName parent =
+ EnrollmentStatusScopeName.ofFolderLocationName("[FOLDER]", "[LOCATION]");
+ AuditSchedule auditSchedule = AuditSchedule.newBuilder().build();
+ String auditScheduleId = "auditScheduleId1594553421";
+ client.createAuditSchedule(parent, auditSchedule, auditScheduleId);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+
+ @Test
+ public void createAuditScheduleTest2() throws Exception {
+ AuditSchedule expectedResponse =
+ AuditSchedule.newBuilder()
+ .setName(
+ AuditScheduleName.ofProjectLocationAuditScheduleName(
+ "[PROJECT]", "[LOCATION]", "[AUDIT_SCHEDULE]")
+ .toString())
+ .setDisplayName("displayName1714148973")
+ .setGcsUri("gcsUri-1251224875")
+ .setComplianceFramework("complianceFramework-1808314333")
+ .setScheduleConfig(ScheduleConfig.newBuilder().build())
+ .setState(ScheduleState.forNumber(0))
+ .setCreateTime(Timestamp.newBuilder().build())
+ .setUpdateTime(Timestamp.newBuilder().build())
+ .setNextRunTime(Timestamp.newBuilder().build())
+ .setLastTriggerTime(Timestamp.newBuilder().build())
+ .setErrorMessage("errorMessage1203236063")
+ .build();
+ mockAuditManager.addResponse(expectedResponse);
+
+ LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ AuditSchedule auditSchedule = AuditSchedule.newBuilder().build();
+ String auditScheduleId = "auditScheduleId1594553421";
+
+ AuditSchedule actualResponse =
+ client.createAuditSchedule(parent, auditSchedule, auditScheduleId);
+ Assert.assertEquals(expectedResponse, actualResponse);
+
+ List actualRequests = mockAuditManager.getRequests();
+ Assert.assertEquals(1, actualRequests.size());
+ CreateAuditScheduleRequest actualRequest = ((CreateAuditScheduleRequest) actualRequests.get(0));
+
+ Assert.assertEquals(parent.toString(), actualRequest.getParent());
+ Assert.assertEquals(auditSchedule, actualRequest.getAuditSchedule());
+ Assert.assertEquals(auditScheduleId, actualRequest.getAuditScheduleId());
+ Assert.assertTrue(
+ channelProvider.isHeaderSent(
+ ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+ GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+ }
+
+ @Test
+ public void createAuditScheduleExceptionTest2() throws Exception {
+ StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+ mockAuditManager.addException(exception);
+
+ try {
+ LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ AuditSchedule auditSchedule = AuditSchedule.newBuilder().build();
+ String auditScheduleId = "auditScheduleId1594553421";
+ client.createAuditSchedule(parent, auditSchedule, auditScheduleId);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+
+ @Test
+ public void createAuditScheduleTest3() throws Exception {
+ AuditSchedule expectedResponse =
+ AuditSchedule.newBuilder()
+ .setName(
+ AuditScheduleName.ofProjectLocationAuditScheduleName(
+ "[PROJECT]", "[LOCATION]", "[AUDIT_SCHEDULE]")
+ .toString())
+ .setDisplayName("displayName1714148973")
+ .setGcsUri("gcsUri-1251224875")
+ .setComplianceFramework("complianceFramework-1808314333")
+ .setScheduleConfig(ScheduleConfig.newBuilder().build())
+ .setState(ScheduleState.forNumber(0))
+ .setCreateTime(Timestamp.newBuilder().build())
+ .setUpdateTime(Timestamp.newBuilder().build())
+ .setNextRunTime(Timestamp.newBuilder().build())
+ .setLastTriggerTime(Timestamp.newBuilder().build())
+ .setErrorMessage("errorMessage1203236063")
+ .build();
+ mockAuditManager.addResponse(expectedResponse);
+
+ String parent = "parent-995424086";
+ AuditSchedule auditSchedule = AuditSchedule.newBuilder().build();
+ String auditScheduleId = "auditScheduleId1594553421";
+
+ AuditSchedule actualResponse =
+ client.createAuditSchedule(parent, auditSchedule, auditScheduleId);
+ Assert.assertEquals(expectedResponse, actualResponse);
+
+ List actualRequests = mockAuditManager.getRequests();
+ Assert.assertEquals(1, actualRequests.size());
+ CreateAuditScheduleRequest actualRequest = ((CreateAuditScheduleRequest) actualRequests.get(0));
+
+ Assert.assertEquals(parent, actualRequest.getParent());
+ Assert.assertEquals(auditSchedule, actualRequest.getAuditSchedule());
+ Assert.assertEquals(auditScheduleId, actualRequest.getAuditScheduleId());
+ Assert.assertTrue(
+ channelProvider.isHeaderSent(
+ ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+ GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+ }
+
+ @Test
+ public void createAuditScheduleExceptionTest3() throws Exception {
+ StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+ mockAuditManager.addException(exception);
+
+ try {
+ String parent = "parent-995424086";
+ AuditSchedule auditSchedule = AuditSchedule.newBuilder().build();
+ String auditScheduleId = "auditScheduleId1594553421";
+ client.createAuditSchedule(parent, auditSchedule, auditScheduleId);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+
+ @Test
+ public void updateAuditScheduleTest() throws Exception {
+ AuditSchedule expectedResponse =
+ AuditSchedule.newBuilder()
+ .setName(
+ AuditScheduleName.ofProjectLocationAuditScheduleName(
+ "[PROJECT]", "[LOCATION]", "[AUDIT_SCHEDULE]")
+ .toString())
+ .setDisplayName("displayName1714148973")
+ .setGcsUri("gcsUri-1251224875")
+ .setComplianceFramework("complianceFramework-1808314333")
+ .setScheduleConfig(ScheduleConfig.newBuilder().build())
+ .setState(ScheduleState.forNumber(0))
+ .setCreateTime(Timestamp.newBuilder().build())
+ .setUpdateTime(Timestamp.newBuilder().build())
+ .setNextRunTime(Timestamp.newBuilder().build())
+ .setLastTriggerTime(Timestamp.newBuilder().build())
+ .setErrorMessage("errorMessage1203236063")
+ .build();
+ mockAuditManager.addResponse(expectedResponse);
+
+ AuditSchedule auditSchedule = AuditSchedule.newBuilder().build();
+ FieldMask updateMask = FieldMask.newBuilder().build();
+
+ AuditSchedule actualResponse = client.updateAuditSchedule(auditSchedule, updateMask);
+ Assert.assertEquals(expectedResponse, actualResponse);
+
+ List actualRequests = mockAuditManager.getRequests();
+ Assert.assertEquals(1, actualRequests.size());
+ UpdateAuditScheduleRequest actualRequest = ((UpdateAuditScheduleRequest) actualRequests.get(0));
+
+ Assert.assertEquals(auditSchedule, actualRequest.getAuditSchedule());
+ Assert.assertEquals(updateMask, actualRequest.getUpdateMask());
+ Assert.assertTrue(
+ channelProvider.isHeaderSent(
+ ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+ GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+ }
+
+ @Test
+ public void updateAuditScheduleExceptionTest() throws Exception {
+ StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+ mockAuditManager.addException(exception);
+
+ try {
+ AuditSchedule auditSchedule = AuditSchedule.newBuilder().build();
+ FieldMask updateMask = FieldMask.newBuilder().build();
+ client.updateAuditSchedule(auditSchedule, updateMask);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+
+ @Test
+ public void getAuditScheduleTest() throws Exception {
+ AuditSchedule expectedResponse =
+ AuditSchedule.newBuilder()
+ .setName(
+ AuditScheduleName.ofProjectLocationAuditScheduleName(
+ "[PROJECT]", "[LOCATION]", "[AUDIT_SCHEDULE]")
+ .toString())
+ .setDisplayName("displayName1714148973")
+ .setGcsUri("gcsUri-1251224875")
+ .setComplianceFramework("complianceFramework-1808314333")
+ .setScheduleConfig(ScheduleConfig.newBuilder().build())
+ .setState(ScheduleState.forNumber(0))
+ .setCreateTime(Timestamp.newBuilder().build())
+ .setUpdateTime(Timestamp.newBuilder().build())
+ .setNextRunTime(Timestamp.newBuilder().build())
+ .setLastTriggerTime(Timestamp.newBuilder().build())
+ .setErrorMessage("errorMessage1203236063")
+ .build();
+ mockAuditManager.addResponse(expectedResponse);
+
+ AuditScheduleName name =
+ AuditScheduleName.ofProjectLocationAuditScheduleName(
+ "[PROJECT]", "[LOCATION]", "[AUDIT_SCHEDULE]");
+
+ AuditSchedule actualResponse = client.getAuditSchedule(name);
+ Assert.assertEquals(expectedResponse, actualResponse);
+
+ List actualRequests = mockAuditManager.getRequests();
+ Assert.assertEquals(1, actualRequests.size());
+ GetAuditScheduleRequest actualRequest = ((GetAuditScheduleRequest) actualRequests.get(0));
+
+ Assert.assertEquals(name.toString(), actualRequest.getName());
+ Assert.assertTrue(
+ channelProvider.isHeaderSent(
+ ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+ GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+ }
+
+ @Test
+ public void getAuditScheduleExceptionTest() throws Exception {
+ StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+ mockAuditManager.addException(exception);
+
+ try {
+ AuditScheduleName name =
+ AuditScheduleName.ofProjectLocationAuditScheduleName(
+ "[PROJECT]", "[LOCATION]", "[AUDIT_SCHEDULE]");
+ client.getAuditSchedule(name);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+
+ @Test
+ public void getAuditScheduleTest2() throws Exception {
+ AuditSchedule expectedResponse =
+ AuditSchedule.newBuilder()
+ .setName(
+ AuditScheduleName.ofProjectLocationAuditScheduleName(
+ "[PROJECT]", "[LOCATION]", "[AUDIT_SCHEDULE]")
+ .toString())
+ .setDisplayName("displayName1714148973")
+ .setGcsUri("gcsUri-1251224875")
+ .setComplianceFramework("complianceFramework-1808314333")
+ .setScheduleConfig(ScheduleConfig.newBuilder().build())
+ .setState(ScheduleState.forNumber(0))
+ .setCreateTime(Timestamp.newBuilder().build())
+ .setUpdateTime(Timestamp.newBuilder().build())
+ .setNextRunTime(Timestamp.newBuilder().build())
+ .setLastTriggerTime(Timestamp.newBuilder().build())
+ .setErrorMessage("errorMessage1203236063")
+ .build();
+ mockAuditManager.addResponse(expectedResponse);
+
+ String name = "name3373707";
+
+ AuditSchedule actualResponse = client.getAuditSchedule(name);
+ Assert.assertEquals(expectedResponse, actualResponse);
+
+ List actualRequests = mockAuditManager.getRequests();
+ Assert.assertEquals(1, actualRequests.size());
+ GetAuditScheduleRequest actualRequest = ((GetAuditScheduleRequest) actualRequests.get(0));
+
+ Assert.assertEquals(name, actualRequest.getName());
+ Assert.assertTrue(
+ channelProvider.isHeaderSent(
+ ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+ GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+ }
+
+ @Test
+ public void getAuditScheduleExceptionTest2() throws Exception {
+ StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+ mockAuditManager.addException(exception);
+
+ try {
+ String name = "name3373707";
+ client.getAuditSchedule(name);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+
+ @Test
+ public void listAuditSchedulesTest() throws Exception {
+ AuditSchedule responsesElement = AuditSchedule.newBuilder().build();
+ ListAuditSchedulesResponse expectedResponse =
+ ListAuditSchedulesResponse.newBuilder()
+ .setNextPageToken("")
+ .addAllAuditSchedules(Arrays.asList(responsesElement))
+ .build();
+ mockAuditManager.addResponse(expectedResponse);
+
+ EnrollmentStatusScopeName parent =
+ EnrollmentStatusScopeName.ofFolderLocationName("[FOLDER]", "[LOCATION]");
+
+ ListAuditSchedulesPagedResponse pagedListResponse = client.listAuditSchedules(parent);
+
+ List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+
+ Assert.assertEquals(1, resources.size());
+ Assert.assertEquals(expectedResponse.getAuditSchedulesList().get(0), resources.get(0));
+
+ List actualRequests = mockAuditManager.getRequests();
+ Assert.assertEquals(1, actualRequests.size());
+ ListAuditSchedulesRequest actualRequest = ((ListAuditSchedulesRequest) actualRequests.get(0));
+
+ Assert.assertEquals(parent.toString(), actualRequest.getParent());
+ Assert.assertTrue(
+ channelProvider.isHeaderSent(
+ ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+ GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+ }
+
+ @Test
+ public void listAuditSchedulesExceptionTest() throws Exception {
+ StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+ mockAuditManager.addException(exception);
+
+ try {
+ EnrollmentStatusScopeName parent =
+ EnrollmentStatusScopeName.ofFolderLocationName("[FOLDER]", "[LOCATION]");
+ client.listAuditSchedules(parent);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+
+ @Test
+ public void listAuditSchedulesTest2() throws Exception {
+ AuditSchedule responsesElement = AuditSchedule.newBuilder().build();
+ ListAuditSchedulesResponse expectedResponse =
+ ListAuditSchedulesResponse.newBuilder()
+ .setNextPageToken("")
+ .addAllAuditSchedules(Arrays.asList(responsesElement))
+ .build();
+ mockAuditManager.addResponse(expectedResponse);
+
+ LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+
+ ListAuditSchedulesPagedResponse pagedListResponse = client.listAuditSchedules(parent);
+
+ List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+
+ Assert.assertEquals(1, resources.size());
+ Assert.assertEquals(expectedResponse.getAuditSchedulesList().get(0), resources.get(0));
+
+ List actualRequests = mockAuditManager.getRequests();
+ Assert.assertEquals(1, actualRequests.size());
+ ListAuditSchedulesRequest actualRequest = ((ListAuditSchedulesRequest) actualRequests.get(0));
+
+ Assert.assertEquals(parent.toString(), actualRequest.getParent());
+ Assert.assertTrue(
+ channelProvider.isHeaderSent(
+ ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+ GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+ }
+
+ @Test
+ public void listAuditSchedulesExceptionTest2() throws Exception {
+ StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+ mockAuditManager.addException(exception);
+
+ try {
+ LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ client.listAuditSchedules(parent);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+
+ @Test
+ public void listAuditSchedulesTest3() throws Exception {
+ AuditSchedule responsesElement = AuditSchedule.newBuilder().build();
+ ListAuditSchedulesResponse expectedResponse =
+ ListAuditSchedulesResponse.newBuilder()
+ .setNextPageToken("")
+ .addAllAuditSchedules(Arrays.asList(responsesElement))
+ .build();
+ mockAuditManager.addResponse(expectedResponse);
+
+ String parent = "parent-995424086";
+
+ ListAuditSchedulesPagedResponse pagedListResponse = client.listAuditSchedules(parent);
+
+ List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+
+ Assert.assertEquals(1, resources.size());
+ Assert.assertEquals(expectedResponse.getAuditSchedulesList().get(0), resources.get(0));
+
+ List actualRequests = mockAuditManager.getRequests();
+ Assert.assertEquals(1, actualRequests.size());
+ ListAuditSchedulesRequest actualRequest = ((ListAuditSchedulesRequest) actualRequests.get(0));
+
+ Assert.assertEquals(parent, actualRequest.getParent());
+ Assert.assertTrue(
+ channelProvider.isHeaderSent(
+ ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+ GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+ }
+
+ @Test
+ public void listAuditSchedulesExceptionTest3() throws Exception {
+ StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+ mockAuditManager.addException(exception);
+
+ try {
+ String parent = "parent-995424086";
+ client.listAuditSchedules(parent);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+
@Test
public void enrollResourceTest() throws Exception {
Enrollment expectedResponse =
diff --git a/java-auditmanager/google-cloud-auditmanager/src/test/java/com/google/cloud/auditmanager/v1/MockAuditManagerImpl.java b/java-auditmanager/google-cloud-auditmanager/src/test/java/com/google/cloud/auditmanager/v1/MockAuditManagerImpl.java
index daf9c004e64f..ad1c65cb5f8a 100644
--- a/java-auditmanager/google-cloud-auditmanager/src/test/java/com/google/cloud/auditmanager/v1/MockAuditManagerImpl.java
+++ b/java-auditmanager/google-cloud-auditmanager/src/test/java/com/google/cloud/auditmanager/v1/MockAuditManagerImpl.java
@@ -59,6 +59,91 @@ public void reset() {
responses = new LinkedList<>();
}
+ @Override
+ public void createAuditSchedule(
+ CreateAuditScheduleRequest request, StreamObserver responseObserver) {
+ Object response = responses.poll();
+ if (response instanceof AuditSchedule) {
+ requests.add(request);
+ responseObserver.onNext(((AuditSchedule) response));
+ responseObserver.onCompleted();
+ } else if (response instanceof Exception) {
+ responseObserver.onError(((Exception) response));
+ } else {
+ responseObserver.onError(
+ new IllegalArgumentException(
+ String.format(
+ "Unrecognized response type %s for method CreateAuditSchedule, expected %s or %s",
+ response == null ? "null" : response.getClass().getName(),
+ AuditSchedule.class.getName(),
+ Exception.class.getName())));
+ }
+ }
+
+ @Override
+ public void updateAuditSchedule(
+ UpdateAuditScheduleRequest request, StreamObserver responseObserver) {
+ Object response = responses.poll();
+ if (response instanceof AuditSchedule) {
+ requests.add(request);
+ responseObserver.onNext(((AuditSchedule) response));
+ responseObserver.onCompleted();
+ } else if (response instanceof Exception) {
+ responseObserver.onError(((Exception) response));
+ } else {
+ responseObserver.onError(
+ new IllegalArgumentException(
+ String.format(
+ "Unrecognized response type %s for method UpdateAuditSchedule, expected %s or %s",
+ response == null ? "null" : response.getClass().getName(),
+ AuditSchedule.class.getName(),
+ Exception.class.getName())));
+ }
+ }
+
+ @Override
+ public void getAuditSchedule(
+ GetAuditScheduleRequest request, StreamObserver responseObserver) {
+ Object response = responses.poll();
+ if (response instanceof AuditSchedule) {
+ requests.add(request);
+ responseObserver.onNext(((AuditSchedule) response));
+ responseObserver.onCompleted();
+ } else if (response instanceof Exception) {
+ responseObserver.onError(((Exception) response));
+ } else {
+ responseObserver.onError(
+ new IllegalArgumentException(
+ String.format(
+ "Unrecognized response type %s for method GetAuditSchedule, expected %s or %s",
+ response == null ? "null" : response.getClass().getName(),
+ AuditSchedule.class.getName(),
+ Exception.class.getName())));
+ }
+ }
+
+ @Override
+ public void listAuditSchedules(
+ ListAuditSchedulesRequest request,
+ StreamObserver responseObserver) {
+ Object response = responses.poll();
+ if (response instanceof ListAuditSchedulesResponse) {
+ requests.add(request);
+ responseObserver.onNext(((ListAuditSchedulesResponse) response));
+ responseObserver.onCompleted();
+ } else if (response instanceof Exception) {
+ responseObserver.onError(((Exception) response));
+ } else {
+ responseObserver.onError(
+ new IllegalArgumentException(
+ String.format(
+ "Unrecognized response type %s for method ListAuditSchedules, expected %s or %s",
+ response == null ? "null" : response.getClass().getName(),
+ ListAuditSchedulesResponse.class.getName(),
+ Exception.class.getName())));
+ }
+ }
+
@Override
public void enrollResource(
EnrollResourceRequest request, StreamObserver responseObserver) {
diff --git a/java-auditmanager/grpc-google-cloud-auditmanager-v1/src/main/java/com/google/cloud/auditmanager/v1/AuditManagerGrpc.java b/java-auditmanager/grpc-google-cloud-auditmanager-v1/src/main/java/com/google/cloud/auditmanager/v1/AuditManagerGrpc.java
index 3f8b9d48e0b5..4cbc5f81fb38 100644
--- a/java-auditmanager/grpc-google-cloud-auditmanager-v1/src/main/java/com/google/cloud/auditmanager/v1/AuditManagerGrpc.java
+++ b/java-auditmanager/grpc-google-cloud-auditmanager-v1/src/main/java/com/google/cloud/auditmanager/v1/AuditManagerGrpc.java
@@ -32,6 +32,195 @@ private AuditManagerGrpc() {}
public static final java.lang.String SERVICE_NAME = "google.cloud.auditmanager.v1.AuditManager";
// Static method descriptors that strictly reflect the proto.
+ private static volatile io.grpc.MethodDescriptor<
+ com.google.cloud.auditmanager.v1.CreateAuditScheduleRequest,
+ com.google.cloud.auditmanager.v1.AuditSchedule>
+ getCreateAuditScheduleMethod;
+
+ @io.grpc.stub.annotations.RpcMethod(
+ fullMethodName = SERVICE_NAME + '/' + "CreateAuditSchedule",
+ requestType = com.google.cloud.auditmanager.v1.CreateAuditScheduleRequest.class,
+ responseType = com.google.cloud.auditmanager.v1.AuditSchedule.class,
+ methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+ public static io.grpc.MethodDescriptor<
+ com.google.cloud.auditmanager.v1.CreateAuditScheduleRequest,
+ com.google.cloud.auditmanager.v1.AuditSchedule>
+ getCreateAuditScheduleMethod() {
+ io.grpc.MethodDescriptor<
+ com.google.cloud.auditmanager.v1.CreateAuditScheduleRequest,
+ com.google.cloud.auditmanager.v1.AuditSchedule>
+ getCreateAuditScheduleMethod;
+ if ((getCreateAuditScheduleMethod = AuditManagerGrpc.getCreateAuditScheduleMethod) == null) {
+ synchronized (AuditManagerGrpc.class) {
+ if ((getCreateAuditScheduleMethod = AuditManagerGrpc.getCreateAuditScheduleMethod)
+ == null) {
+ AuditManagerGrpc.getCreateAuditScheduleMethod =
+ getCreateAuditScheduleMethod =
+ io.grpc.MethodDescriptor
+ .
+ newBuilder()
+ .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ generateFullMethodName(SERVICE_NAME, "CreateAuditSchedule"))
+ .setSampledToLocalTracing(true)
+ .setRequestMarshaller(
+ io.grpc.protobuf.ProtoUtils.marshaller(
+ com.google.cloud.auditmanager.v1.CreateAuditScheduleRequest
+ .getDefaultInstance()))
+ .setResponseMarshaller(
+ io.grpc.protobuf.ProtoUtils.marshaller(
+ com.google.cloud.auditmanager.v1.AuditSchedule.getDefaultInstance()))
+ .setSchemaDescriptor(
+ new AuditManagerMethodDescriptorSupplier("CreateAuditSchedule"))
+ .build();
+ }
+ }
+ }
+ return getCreateAuditScheduleMethod;
+ }
+
+ private static volatile io.grpc.MethodDescriptor<
+ com.google.cloud.auditmanager.v1.UpdateAuditScheduleRequest,
+ com.google.cloud.auditmanager.v1.AuditSchedule>
+ getUpdateAuditScheduleMethod;
+
+ @io.grpc.stub.annotations.RpcMethod(
+ fullMethodName = SERVICE_NAME + '/' + "UpdateAuditSchedule",
+ requestType = com.google.cloud.auditmanager.v1.UpdateAuditScheduleRequest.class,
+ responseType = com.google.cloud.auditmanager.v1.AuditSchedule.class,
+ methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+ public static io.grpc.MethodDescriptor<
+ com.google.cloud.auditmanager.v1.UpdateAuditScheduleRequest,
+ com.google.cloud.auditmanager.v1.AuditSchedule>
+ getUpdateAuditScheduleMethod() {
+ io.grpc.MethodDescriptor<
+ com.google.cloud.auditmanager.v1.UpdateAuditScheduleRequest,
+ com.google.cloud.auditmanager.v1.AuditSchedule>
+ getUpdateAuditScheduleMethod;
+ if ((getUpdateAuditScheduleMethod = AuditManagerGrpc.getUpdateAuditScheduleMethod) == null) {
+ synchronized (AuditManagerGrpc.class) {
+ if ((getUpdateAuditScheduleMethod = AuditManagerGrpc.getUpdateAuditScheduleMethod)
+ == null) {
+ AuditManagerGrpc.getUpdateAuditScheduleMethod =
+ getUpdateAuditScheduleMethod =
+ io.grpc.MethodDescriptor
+ .
+ newBuilder()
+ .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ generateFullMethodName(SERVICE_NAME, "UpdateAuditSchedule"))
+ .setSampledToLocalTracing(true)
+ .setRequestMarshaller(
+ io.grpc.protobuf.ProtoUtils.marshaller(
+ com.google.cloud.auditmanager.v1.UpdateAuditScheduleRequest
+ .getDefaultInstance()))
+ .setResponseMarshaller(
+ io.grpc.protobuf.ProtoUtils.marshaller(
+ com.google.cloud.auditmanager.v1.AuditSchedule.getDefaultInstance()))
+ .setSchemaDescriptor(
+ new AuditManagerMethodDescriptorSupplier("UpdateAuditSchedule"))
+ .build();
+ }
+ }
+ }
+ return getUpdateAuditScheduleMethod;
+ }
+
+ private static volatile io.grpc.MethodDescriptor<
+ com.google.cloud.auditmanager.v1.GetAuditScheduleRequest,
+ com.google.cloud.auditmanager.v1.AuditSchedule>
+ getGetAuditScheduleMethod;
+
+ @io.grpc.stub.annotations.RpcMethod(
+ fullMethodName = SERVICE_NAME + '/' + "GetAuditSchedule",
+ requestType = com.google.cloud.auditmanager.v1.GetAuditScheduleRequest.class,
+ responseType = com.google.cloud.auditmanager.v1.AuditSchedule.class,
+ methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+ public static io.grpc.MethodDescriptor<
+ com.google.cloud.auditmanager.v1.GetAuditScheduleRequest,
+ com.google.cloud.auditmanager.v1.AuditSchedule>
+ getGetAuditScheduleMethod() {
+ io.grpc.MethodDescriptor<
+ com.google.cloud.auditmanager.v1.GetAuditScheduleRequest,
+ com.google.cloud.auditmanager.v1.AuditSchedule>
+ getGetAuditScheduleMethod;
+ if ((getGetAuditScheduleMethod = AuditManagerGrpc.getGetAuditScheduleMethod) == null) {
+ synchronized (AuditManagerGrpc.class) {
+ if ((getGetAuditScheduleMethod = AuditManagerGrpc.getGetAuditScheduleMethod) == null) {
+ AuditManagerGrpc.getGetAuditScheduleMethod =
+ getGetAuditScheduleMethod =
+ io.grpc.MethodDescriptor
+ .
+ newBuilder()
+ .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAuditSchedule"))
+ .setSampledToLocalTracing(true)
+ .setRequestMarshaller(
+ io.grpc.protobuf.ProtoUtils.marshaller(
+ com.google.cloud.auditmanager.v1.GetAuditScheduleRequest
+ .getDefaultInstance()))
+ .setResponseMarshaller(
+ io.grpc.protobuf.ProtoUtils.marshaller(
+ com.google.cloud.auditmanager.v1.AuditSchedule.getDefaultInstance()))
+ .setSchemaDescriptor(
+ new AuditManagerMethodDescriptorSupplier("GetAuditSchedule"))
+ .build();
+ }
+ }
+ }
+ return getGetAuditScheduleMethod;
+ }
+
+ private static volatile io.grpc.MethodDescriptor<
+ com.google.cloud.auditmanager.v1.ListAuditSchedulesRequest,
+ com.google.cloud.auditmanager.v1.ListAuditSchedulesResponse>
+ getListAuditSchedulesMethod;
+
+ @io.grpc.stub.annotations.RpcMethod(
+ fullMethodName = SERVICE_NAME + '/' + "ListAuditSchedules",
+ requestType = com.google.cloud.auditmanager.v1.ListAuditSchedulesRequest.class,
+ responseType = com.google.cloud.auditmanager.v1.ListAuditSchedulesResponse.class,
+ methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+ public static io.grpc.MethodDescriptor<
+ com.google.cloud.auditmanager.v1.ListAuditSchedulesRequest,
+ com.google.cloud.auditmanager.v1.ListAuditSchedulesResponse>
+ getListAuditSchedulesMethod() {
+ io.grpc.MethodDescriptor<
+ com.google.cloud.auditmanager.v1.ListAuditSchedulesRequest,
+ com.google.cloud.auditmanager.v1.ListAuditSchedulesResponse>
+ getListAuditSchedulesMethod;
+ if ((getListAuditSchedulesMethod = AuditManagerGrpc.getListAuditSchedulesMethod) == null) {
+ synchronized (AuditManagerGrpc.class) {
+ if ((getListAuditSchedulesMethod = AuditManagerGrpc.getListAuditSchedulesMethod) == null) {
+ AuditManagerGrpc.getListAuditSchedulesMethod =
+ getListAuditSchedulesMethod =
+ io.grpc.MethodDescriptor
+ .
+ newBuilder()
+ .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAuditSchedules"))
+ .setSampledToLocalTracing(true)
+ .setRequestMarshaller(
+ io.grpc.protobuf.ProtoUtils.marshaller(
+ com.google.cloud.auditmanager.v1.ListAuditSchedulesRequest
+ .getDefaultInstance()))
+ .setResponseMarshaller(
+ io.grpc.protobuf.ProtoUtils.marshaller(
+ com.google.cloud.auditmanager.v1.ListAuditSchedulesResponse
+ .getDefaultInstance()))
+ .setSchemaDescriptor(
+ new AuditManagerMethodDescriptorSupplier("ListAuditSchedules"))
+ .build();
+ }
+ }
+ }
+ return getListAuditSchedulesMethod;
+ }
+
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.auditmanager.v1.EnrollResourceRequest,
com.google.cloud.auditmanager.v1.Enrollment>
@@ -483,6 +672,66 @@ public AuditManagerFutureStub newStub(
*/
public interface AsyncService {
+ /**
+ *
+ *
+ *