Skip to content

Commit

Permalink
feat: [eventarc-publishing,securitycentermanagement] Add GroundedGene…
Browse files Browse the repository at this point in the history
…rationService API (#5778)

* feat: Add GroundedGenerationService API
feat: Add AdvancedCompleteQuery API
feat: Add lite search API to allow public website search with API key
feat: Add Sitemap APIs to preview channel
feat: Support search personalization to preview channel
feat: Support natural language understanding search
feat: Add BillingEstimation in data store
feat: Support Google Workspace search
feat: Support advanced boost search
feat: Add one_box_page_size on search
feat: support query regex in control match rules
docs: deprecate extractive_answers in answer generation
docs: deprecate asynchronous mode in answer generation
docs: keep the API doc up-to-date with recent changes

PiperOrigin-RevId: 691212731

Source-Link: googleapis/googleapis@e6b6ff9

Source-Link: googleapis/googleapis-gen@67144fd
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWV2ZW50YXJjLXB1Ymxpc2hpbmcvLk93bEJvdC55YW1sIiwiaCI6IjY3MTQ0ZmQ0M2M1YTNlMTY0NDEwYjM2MTdlNTc1MmYyZTA2NmVjMjUifQ==
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNlY3VyaXR5Y2VudGVybWFuYWdlbWVudC8uT3dsQm90LnlhbWwiLCJoIjoiNjcxNDRmZDQzYzVhM2UxNjQ0MTBiMzYxN2U1NzUyZjJlMDY2ZWMyNSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 30, 2024
1 parent ae63b6a commit fc49da8
Show file tree
Hide file tree
Showing 40 changed files with 5,010 additions and 1,211 deletions.
5 changes: 3 additions & 2 deletions packages/google-cloud-eventarc-publishing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
1. [Select or create a Cloud Platform project][projects].
1. [Enable billing for your project][billing].
1. [Enable the Eventarc Publishing API API][enable_api].
1. [Set up authentication with a service account][auth] so you can access the
1. [Set up authentication][auth] so you can access the
API from your local workstation.

### Installing the client library
Expand All @@ -62,6 +62,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/

| Sample | Source Code | Try it |
| --------------------------- | --------------------------------- | ------ |
| Publisher.publish | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc-publishing/samples/generated/v1/publisher.publish.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-eventarc-publishing/samples/generated/v1/publisher.publish.js,packages/google-cloud-eventarc-publishing/samples/README.md) |
| Publisher.publish_channel_connection_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc-publishing/samples/generated/v1/publisher.publish_channel_connection_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-eventarc-publishing/samples/generated/v1/publisher.publish_channel_connection_events.js,packages/google-cloud-eventarc-publishing/samples/README.md) |
| Publisher.publish_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc-publishing/samples/generated/v1/publisher.publish_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-eventarc-publishing/samples/generated/v1/publisher.publish_events.js,packages/google-cloud-eventarc-publishing/samples/README.md) |
| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc-publishing/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-eventarc-publishing/samples/quickstart.js,packages/google-cloud-eventarc-publishing/samples/README.md) |
Expand Down Expand Up @@ -134,4 +135,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
[projects]: https://console.cloud.google.com/project
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=eventarcpublishing.googleapis.com
[auth]: https://cloud.google.com/docs/authentication/getting-started
[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
// Copyright 2024 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.eventarc.publishing.v1;

import "google/api/field_behavior.proto";
import "google/protobuf/any.proto";
import "google/protobuf/timestamp.proto";

option csharp_namespace = "Google.Cloud.Eventarc.Publishing.V1";
option go_package = "cloud.google.com/go/eventarc/publishing/apiv1/publishingpb;publishingpb";
option java_multiple_files = true;
option java_outer_classname = "CloudEventProto";
option java_package = "com.google.cloud.eventarc.publishing.v1";
option php_namespace = "Google\\Cloud\\Eventarc\\Publishing\\V1";
option ruby_package = "Google::Cloud::Eventarc::Publishing::V1";

// CloudEvent represents a vendor-neutral specification for defining the format
// of event data.
message CloudEvent {
// The following abstract data types are available for use in attributes.
message CloudEventAttributeValue {
// The value of the attribute.
oneof attr {
// Boolean value.
bool ce_boolean = 1;

// Integer value.
int32 ce_integer = 2;

// String value.
string ce_string = 3;

// Bytes value.
bytes ce_bytes = 4;

// URI value.
string ce_uri = 5;

// URI-reference value.
string ce_uri_ref = 6;

// Timestamp value.
google.protobuf.Timestamp ce_timestamp = 7;
}
}

// Required. Identifies the event. Producers MUST ensure that source + id is
// unique for each distinct event.
string id = 1 [(google.api.field_behavior) = REQUIRED];

// Required. Identifies the context in which an event happened.
// URI-reference
string source = 2 [(google.api.field_behavior) = REQUIRED];

// Required. The version of the CloudEvents specification which the event
// uses.
string spec_version = 3 [(google.api.field_behavior) = REQUIRED];

// Required. This attribute contains a value describing the type of event
// related to the originating occurrence.
string type = 4 [(google.api.field_behavior) = REQUIRED];

// Optional. Used for Optional & Extension Attributes
map<string, CloudEventAttributeValue> attributes = 5
[(google.api.field_behavior) = OPTIONAL];

// The event payload. It should be encoded into a media format which is
// specified by the 'datacontenttype' attribute (e.g. application/json), and
// adheres to the dataschema format when those respective attributes are
// present.
oneof data {
// Optional. Binary data.
bytes binary_data = 6 [(google.api.field_behavior) = OPTIONAL];

// Optional. Text data.
string text_data = 7 [(google.api.field_behavior) = OPTIONAL];

// Optional. Proto data.
google.protobuf.Any proto_data = 8 [(google.api.field_behavior) = OPTIONAL];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@
// 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.eventarc.publishing.v1;

import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/field_info.proto";
import "google/cloud/eventarc/publishing/v1/cloud_event.proto";
import "google/protobuf/any.proto";

option csharp_namespace = "Google.Cloud.Eventarc.Publishing.V1";
Expand Down Expand Up @@ -64,45 +68,89 @@ service Publisher {
body: "*"
};
}

// Publish events to a subscriber's channel.
rpc PublishEvents(PublishEventsRequest) returns (PublishEventsResponse) {
option (google.api.http) = {
post: "/v1/{channel=projects/*/locations/*/channels/*}:publishEvents"
body: "*"
};
}

// Publish events to a message bus.
rpc Publish(PublishRequest) returns (PublishResponse) {
option (google.api.http) = {
post: "/v1/{message_bus=projects/*/locations/*/messageBuses/*}:publish"
body: "*"
};
}
}

// The request message for the PublishChannelConnectionEvents method.
message PublishChannelConnectionEventsRequest {
// The channel_connection that the events are published from. For example:
// `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`.
string channel_connection = 1;

// The CloudEvents v1.0 events to publish. No other types are allowed.
// If this field is set, then the `text_events` fields must not be set.
repeated google.protobuf.Any events = 2;

// The text representation of events to publish.
// CloudEvent v1.0 in JSON format is the only allowed type. Refer to
// https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md
// for specification.
// If this field is set, then the `events` fields must not be set.
repeated string text_events = 3;
}

// The response message for the PublishChannelConnectionEvents method.
message PublishChannelConnectionEventsResponse {}

// The request message for the PublishEvents method.
message PublishEventsRequest {
// The full name of the channel to publish to. For example:
// `projects/{project}/locations/{location}/channels/{channel-id}`.
string channel = 1;

// The CloudEvents v1.0 events to publish. No other types are allowed.
// If this field is set, then the `text_events` fields must not be set.
repeated google.protobuf.Any events = 2;

// The text representation of events to publish.
// CloudEvent v1.0 in JSON format is the only allowed type. Refer to
// https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md
// for specification.
// If this field is set, then the `events` fields must not be set.
repeated string text_events = 3;
}

// The response message for the PublishEvents method.
message PublishEventsResponse {}

// The request message for the Publish method.
message PublishRequest {
// Required. The full name of the message bus to publish events to. Format:
// `projects/{project}/locations/{location}/messageBuses/{messageBus}`.
string message_bus = 1 [(google.api.field_behavior) = REQUIRED];

oneof format {
// The Protobuf format of the CloudEvent being published. Specification can
// be found here:
// https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md
CloudEvent proto_message = 2;

// The JSON format of the CloudEvent being published. Specification can be
// found here:
// https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md
string json_message = 3;

// The Avro format of the CloudEvent being published. Specification can
// be found here:
// https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/avro-format.md
bytes avro_message = 4;
}
}

// The response message for the Publish method.
message PublishResponse {}
Loading

0 comments on commit fc49da8

Please sign in to comment.