Skip to content

Commit

Permalink
feat: Add google.api.method.signature to update methods
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 509649352

Source-Link: googleapis/googleapis@1870ba2

Source-Link: googleapis/googleapis-gen@515dcdf
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuUHViU3ViLlYxLy5Pd2xCb3QueWFtbCIsImgiOiI1MTVkY2RmZGQyN2ZmMDBjMzBlNTU1YmRmMTdiNzc0M2UyMTQ1N2U5In0=
  • Loading branch information
gcf-owl-bot[bot] authored and jskeet committed Feb 15, 2023
1 parent a88bcd7 commit cf2f61a
Show file tree
Hide file tree
Showing 12 changed files with 871 additions and 96 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// 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
//
// 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.PubSub.V1.Snippets
{
// [START pubsub_v1_generated_PublisherServiceApi_UpdateTopic_async_flattened]
using Google.Cloud.PubSub.V1;
using Google.Protobuf.WellKnownTypes;
using System.Threading.Tasks;

public sealed partial class GeneratedPublisherServiceApiClientSnippets
{
/// <summary>Snippet for UpdateTopicAsync</summary>
/// <remarks>
/// 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/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public async Task UpdateTopicAsync()
{
// Create client
PublisherServiceApiClient publisherServiceApiClient = await PublisherServiceApiClient.CreateAsync();
// Initialize request argument(s)
Topic topic = new Topic();
FieldMask updateMask = new FieldMask();
// Make the request
Topic response = await publisherServiceApiClient.UpdateTopicAsync(topic, updateMask);
}
}
// [END pubsub_v1_generated_PublisherServiceApi_UpdateTopic_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// 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
//
// 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.PubSub.V1.Snippets
{
// [START pubsub_v1_generated_PublisherServiceApi_UpdateTopic_sync_flattened]
using Google.Cloud.PubSub.V1;
using Google.Protobuf.WellKnownTypes;

public sealed partial class GeneratedPublisherServiceApiClientSnippets
{
/// <summary>Snippet for UpdateTopic</summary>
/// <remarks>
/// 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/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public void UpdateTopic()
{
// Create client
PublisherServiceApiClient publisherServiceApiClient = PublisherServiceApiClient.Create();
// Initialize request argument(s)
Topic topic = new Topic();
FieldMask updateMask = new FieldMask();
// Make the request
Topic response = publisherServiceApiClient.UpdateTopic(topic, updateMask);
}
}
// [END pubsub_v1_generated_PublisherServiceApi_UpdateTopic_sync_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// 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
//
// 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.PubSub.V1.Snippets
{
// [START pubsub_v1_generated_SubscriberServiceApi_UpdateSnapshot_async_flattened]
using Google.Cloud.PubSub.V1;
using Google.Protobuf.WellKnownTypes;
using System.Threading.Tasks;

public sealed partial class GeneratedSubscriberServiceApiClientSnippets
{
/// <summary>Snippet for UpdateSnapshotAsync</summary>
/// <remarks>
/// 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/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public async Task UpdateSnapshotAsync()
{
// Create client
SubscriberServiceApiClient subscriberServiceApiClient = await SubscriberServiceApiClient.CreateAsync();
// Initialize request argument(s)
Snapshot snapshot = new Snapshot();
FieldMask updateMask = new FieldMask();
// Make the request
Snapshot response = await subscriberServiceApiClient.UpdateSnapshotAsync(snapshot, updateMask);
}
}
// [END pubsub_v1_generated_SubscriberServiceApi_UpdateSnapshot_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// 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
//
// 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.PubSub.V1.Snippets
{
// [START pubsub_v1_generated_SubscriberServiceApi_UpdateSnapshot_sync_flattened]
using Google.Cloud.PubSub.V1;
using Google.Protobuf.WellKnownTypes;

public sealed partial class GeneratedSubscriberServiceApiClientSnippets
{
/// <summary>Snippet for UpdateSnapshot</summary>
/// <remarks>
/// 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/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public void UpdateSnapshot()
{
// Create client
SubscriberServiceApiClient subscriberServiceApiClient = SubscriberServiceApiClient.Create();
// Initialize request argument(s)
Snapshot snapshot = new Snapshot();
FieldMask updateMask = new FieldMask();
// Make the request
Snapshot response = subscriberServiceApiClient.UpdateSnapshot(snapshot, updateMask);
}
}
// [END pubsub_v1_generated_SubscriberServiceApi_UpdateSnapshot_sync_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// 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
//
// 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.PubSub.V1.Snippets
{
// [START pubsub_v1_generated_SubscriberServiceApi_UpdateSubscription_async_flattened]
using Google.Cloud.PubSub.V1;
using Google.Protobuf.WellKnownTypes;
using System.Threading.Tasks;

public sealed partial class GeneratedSubscriberServiceApiClientSnippets
{
/// <summary>Snippet for UpdateSubscriptionAsync</summary>
/// <remarks>
/// 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/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public async Task UpdateSubscriptionAsync()
{
// Create client
SubscriberServiceApiClient subscriberServiceApiClient = await SubscriberServiceApiClient.CreateAsync();
// Initialize request argument(s)
Subscription subscription = new Subscription();
FieldMask updateMask = new FieldMask();
// Make the request
Subscription response = await subscriberServiceApiClient.UpdateSubscriptionAsync(subscription, updateMask);
}
}
// [END pubsub_v1_generated_SubscriberServiceApi_UpdateSubscription_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// 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
//
// 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.PubSub.V1.Snippets
{
// [START pubsub_v1_generated_SubscriberServiceApi_UpdateSubscription_sync_flattened]
using Google.Cloud.PubSub.V1;
using Google.Protobuf.WellKnownTypes;

public sealed partial class GeneratedSubscriberServiceApiClientSnippets
{
/// <summary>Snippet for UpdateSubscription</summary>
/// <remarks>
/// 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/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public void UpdateSubscription()
{
// Create client
SubscriberServiceApiClient subscriberServiceApiClient = SubscriberServiceApiClient.Create();
// Initialize request argument(s)
Subscription subscription = new Subscription();
FieldMask updateMask = new FieldMask();
// Make the request
Subscription response = subscriberServiceApiClient.UpdateSubscription(subscription, updateMask);
}
}
// [END pubsub_v1_generated_SubscriberServiceApi_UpdateSubscription_sync_flattened]
}

0 comments on commit cf2f61a

Please sign in to comment.