-
Notifications
You must be signed in to change notification settings - Fork 362
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add publishing methods for channel resources
PiperOrigin-RevId: 442858558 Source-Link: googleapis/googleapis@726dac2 Source-Link: googleapis/googleapis-gen@b2ecfcf Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuRXZlbnRhcmMuUHVibGlzaGluZy5WMS8uT3dsQm90LnlhbWwiLCJoIjoiYjJlY2ZjZjI1MjQzNmViZTIxMzc2NjRlYTQxY2RjZDMzZDM2ZTJhZiJ9
- Loading branch information
1 parent
bfb3a24
commit b5ef156
Showing
9 changed files
with
770 additions
and
13 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
...blishing.V1.GeneratedSnippets/PublisherClient.PublishEventsRequestObjectAsyncSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// Copyright 2022 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace Google.Cloud.Eventarc.Publishing.V1.Snippets | ||
{ | ||
// [START eventarcpublishing_v1_generated_Publisher_PublishEvents_async] | ||
using Google.Cloud.Eventarc.Publishing.V1; | ||
using Google.Protobuf.WellKnownTypes; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedPublisherClientSnippets | ||
{ | ||
/// <summary>Snippet for PublishEventsAsync</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated for illustrative purposes only. | ||
/// It may require modifications to work in your environment. | ||
/// </remarks> | ||
public async Task PublishEventsRequestObjectAsync() | ||
{ | ||
// Create client | ||
PublisherClient publisherClient = await PublisherClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
PublishEventsRequest request = new PublishEventsRequest | ||
{ | ||
Channel = "", | ||
Events = { new Any(), }, | ||
}; | ||
// Make the request | ||
PublishEventsResponse response = await publisherClient.PublishEventsAsync(request); | ||
} | ||
} | ||
// [END eventarcpublishing_v1_generated_Publisher_PublishEvents_async] | ||
} |
45 changes: 45 additions & 0 deletions
45
...rc.Publishing.V1.GeneratedSnippets/PublisherClient.PublishEventsRequestObjectSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Copyright 2022 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace Google.Cloud.Eventarc.Publishing.V1.Snippets | ||
{ | ||
// [START eventarcpublishing_v1_generated_Publisher_PublishEvents_sync] | ||
using Google.Cloud.Eventarc.Publishing.V1; | ||
using Google.Protobuf.WellKnownTypes; | ||
|
||
public sealed partial class GeneratedPublisherClientSnippets | ||
{ | ||
/// <summary>Snippet for PublishEvents</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated for illustrative purposes only. | ||
/// It may require modifications to work in your environment. | ||
/// </remarks> | ||
public void PublishEventsRequestObject() | ||
{ | ||
// Create client | ||
PublisherClient publisherClient = PublisherClient.Create(); | ||
// Initialize request argument(s) | ||
PublishEventsRequest request = new PublishEventsRequest | ||
{ | ||
Channel = "", | ||
Events = { new Any(), }, | ||
}; | ||
// Make the request | ||
PublishEventsResponse response = publisherClient.PublishEvents(request); | ||
} | ||
} | ||
// [END eventarcpublishing_v1_generated_Publisher_PublishEvents_sync] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.