Skip to content

Commit

Permalink
fix!: Updates pre-release Cloud Run v2 Preview client libraries to wo…
Browse files Browse the repository at this point in the history
…rk with the latest API revision

PiperOrigin-RevId: 447174265

Source-Link: googleapis/googleapis@185ba8a

Source-Link: googleapis/googleapis-gen@e3fa46f
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuUnVuLlYyLy5Pd2xCb3QueWFtbCIsImgiOiJlM2ZhNDZmZTQ3ODEwNjk4ZWY5NjkzZWRlYWY1YzM3NGRkNDdlOGQ3In0=
  • Loading branch information
gcf-owl-bot[bot] authored and jskeet committed May 9, 2022
1 parent ac72264 commit f438701
Show file tree
Hide file tree
Showing 14 changed files with 353 additions and 683 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ namespace Google.Cloud.Run.V2.Snippets
// [START run_v2_generated_Services_UpdateService_async_flattened]
using Google.Cloud.Run.V2;
using Google.LongRunning;
using Google.Protobuf.WellKnownTypes;
using System.Threading.Tasks;

public sealed partial class GeneratedServicesClientSnippets
Expand All @@ -35,9 +34,8 @@ public async Task UpdateServiceAsync()
ServicesClient servicesClient = await ServicesClient.CreateAsync();
// Initialize request argument(s)
Service service = new Service();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Service, Service> response = await servicesClient.UpdateServiceAsync(service, updateMask);
Operation<Service, Service> response = await servicesClient.UpdateServiceAsync(service);

// Poll until the returned long-running operation is complete
Operation<Service, Service> completedResponse = await response.PollUntilCompletedAsync();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ namespace Google.Cloud.Run.V2.Snippets
// [START run_v2_generated_Services_UpdateService_async]
using Google.Cloud.Run.V2;
using Google.LongRunning;
using Google.Protobuf.WellKnownTypes;
using System.Threading.Tasks;

