Skip to content

Commit

Permalink
feat!: updated log_entries proto
Browse files Browse the repository at this point in the history
feat: added fields for cloud logging, masking variables and integration state
PiperOrigin-RevId: 603042930
  • Loading branch information
Google APIs authored and Copybara-Service committed Jan 31, 2024
1 parent 27dcfb7 commit ad766bb
Show file tree
Hide file tree
Showing 9 changed files with 376 additions and 95 deletions.
83 changes: 69 additions & 14 deletions google/cloud/integrations/v1alpha/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ load("@rules_proto//proto:defs.bzl", "proto_library")
proto_library(
name = "integrations_proto",
srcs = [
"cloud_logging_details.proto",
"coordinate.proto",
"event_parameter.proto",
"integration_state.proto",
"json_validation.proto",
"log_entries.proto",
"product.proto",
Expand All @@ -29,19 +32,22 @@ proto_library(
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"java_grpc_library",
"java_proto_library",
"java_gapic_assembly_gradle_pkg",
)

java_proto_library(
name = "integrations_java_proto",
deps = [":integrations_proto"],
)

java_grpc_library(
name = "integrations_java_grpc",
srcs = [":integrations_proto"],
deps = [":integrations_java_proto"],
# Open Source Packages
java_gapic_assembly_gradle_pkg(
name = "google-cloud-integrations-v1alpha-java",
deps = [
":integrations_proto",
":integrations_java_proto",
],
)

##############################################################################
Expand All @@ -50,6 +56,7 @@ java_grpc_library(
load(
"@com_google_googleapis_imports//:imports.bzl",
"go_proto_library",
"go_gapic_assembly_pkg",
)

go_proto_library(
Expand All @@ -62,6 +69,13 @@ go_proto_library(
],
)

go_gapic_assembly_pkg(
name = "google-cloud-integrations-v1alpha-go",
deps = [
":integrations_go_proto",
],
)

##############################################################################
# Python
##############################################################################
Expand All @@ -70,6 +84,8 @@ load(
"moved_proto_library",
"py_grpc_library",
"py_proto_library",
"py_gapic_library",
"py_gapic_assembly_pkg",
)

moved_proto_library(
Expand All @@ -92,11 +108,27 @@ py_grpc_library(
deps = [":integrations_py_proto"],
)

py_gapic_library(
name = "integrations_py_gapic",
srcs = [":integrations_proto"],
rest_numeric_enums = False,
transport = "grpc+rest",
)

# Open Source Packages
py_gapic_assembly_pkg(
name = "google-cloud-integrations-v1alpha-py",
deps = [
":integrations_py_gapic",
],
)

##############################################################################
# PHP
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"php_gapic_assembly_pkg",
"php_proto_library",
)

Expand All @@ -105,9 +137,12 @@ php_proto_library(
deps = [":integrations_proto"],
)

##############################################################################
# Node.js
##############################################################################
php_gapic_assembly_pkg(
name = "google-cloud-integrations-v1alpha-php",
deps = [
":integrations_php_proto",
],
)

##############################################################################
# Ruby
Expand All @@ -134,22 +169,42 @@ ruby_grpc_library(
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"csharp_grpc_library",
"csharp_proto_library",
"csharp_gapic_assembly_pkg",
)

csharp_proto_library(
name = "integrations_csharp_proto",
deps = [":integrations_proto"],
)

csharp_grpc_library(
name = "integrations_csharp_grpc",
srcs = [":integrations_proto"],
deps = [":integrations_csharp_proto"],
# Open Source Packages
csharp_gapic_assembly_pkg(
name = "google-cloud-integrations-v1alpha-csharp",
package_name = "Google.Cloud.Integrations.V1Alpha",
generate_nongapic_package = True,
deps = [
":integrations_csharp_proto",
],
)

##############################################################################
# C++
##############################################################################
# Put your C++ code here
load(
"@com_google_googleapis_imports//:imports.bzl",
"cc_grpc_library",
"cc_proto_library",
)

cc_proto_library(
name = "integrations_cc_proto",
deps = [":integrations_proto"],
)

cc_grpc_library(
name = "integrations_cc_grpc",
srcs = [":integrations_proto"],
grpc_only = True,
deps = [":integrations_cc_proto"],
)
57 changes: 57 additions & 0 deletions google/cloud/integrations/v1alpha/cloud_logging_details.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.cloud.integrations.v1alpha;

import "google/api/field_behavior.proto";

option csharp_namespace = "Google.Cloud.Integrations.V1Alpha";
option go_package = "cloud.google.com/go/integrations/apiv1alpha/integrationspb;integrationspb";
option java_multiple_files = true;
option java_outer_classname = "CloudLoggingDetailsProto";
option java_package = "com.google.cloud.integrations.v1alpha";

// Cloud Logging details for execution info
message CloudLoggingDetails {
// The severity will be mapped to the Integration Execution State.
enum CloudLoggingSeverity {
// Unspecified
CLOUD_LOGGING_SEVERITY_UNSPECIFIED = 0;

// If Severity selected is `INFO`, then all the Integration Execution States
// (`IN_PROCESS`, `ON_HOLD`, `SUCCEEDED`, `SUSPENDED`, `ERROR`, `CANCELLED`)
// will be sent to Cloud Logging.
INFO = 2;

// If Severity selected is `ERROR`, then only the following Integration
// Execution States (`ERROR`, `CANCELLED`) will be sent to Cloud Logging.
ERROR = 3;

// If Severity selected is `WARNING`, then only the following Integration
// Execution States (`ERROR`, `CANCELLED`) will be sent to Cloud Logging.
WARNING = 4;
}

// Optional. Severity selected by the customer for the logs to be sent to
// Cloud Logging, for the integration version getting executed.
optional CloudLoggingSeverity cloud_logging_severity = 1
[(google.api.field_behavior) = OPTIONAL];

// Optional. Status of whether Cloud Logging is enabled or not for the
// integration version getting executed.
optional bool enable_cloud_logging = 2
[(google.api.field_behavior) = OPTIONAL];
}
34 changes: 34 additions & 0 deletions google/cloud/integrations/v1alpha/coordinate.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.cloud.integrations.v1alpha;

import "google/api/field_behavior.proto";

option csharp_namespace = "Google.Cloud.Integrations.V1Alpha";
option go_package = "cloud.google.com/go/integrations/apiv1alpha/integrationspb;integrationspb";
option java_multiple_files = true;
option java_outer_classname = "CoordinateProto";
option java_package = "com.google.cloud.integrations.v1alpha";

// Configuration detail of coordinate, it used for UI
message Coordinate {
// Required. X axis of the coordinate
int32 x = 1 [(google.api.field_behavior) = REQUIRED];

// Required. Y axis of the coordinate
int32 y = 2 [(google.api.field_behavior) = REQUIRED];
}
7 changes: 6 additions & 1 deletion google/cloud/integrations/v1alpha/event_parameter.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -18,13 +18,15 @@ package google.cloud.integrations.v1alpha;

import "google/cloud/integrations/v1alpha/value_type.proto";

option csharp_namespace = "Google.Cloud.Integrations.V1Alpha";
option go_package = "cloud.google.com/go/integrations/apiv1alpha/integrationspb;integrationspb";
option java_multiple_files = true;
option java_outer_classname = "EventParameterProto";
option java_package = "com.google.cloud.integrations.v1alpha";

// This message is used for processing and persisting (when applicable) key
// value pair parameters for each event in the event bus.
// Next available id: 4
message EventParameter {
// Key is used to retrieve the corresponding parameter value. This should be
// unique for a given fired event. These parameters must be predefined in the
Expand All @@ -34,4 +36,7 @@ message EventParameter {
// Values for the defined keys. Each value can either be string, int, double
// or any proto message.
ValueType value = 2;

// True if this parameter should be masked in the logs
bool masked = 3;
}
41 changes: 41 additions & 0 deletions google/cloud/integrations/v1alpha/integration_state.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.cloud.integrations.v1alpha;

option csharp_namespace = "Google.Cloud.Integrations.V1Alpha";
option go_package = "cloud.google.com/go/integrations/apiv1alpha/integrationspb;integrationspb";
option java_multiple_files = true;
option java_outer_classname = "IntegrationStateProto";
option java_package = "com.google.cloud.integrations.v1alpha";

// Indicates the status of the integration.
enum IntegrationState {
// Default.
INTEGRATION_STATE_UNSPECIFIED = 0;

// Draft.
DRAFT = 1;

// Active.
ACTIVE = 2;

// Archived.
ARCHIVED = 3;

// Snapshot.
SNAPSHOT = 4;
}
3 changes: 2 additions & 1 deletion google/cloud/integrations/v1alpha/json_validation.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -16,6 +16,7 @@ syntax = "proto3";

package google.cloud.integrations.v1alpha;

option csharp_namespace = "Google.Cloud.Integrations.V1Alpha";
option go_package = "cloud.google.com/go/integrations/apiv1alpha/integrationspb;integrationspb";
option java_multiple_files = true;
option java_outer_classname = "JsonValidationProto";
Expand Down

0 comments on commit ad766bb

Please sign in to comment.