Skip to content

Commit

Permalink
fix: fix breaking changes in Compute API (#701)
Browse files Browse the repository at this point in the history
Source-Link: googleapis/googleapis@272c110

Source-Link: googleapis/googleapis-gen@4c674ff
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuQ29tcHV0ZS5WMS8uT3dsQm90LnlhbWwiLCJoIjoiNGM2NzRmZjZmZGIyYmE1OGVmY2M0ZTc5Y2RkODIyNGI2ZTA0ZGE5NCJ9
  • Loading branch information
gcf-owl-bot[bot] authored and jskeet committed Feb 11, 2022
1 parent ebe518a commit 50ea200
Show file tree
Hide file tree
Showing 19 changed files with 7,326 additions and 6,936 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -853,13 +853,14 @@ public async Task InsertRequestObjectAsync()
/// <summary>Snippet for Insert</summary>
public void Insert()
{
// Snippet: Insert(FirewallPolicy, CallSettings)
// Snippet: Insert(string, FirewallPolicy, CallSettings)
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
string parentId = "";
FirewallPolicy firewallPolicyResource = new FirewallPolicy();
// Make the request
lro::Operation<Operation, Operation> response = firewallPoliciesClient.Insert(firewallPolicyResource);
lro::Operation<Operation, Operation> response = firewallPoliciesClient.Insert(parentId, firewallPolicyResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
Expand All @@ -882,14 +883,15 @@ public void Insert()
/// <summary>Snippet for InsertAsync</summary>
public async Task InsertAsync()
{
// Snippet: InsertAsync(FirewallPolicy, CallSettings)
// Additional: InsertAsync(FirewallPolicy, CancellationToken)
// Snippet: InsertAsync(string, FirewallPolicy, CallSettings)
// Additional: InsertAsync(string, FirewallPolicy, CancellationToken)
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string parentId = "";
FirewallPolicy firewallPolicyResource = new FirewallPolicy();
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.InsertAsync(firewallPolicyResource);
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.InsertAsync(parentId, firewallPolicyResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
Expand Down Expand Up @@ -1219,13 +1221,14 @@ public async Task MoveRequestObjectAsync()
/// <summary>Snippet for Move</summary>
public void Move()
{
// Snippet: Move(string, CallSettings)
// Snippet: Move(string, string, CallSettings)
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
string firewallPolicy = "";
string parentId = "";
// Make the request
lro::Operation<Operation, Operation> response = firewallPoliciesClient.Move(firewallPolicy);
lro::Operation<Operation, Operation> response = firewallPoliciesClient.Move(firewallPolicy, parentId);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
Expand All @@ -1248,14 +1251,15 @@ public void Move()
/// <summary>Snippet for MoveAsync</summary>
public async Task MoveAsync()
{
// Snippet: MoveAsync(string, CallSettings)
// Additional: MoveAsync(string, CancellationToken)
// Snippet: MoveAsync(string, string, CallSettings)
// Additional: MoveAsync(string, string, CancellationToken)
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string firewallPolicy = "";
string parentId = "";
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.MoveAsync(firewallPolicy);
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.MoveAsync(firewallPolicy, parentId);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ public void GetIamPolicyRequestObject()
AuditConfigs = { new AuditConfig(), },
Version = 271578922,
Bindings = { new Binding(), },
IamOwned = false,
};
mockGrpcClient.Setup(x => x.GetIamPolicy(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
DisksClient client = new DisksClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -389,6 +390,7 @@ public void GetIamPolicyRequestObject()
AuditConfigs = { new AuditConfig(), },
Version = 271578922,
Bindings = { new Binding(), },
IamOwned = false,
};
mockGrpcClient.Setup(x => x.GetIamPolicyAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Policy>(stt::Task.FromResult(expectedResponse), null, null, null, null));
DisksClient client = new DisksClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -417,6 +419,7 @@ public void GetIamPolicy()
AuditConfigs = { new AuditConfig(), },
Version = 271578922,
Bindings = { new Binding(), },
IamOwned = false,
};
mockGrpcClient.Setup(x => x.GetIamPolicy(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
DisksClient client = new DisksClientImpl(mockGrpcClient.Object, null);
Expand All @@ -443,6 +446,7 @@ public void GetIamPolicy()
AuditConfigs = { new AuditConfig(), },
Version = 271578922,
Bindings = { new Binding(), },
IamOwned = false,
};
mockGrpcClient.Setup(x => x.GetIamPolicyAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Policy>(stt::Task.FromResult(expectedResponse), null, null, null, null));
DisksClient client = new DisksClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -472,6 +476,7 @@ public void SetIamPolicyRequestObject()
AuditConfigs = { new AuditConfig(), },
Version = 271578922,
Bindings = { new Binding(), },
IamOwned = false,
};
mockGrpcClient.Setup(x => x.SetIamPolicy(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
DisksClient client = new DisksClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -499,6 +504,7 @@ public void SetIamPolicyRequestObject()
AuditConfigs = { new AuditConfig(), },
Version = 271578922,
Bindings = { new Binding(), },
IamOwned = false,
};
mockGrpcClient.Setup(x => x.SetIamPolicyAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Policy>(stt::Task.FromResult(expectedResponse), null, null, null, null));
DisksClient client = new DisksClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -528,6 +534,7 @@ public void SetIamPolicy()
AuditConfigs = { new AuditConfig(), },
Version = 271578922,
Bindings = { new Binding(), },
IamOwned = false,
};
mockGrpcClient.Setup(x => x.SetIamPolicy(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
DisksClient client = new DisksClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -555,6 +562,7 @@ public void SetIamPolicy()
AuditConfigs = { new AuditConfig(), },
Version = 271578922,
Bindings = { new Binding(), },
IamOwned = false,
};
mockGrpcClient.Setup(x => x.SetIamPolicyAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Policy>(stt::Task.FromResult(expectedResponse), null, null, null, null));
DisksClient client = new DisksClientImpl(mockGrpcClient.Object, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ public void GetIamPolicyRequestObject()
AuditConfigs = { new AuditConfig(), },
Version = 271578922,
Bindings = { new Binding(), },
IamOwned = false,
};
mockGrpcClient.Setup(x => x.GetIamPolicy(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
FirewallPoliciesClient client = new FirewallPoliciesClientImpl(mockGrpcClient.Object, null);
Expand All @@ -331,6 +332,7 @@ public void GetIamPolicyRequestObject()
AuditConfigs = { new AuditConfig(), },
Version = 271578922,
Bindings = { new Binding(), },
IamOwned = false,
};
mockGrpcClient.Setup(x => x.GetIamPolicyAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Policy>(stt::Task.FromResult(expectedResponse), null, null, null, null));
FirewallPoliciesClient client = new FirewallPoliciesClientImpl(mockGrpcClient.Object, null);
Expand All @@ -357,6 +359,7 @@ public void GetIamPolicy()
AuditConfigs = { new AuditConfig(), },
Version = 271578922,
Bindings = { new Binding(), },
IamOwned = false,
};
mockGrpcClient.Setup(x => x.GetIamPolicy(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
FirewallPoliciesClient client = new FirewallPoliciesClientImpl(mockGrpcClient.Object, null);
Expand All @@ -381,6 +384,7 @@ public void GetIamPolicy()
AuditConfigs = { new AuditConfig(), },
Version = 271578922,
Bindings = { new Binding(), },
IamOwned = false,
};
mockGrpcClient.Setup(x => x.GetIamPolicyAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Policy>(stt::Task.FromResult(expectedResponse), null, null, null, null));
FirewallPoliciesClient client = new FirewallPoliciesClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -652,6 +656,7 @@ public void SetIamPolicyRequestObject()
AuditConfigs = { new AuditConfig(), },
Version = 271578922,
Bindings = { new Binding(), },
IamOwned = false,
};
mockGrpcClient.Setup(x => x.SetIamPolicy(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
FirewallPoliciesClient client = new FirewallPoliciesClientImpl(mockGrpcClient.Object, null);
Expand All @@ -677,6 +682,7 @@ public void SetIamPolicyRequestObject()
AuditConfigs = { new AuditConfig(), },
Version = 271578922,
Bindings = { new Binding(), },
IamOwned = false,
};
mockGrpcClient.Setup(x => x.SetIamPolicyAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Policy>(stt::Task.FromResult(expectedResponse), null, null, null, null));
FirewallPoliciesClient client = new FirewallPoliciesClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -704,6 +710,7 @@ public void SetIamPolicy()
AuditConfigs = { new AuditConfig(), },
Version = 271578922,
Bindings = { new Binding(), },
IamOwned = false,
};
mockGrpcClient.Setup(x => x.SetIamPolicy(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
FirewallPoliciesClient client = new FirewallPoliciesClientImpl(mockGrpcClient.Object, null);
Expand All @@ -729,6 +736,7 @@ public void SetIamPolicy()
AuditConfigs = { new AuditConfig(), },
Version = 271578922,
Bindings = { new Binding(), },
IamOwned = false,
};
mockGrpcClient.Setup(x => x.SetIamPolicyAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Policy>(stt::Task.FromResult(expectedResponse), null, null, null, null));
FirewallPoliciesClient client = new FirewallPoliciesClientImpl(mockGrpcClient.Object, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,7 @@ public void GetIamPolicyRequestObject()
AuditConfigs = { new AuditConfig(), },
Version = 271578922,
Bindings = { new Binding(), },
IamOwned = false,
};
mockGrpcClient.Setup(x => x.GetIamPolicy(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
ImagesClient client = new ImagesClientImpl(mockGrpcClient.Object, null);
Expand All @@ -631,6 +632,7 @@ public void GetIamPolicyRequestObject()
AuditConfigs = { new AuditConfig(), },
Version = 271578922,
Bindings = { new Binding(), },
IamOwned = false,
};
mockGrpcClient.Setup(x => x.GetIamPolicyAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Policy>(stt::Task.FromResult(expectedResponse), null, null, null, null));
ImagesClient client = new ImagesClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -658,6 +660,7 @@ public void GetIamPolicy()
AuditConfigs = { new AuditConfig(), },
Version = 271578922,
Bindings = { new Binding(), },
IamOwned = false,
};
mockGrpcClient.Setup(x => x.GetIamPolicy(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
ImagesClient client = new ImagesClientImpl(mockGrpcClient.Object, null);
Expand All @@ -683,6 +686,7 @@ public void GetIamPolicy()
AuditConfigs = { new AuditConfig(), },
Version = 271578922,
Bindings = { new Binding(), },
IamOwned = false,
};
mockGrpcClient.Setup(x => x.GetIamPolicyAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Policy>(stt::Task.FromResult(expectedResponse), null, null, null, null));
ImagesClient client = new ImagesClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -711,6 +715,7 @@ public void SetIamPolicyRequestObject()
AuditConfigs = { new AuditConfig(), },
Version = 271578922,
Bindings = { new Binding(), },
IamOwned = false,
};
mockGrpcClient.Setup(x => x.SetIamPolicy(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
ImagesClient client = new ImagesClientImpl(mockGrpcClient.Object, null);
Expand All @@ -737,6 +742,7 @@ public void SetIamPolicyRequestObject()
AuditConfigs = { new AuditConfig(), },
Version = 271578922,
Bindings = { new Binding(), },
IamOwned = false,
};
mockGrpcClient.Setup(x => x.SetIamPolicyAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Policy>(stt::Task.FromResult(expectedResponse), null, null, null, null));
ImagesClient client = new ImagesClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -765,6 +771,7 @@ public void SetIamPolicy()
AuditConfigs = { new AuditConfig(), },
Version = 271578922,
Bindings = { new Binding(), },
IamOwned = false,
};
mockGrpcClient.Setup(x => x.SetIamPolicy(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
ImagesClient client = new ImagesClientImpl(mockGrpcClient.Object, null);
Expand All @@ -791,6 +798,7 @@ public void SetIamPolicy()
AuditConfigs = { new AuditConfig(), },
Version = 271578922,
Bindings = { new Binding(), },
IamOwned = false,
};
mockGrpcClient.Setup(x => x.SetIamPolicyAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Policy>(stt::Task.FromResult(expectedResponse), null, null, null, null));
ImagesClient client = new ImagesClientImpl(mockGrpcClient.Object, null);
Expand Down
Loading

0 comments on commit 50ea200

Please sign in to comment.