Skip to content

Commit

Permalink
feat: Add routing information in Cloud Build GRPC clients
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 547283196

Source-Link: googleapis/googleapis@64d54ff

Source-Link: googleapis/googleapis-gen@1de1822
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuQ2xvdWRCdWlsZC5WMS8uT3dsQm90LnlhbWwiLCJoIjoiMWRlMTgyMjExMDliNGEwMjVjMGIyZThjMjUzMjRjYjAxYjZkZjYyNiJ9
  • Loading branch information
gcf-owl-bot[bot] authored and amanda-tarafa committed Jul 12, 2023
1 parent ded5953 commit 89156c3
Show file tree
Hide file tree
Showing 15 changed files with 966 additions and 605 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public async Task CreateBuildTriggerRequestObjectAsync()
{
ProjectId = "",
Trigger = new BuildTrigger(),
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
BuildTrigger response = await cloudBuildClient.CreateBuildTriggerAsync(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void CreateBuildTriggerRequestObject()
{
ProjectId = "",
Trigger = new BuildTrigger(),
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
BuildTrigger response = cloudBuildClient.CreateBuildTrigger(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public async Task DeleteBuildTriggerRequestObjectAsync()
{
ProjectId = "",
TriggerId = "",
BuildTriggerName = BuildTriggerName.FromProjectTrigger("[PROJECT]", "[TRIGGER]"),
BuildTriggerName = BuildTriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]"),
};
// Make the request
await cloudBuildClient.DeleteBuildTriggerAsync(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void DeleteBuildTriggerRequestObject()
{
ProjectId = "",
TriggerId = "",
BuildTriggerName = BuildTriggerName.FromProjectTrigger("[PROJECT]", "[TRIGGER]"),
BuildTriggerName = BuildTriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]"),
};
// Make the request
cloudBuildClient.DeleteBuildTrigger(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public async Task GetBuildTriggerRequestObjectAsync()
{
ProjectId = "",
TriggerId = "",
BuildTriggerName = BuildTriggerName.FromProjectTrigger("[PROJECT]", "[TRIGGER]"),
BuildTriggerName = BuildTriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]"),
};
// Make the request
BuildTrigger response = await cloudBuildClient.GetBuildTriggerAsync(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void GetBuildTriggerRequestObject()
{
ProjectId = "",
TriggerId = "",
BuildTriggerName = BuildTriggerName.FromProjectTrigger("[PROJECT]", "[TRIGGER]"),
BuildTriggerName = BuildTriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]"),
};
// Make the request
BuildTrigger response = cloudBuildClient.GetBuildTrigger(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public async Task ListBuildTriggersRequestObjectAsync()
ListBuildTriggersRequest request = new ListBuildTriggersRequest
{
ProjectId = "",
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedAsyncEnumerable<ListBuildTriggersResponse, BuildTrigger> response = cloudBuildClient.ListBuildTriggersAsync(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void ListBuildTriggersRequestObject()
ListBuildTriggersRequest request = new ListBuildTriggersRequest
{
ProjectId = "",
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedEnumerable<ListBuildTriggersResponse, BuildTrigger> response = cloudBuildClient.ListBuildTriggers(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public async Task RunBuildTriggerRequestObjectAsync()
ProjectId = "",
TriggerId = "",
Source = new RepoSource(),
BuildTriggerName = BuildTriggerName.FromProjectTrigger("[PROJECT]", "[TRIGGER]"),
BuildTriggerName = BuildTriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]"),
};
// Make the request
Operation<Build, BuildOperationMetadata> response = await cloudBuildClient.RunBuildTriggerAsync(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void RunBuildTriggerRequestObject()
ProjectId = "",
TriggerId = "",
Source = new RepoSource(),
BuildTriggerName = BuildTriggerName.FromProjectTrigger("[PROJECT]", "[TRIGGER]"),
BuildTriggerName = BuildTriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]"),
};
// Make the request
Operation<Build, BuildOperationMetadata> response = cloudBuildClient.RunBuildTrigger(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ public void CreateBuildTriggerRequestObject()
{
ProjectId = "",
Trigger = new BuildTrigger(),
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
BuildTrigger response = cloudBuildClient.CreateBuildTrigger(request);
Expand All @@ -771,7 +771,7 @@ public async Task CreateBuildTriggerRequestObjectAsync()
{
ProjectId = "",
Trigger = new BuildTrigger(),
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
BuildTrigger response = await cloudBuildClient.CreateBuildTriggerAsync(request);
Expand Down Expand Up @@ -818,7 +818,7 @@ public void GetBuildTriggerRequestObject()
{
ProjectId = "",
TriggerId = "",
BuildTriggerName = BuildTriggerName.FromProjectTrigger("[PROJECT]", "[TRIGGER]"),
BuildTriggerName = BuildTriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]"),
};
// Make the request
BuildTrigger response = cloudBuildClient.GetBuildTrigger(request);
Expand All @@ -837,7 +837,7 @@ public async Task GetBuildTriggerRequestObjectAsync()
{
ProjectId = "",
TriggerId = "",
BuildTriggerName = BuildTriggerName.FromProjectTrigger("[PROJECT]", "[TRIGGER]"),
BuildTriggerName = BuildTriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]"),
};
// Make the request
BuildTrigger response = await cloudBuildClient.GetBuildTriggerAsync(request);
Expand Down Expand Up @@ -883,7 +883,7 @@ public void ListBuildTriggersRequestObject()
ListBuildTriggersRequest request = new ListBuildTriggersRequest
{
ProjectId = "",
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedEnumerable<ListBuildTriggersResponse, BuildTrigger> response = cloudBuildClient.ListBuildTriggers(request);
Expand Down Expand Up @@ -932,7 +932,7 @@ public async Task ListBuildTriggersRequestObjectAsync()
ListBuildTriggersRequest request = new ListBuildTriggersRequest
{
ProjectId = "",
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedAsyncEnumerable<ListBuildTriggersResponse, BuildTrigger> response = cloudBuildClient.ListBuildTriggersAsync(request);
Expand Down Expand Up @@ -1072,7 +1072,7 @@ public void DeleteBuildTriggerRequestObject()
{
ProjectId = "",
TriggerId = "",
BuildTriggerName = BuildTriggerName.FromProjectTrigger("[PROJECT]", "[TRIGGER]"),
BuildTriggerName = BuildTriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]"),
};
// Make the request
cloudBuildClient.DeleteBuildTrigger(request);
Expand All @@ -1091,7 +1091,7 @@ public async Task DeleteBuildTriggerRequestObjectAsync()
{
ProjectId = "",
TriggerId = "",
BuildTriggerName = BuildTriggerName.FromProjectTrigger("[PROJECT]", "[TRIGGER]"),
BuildTriggerName = BuildTriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]"),
};
// Make the request
await cloudBuildClient.DeleteBuildTriggerAsync(request);
Expand Down Expand Up @@ -1207,7 +1207,7 @@ public void RunBuildTriggerRequestObject()
ProjectId = "",
TriggerId = "",
Source = new RepoSource(),
BuildTriggerName = BuildTriggerName.FromProjectTrigger("[PROJECT]", "[TRIGGER]"),
BuildTriggerName = BuildTriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]"),
};
// Make the request
Operation<Build, BuildOperationMetadata> response = cloudBuildClient.RunBuildTrigger(request);
Expand Down Expand Up @@ -1243,7 +1243,7 @@ public async Task RunBuildTriggerRequestObjectAsync()
ProjectId = "",
TriggerId = "",
Source = new RepoSource(),
BuildTriggerName = BuildTriggerName.FromProjectTrigger("[PROJECT]", "[TRIGGER]"),
BuildTriggerName = BuildTriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]"),
};
// Make the request
Operation<Build, BuildOperationMetadata> response = await cloudBuildClient.RunBuildTriggerAsync(request);
Expand Down
Loading

0 comments on commit 89156c3

Please sign in to comment.