Skip to content

Commit

Permalink
feat: support cross-bucket replication
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 707205525

Source-Link: googleapis/googleapis@67495ab

Source-Link: googleapis/googleapis-gen@9c2deac
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuU3RvcmFnZVRyYW5zZmVyLlYxLy5Pd2xCb3QueWFtbCIsImgiOiI5YzJkZWFjOTQwY2VkMjhkNjhjODI5NmQ0YWViMTMxMzlkOGFjOTE0In0=
  • Loading branch information
gcf-owl-bot[bot] committed Dec 18, 2024
1 parent f36434a commit 8986a75
Show file tree
Hide file tree
Showing 51 changed files with 24,449 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net462</TargetFrameworks>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="../Google.Cloud.StorageTransfer.V1/Google.Cloud.StorageTransfer.V1.csproj" />
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="All" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// Copyright 2024 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 GoogleCSharpSnippets
{
// [START storagetransfer_v1_generated_StorageTransferService_CreateAgentPool_async_flattened]
using Google.Cloud.StorageTransfer.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedStorageTransferServiceClientSnippets
{
/// <summary>Snippet for CreateAgentPoolAsync</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 CreateAgentPoolAsync()
{
// Create client
StorageTransferServiceClient storageTransferServiceClient = await StorageTransferServiceClient.CreateAsync();
// Initialize request argument(s)
string projectId = "";
AgentPool agentPool = new AgentPool();
string agentPoolId = "";
// Make the request
AgentPool response = await storageTransferServiceClient.CreateAgentPoolAsync(projectId, agentPool, agentPoolId);
}
}
// [END storagetransfer_v1_generated_StorageTransferService_CreateAgentPool_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// Copyright 2024 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 GoogleCSharpSnippets
{
// [START storagetransfer_v1_generated_StorageTransferService_CreateAgentPool_async]
using Google.Cloud.StorageTransfer.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedStorageTransferServiceClientSnippets
{
/// <summary>Snippet for CreateAgentPoolAsync</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 CreateAgentPoolRequestObjectAsync()
{
// Create client
StorageTransferServiceClient storageTransferServiceClient = await StorageTransferServiceClient.CreateAsync();
// Initialize request argument(s)
CreateAgentPoolRequest request = new CreateAgentPoolRequest
{
ProjectId = "",
AgentPool = new AgentPool(),
AgentPoolId = "",
};
// Make the request
AgentPool response = await storageTransferServiceClient.CreateAgentPoolAsync(request);
}
}
// [END storagetransfer_v1_generated_StorageTransferService_CreateAgentPool_async]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// Copyright 2024 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 GoogleCSharpSnippets
{
// [START storagetransfer_v1_generated_StorageTransferService_CreateAgentPool_sync]
using Google.Cloud.StorageTransfer.V1;

public sealed partial class GeneratedStorageTransferServiceClientSnippets
{
/// <summary>Snippet for CreateAgentPool</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 CreateAgentPoolRequestObject()
{
// Create client
StorageTransferServiceClient storageTransferServiceClient = StorageTransferServiceClient.Create();
// Initialize request argument(s)
CreateAgentPoolRequest request = new CreateAgentPoolRequest
{
ProjectId = "",
AgentPool = new AgentPool(),
AgentPoolId = "",
};
// Make the request
AgentPool response = storageTransferServiceClient.CreateAgentPool(request);
}
}
// [END storagetransfer_v1_generated_StorageTransferService_CreateAgentPool_sync]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// Copyright 2024 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 GoogleCSharpSnippets
{
// [START storagetransfer_v1_generated_StorageTransferService_CreateAgentPool_sync_flattened]
using Google.Cloud.StorageTransfer.V1;

public sealed partial class GeneratedStorageTransferServiceClientSnippets
{
/// <summary>Snippet for CreateAgentPool</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 CreateAgentPool()
{
// Create client
StorageTransferServiceClient storageTransferServiceClient = StorageTransferServiceClient.Create();
// Initialize request argument(s)
string projectId = "";
AgentPool agentPool = new AgentPool();
string agentPoolId = "";
// Make the request
AgentPool response = storageTransferServiceClient.CreateAgentPool(projectId, agentPool, agentPoolId);
}
}
// [END storagetransfer_v1_generated_StorageTransferService_CreateAgentPool_sync_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// Copyright 2024 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 GoogleCSharpSnippets
{
// [START storagetransfer_v1_generated_StorageTransferService_CreateTransferJob_async]
using Google.Cloud.StorageTransfer.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedStorageTransferServiceClientSnippets
{
/// <summary>Snippet for CreateTransferJobAsync</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 CreateTransferJobRequestObjectAsync()
{
// Create client
StorageTransferServiceClient storageTransferServiceClient = await StorageTransferServiceClient.CreateAsync();
// Initialize request argument(s)
CreateTransferJobRequest request = new CreateTransferJobRequest
{
TransferJob = new TransferJob(),
};
// Make the request
TransferJob response = await storageTransferServiceClient.CreateTransferJobAsync(request);
}
}
// [END storagetransfer_v1_generated_StorageTransferService_CreateTransferJob_async]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// Copyright 2024 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 GoogleCSharpSnippets
{
// [START storagetransfer_v1_generated_StorageTransferService_CreateTransferJob_sync]
using Google.Cloud.StorageTransfer.V1;

public sealed partial class GeneratedStorageTransferServiceClientSnippets
{
/// <summary>Snippet for CreateTransferJob</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 CreateTransferJobRequestObject()
{
// Create client
StorageTransferServiceClient storageTransferServiceClient = StorageTransferServiceClient.Create();
// Initialize request argument(s)
CreateTransferJobRequest request = new CreateTransferJobRequest
{
TransferJob = new TransferJob(),
};
// Make the request
TransferJob response = storageTransferServiceClient.CreateTransferJob(request);
}
}
// [END storagetransfer_v1_generated_StorageTransferService_CreateTransferJob_sync]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Copyright 2024 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 GoogleCSharpSnippets
{
// [START storagetransfer_v1_generated_StorageTransferService_DeleteAgentPool_async_flattened]
using Google.Cloud.StorageTransfer.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedStorageTransferServiceClientSnippets
{
/// <summary>Snippet for DeleteAgentPoolAsync</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 DeleteAgentPoolAsync()
{
// Create client
StorageTransferServiceClient storageTransferServiceClient = await StorageTransferServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
await storageTransferServiceClient.DeleteAgentPoolAsync(name);
}
}
// [END storagetransfer_v1_generated_StorageTransferService_DeleteAgentPool_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Copyright 2024 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 GoogleCSharpSnippets
{
// [START storagetransfer_v1_generated_StorageTransferService_DeleteAgentPool_async]
using Google.Cloud.StorageTransfer.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedStorageTransferServiceClientSnippets
{
/// <summary>Snippet for DeleteAgentPoolAsync</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 DeleteAgentPoolRequestObjectAsync()
{
// Create client
StorageTransferServiceClient storageTransferServiceClient = await StorageTransferServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteAgentPoolRequest request = new DeleteAgentPoolRequest { Name = "", };
// Make the request
await storageTransferServiceClient.DeleteAgentPoolAsync(request);
}
}
// [END storagetransfer_v1_generated_StorageTransferService_DeleteAgentPool_async]
}
Loading

0 comments on commit 8986a75

Please sign in to comment.