public sealed partial class GeneratedServicesClientSnippets
Expand All @@ -37,7 +36,6 @@ public async Task UpdateServiceRequestObjectAsync()
UpdateServiceRequest request = new UpdateServiceRequest
{
Service = new Service(),
UpdateMask = new FieldMask(),
ValidateOnly = false,
AllowMissing = false,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ namespace Google.Cloud.Run.V2.Snippets
// [START run_v2_generated_Services_UpdateService_sync]
using Google.Cloud.Run.V2;
using Google.LongRunning;
using Google.Protobuf.WellKnownTypes;

public sealed partial class GeneratedServicesClientSnippets
{
Expand All @@ -36,7 +35,6 @@ public void UpdateServiceRequestObject()
UpdateServiceRequest request = new UpdateServiceRequest
{
Service = new Service(),
UpdateMask = new FieldMask(),
ValidateOnly = false,
AllowMissing = false,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ namespace Google.Cloud.Run.V2.Snippets
// [START run_v2_generated_Services_UpdateService_sync_flattened]
using Google.Cloud.Run.V2;
using Google.LongRunning;
using Google.Protobuf.WellKnownTypes;

public sealed partial class GeneratedServicesClientSnippets
{
Expand All @@ -34,9 +33,8 @@ public void UpdateService()
ServicesClient servicesClient = ServicesClient.Create();
// Initialize request argument(s)
Service service = new Service();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Service, Service> response = servicesClient.UpdateService(service, updateMask);
Operation<Service, Service> response = servicesClient.UpdateService(service);

// Poll until the returned long-running operation is complete
Operation<Service, Service> completedResponse = response.PollUntilCompleted();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,6 @@ public void UpdateServiceRequestObject()
UpdateServiceRequest request = new UpdateServiceRequest
{
Service = new Service(),
UpdateMask = new FieldMask(),
ValidateOnly = false,
AllowMissing = false,
};
Expand Down Expand Up @@ -636,7 +635,6 @@ public async Task UpdateServiceRequestObjectAsync()
UpdateServiceRequest request = new UpdateServiceRequest
{
Service = new Service(),
UpdateMask = new FieldMask(),
ValidateOnly = false,
AllowMissing = false,
};
Expand Down Expand Up @@ -664,14 +662,13 @@ public async Task UpdateServiceRequestObjectAsync()
/// <summary>Snippet for UpdateService</summary>
public void UpdateService()
{
// Snippet: UpdateService(Service, FieldMask, CallSettings)
// Snippet: UpdateService(Service, CallSettings)
// Create client
ServicesClient servicesClient = ServicesClient.Create();
// Initialize request argument(s)
Service service = new Service();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Service, Service> response = servicesClient.UpdateService(service, updateMask);
Operation<Service, Service> response = servicesClient.UpdateService(service);

// Poll until the returned long-running operation is complete
Operation<Service, Service> completedResponse = response.PollUntilCompleted();
Expand All @@ -694,15 +691,14 @@ public void UpdateService()
/// <summary>Snippet for UpdateServiceAsync</summary>
public async Task UpdateServiceAsync()
{
// Snippet: UpdateServiceAsync(Service, FieldMask, CallSettings)
// Additional: UpdateServiceAsync(Service, FieldMask, CancellationToken)
// Snippet: UpdateServiceAsync(Service, CallSettings)
// Additional: UpdateServiceAsync(Service, CancellationToken)
// Create client
ServicesClient servicesClient = await ServicesClient.CreateAsync();
// Initialize request argument(s)
Service service = new Service();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Service, Service> response = await servicesClient.UpdateServiceAsync(service, updateMask);
Operation<Service, Service> response = await servicesClient.UpdateServiceAsync(service);

// Poll until the returned long-running operation is complete
Operation<Service, Service> completedResponse = await response.PollUntilCompletedAsync();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,17 @@ public void GetRevisionRequestObject()
ServiceAsServiceName = ServiceName.FromProjectLocationService("[PROJECT]", "[LOCATION]", "[SERVICE]"),
Scaling = new RevisionScaling(),
VpcAccess = new VpcAccess(),
ContainerConcurrency = -1256870318,
Timeout = new wkt::Duration(),
ServiceAccount = "service_accounta3c1b923",
Containers = { new Container(), },
Volumes = { new Volume(), },
Confidential = true,
ExecutionEnvironment = ExecutionEnvironment.Unspecified,
EncryptionKeyAsCryptoKeyName = CryptoKeyName.FromProjectLocationKeyRingCryptoKey("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]"),
Reconciling = false,
Conditions = { new Condition(), },
ObservedGeneration = -4521268473882310455L,
LogUri = "log_urid89ae442",
MaxInstanceRequestConcurrency = 584931825,
Etag = "etage8ad7218",
};
mockGrpcClient.Setup(x => x.GetRevision(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
Expand Down Expand Up @@ -122,18 +121,17 @@ public void GetRevisionRequestObject()
ServiceAsServiceName = ServiceName.FromProjectLocationService("[PROJECT]", "[LOCATION]", "[SERVICE]"),
Scaling = new RevisionScaling(),
VpcAccess = new VpcAccess(),
ContainerConcurrency = -1256870318,
Timeout = new wkt::Duration(),
ServiceAccount = "service_accounta3c1b923",
Containers = { new Container(), },
Volumes = { new Volume(), },
Confidential = true,
ExecutionEnvironment = ExecutionEnvironment.Unspecified,
EncryptionKeyAsCryptoKeyName = CryptoKeyName.FromProjectLocationKeyRingCryptoKey("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]"),
Reconciling = false,
Conditions = { new Condition(), },
ObservedGeneration = -4521268473882310455L,
LogUri = "log_urid89ae442",
MaxInstanceRequestConcurrency = 584931825,
Etag = "etage8ad7218",
};
mockGrpcClient.Setup(x => x.GetRevisionAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Revision>(stt::Task.FromResult(expectedResponse), null, null, null, null));
Expand Down Expand Up @@ -181,18 +179,17 @@ public void GetRevision()
ServiceAsServiceName = ServiceName.FromProjectLocationService("[PROJECT]", "[LOCATION]", "[SERVICE]"),
Scaling = new RevisionScaling(),
VpcAccess = new VpcAccess(),
ContainerConcurrency = -1256870318,
Timeout = new wkt::Duration(),
ServiceAccount = "service_accounta3c1b923",
Containers = { new Container(), },
Volumes = { new Volume(), },
Confidential = true,
ExecutionEnvironment = ExecutionEnvironment.Unspecified,
EncryptionKeyAsCryptoKeyName = CryptoKeyName.FromProjectLocationKeyRingCryptoKey("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]"),
Reconciling = false,
Conditions = { new Condition(), },
ObservedGeneration = -4521268473882310455L,
LogUri = "log_urid89ae442",
MaxInstanceRequestConcurrency = 584931825,
Etag = "etage8ad7218",
};
mockGrpcClient.Setup(x => x.GetRevision(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
Expand Down Expand Up @@ -238,18 +235,17 @@ public void GetRevision()
ServiceAsServiceName = ServiceName.FromProjectLocationService("[PROJECT]", "[LOCATION]", "[SERVICE]"),
Scaling = new RevisionScaling(),
VpcAccess = new VpcAccess(),
ContainerConcurrency = -1256870318,
Timeout = new wkt::Duration(),
ServiceAccount = "service_accounta3c1b923",
Containers = { new Container(), },
Volumes = { new Volume(), },
Confidential = true,
ExecutionEnvironment = ExecutionEnvironment.Unspecified,
EncryptionKeyAsCryptoKeyName = CryptoKeyName.FromProjectLocationKeyRingCryptoKey("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]"),
Reconciling = false,
Conditions = { new Condition(), },
ObservedGeneration = -4521268473882310455L,
LogUri = "log_urid89ae442",
MaxInstanceRequestConcurrency = 584931825,
Etag = "etage8ad7218",
};
mockGrpcClient.Setup(x => x.GetRevisionAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Revision>(stt::Task.FromResult(expectedResponse), null, null, null, null));
Expand Down Expand Up @@ -297,18 +293,17 @@ public void GetRevisionResourceNames()
ServiceAsServiceName = ServiceName.FromProjectLocationService("[PROJECT]", "[LOCATION]", "[SERVICE]"),
Scaling = new RevisionScaling(),
VpcAccess = new VpcAccess(),
ContainerConcurrency = -1256870318,
Timeout = new wkt::Duration(),
ServiceAccount = "service_accounta3c1b923",
Containers = { new Container(), },
Volumes = { new Volume(), },
Confidential = true,
ExecutionEnvironment = ExecutionEnvironment.Unspecified,
EncryptionKeyAsCryptoKeyName = CryptoKeyName.FromProjectLocationKeyRingCryptoKey("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]"),
Reconciling = false,
Conditions = { new Condition(), },
ObservedGeneration = -4521268473882310455L,
LogUri = "log_urid89ae442",
MaxInstanceRequestConcurrency = 584931825,
Etag = "etage8ad7218",
};
mockGrpcClient.Setup(x => x.GetRevision(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
Expand Down Expand Up @@ -354,18 +349,17 @@ public void GetRevisionResourceNames()
ServiceAsServiceName = ServiceName.FromProjectLocationService("[PROJECT]", "[LOCATION]", "[SERVICE]"),
Scaling = new RevisionScaling(),
VpcAccess = new VpcAccess(),
ContainerConcurrency = -1256870318,
Timeout = new wkt::Duration(),
ServiceAccount = "service_accounta3c1b923",
Containers = { new Container(), },
Volumes = { new Volume(), },
Confidential = true,
ExecutionEnvironment = ExecutionEnvironment.Unspecified,
EncryptionKeyAsCryptoKeyName = CryptoKeyName.FromProjectLocationKeyRingCryptoKey("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]"),
Reconciling = false,
Conditions = { new Condition(), },
ObservedGeneration = -4521268473882310455L,
LogUri = "log_urid89ae442",
MaxInstanceRequestConcurrency = 584931825,
Etag = "etage8ad7218",
};
mockGrpcClient.Setup(x => x.GetRevisionAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Revision>(stt::Task.FromResult(expectedResponse), null, null, null, null));
Expand Down
Loading

0 comments on commit f438701

Please sign in to comment.