Skip to content

Commit

Permalink
feat: add RPCs for getting and listing project, table, and column dat…
Browse files Browse the repository at this point in the history
…a profiles

docs: Update urls to reflect branding change to Sensitive Data Protection

PiperOrigin-RevId: 612872273

Source-Link: googleapis/googleapis@cd32d53

Source-Link: googleapis/googleapis-gen@bb84555
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuRGxwLlYyLy5Pd2xCb3QueWFtbCIsImgiOiJiYjg0NTU1ZWY3NTVhYjAzNzNiNDlkNDE2Mzg3ODA0ZWIxN2E1MTE4In0=
  • Loading branch information
gcf-owl-bot[bot] authored and amanda-tarafa committed Mar 5, 2024
1 parent 897e711 commit 5dd8bca
Show file tree
Hide file tree
Showing 50 changed files with 17,254 additions and 3,812 deletions.
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 dlp_v2_generated_DlpService_GetColumnDataProfile_async_flattened]
using Google.Cloud.Dlp.V2;
using System.Threading.Tasks;

public sealed partial class GeneratedDlpServiceClientSnippets
{
/// <summary>Snippet for GetColumnDataProfileAsync</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 GetColumnDataProfileAsync()
{
// Create client
DlpServiceClient dlpServiceClient = await DlpServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/columnDataProfiles/[COLUMN_DATA_PROFILE]";
// Make the request
ColumnDataProfile response = await dlpServiceClient.GetColumnDataProfileAsync(name);
}
}
// [END dlp_v2_generated_DlpService_GetColumnDataProfile_async_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 dlp_v2_generated_DlpService_GetColumnDataProfile_async]
using Google.Cloud.Dlp.V2;
using System.Threading.Tasks;

public sealed partial class GeneratedDlpServiceClientSnippets
{
/// <summary>Snippet for GetColumnDataProfileAsync</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 GetColumnDataProfileRequestObjectAsync()
{
// Create client
DlpServiceClient dlpServiceClient = await DlpServiceClient.CreateAsync();
// Initialize request argument(s)
GetColumnDataProfileRequest request = new GetColumnDataProfileRequest
{
ColumnDataProfileName = ColumnDataProfileName.FromOrganizationLocationColumnDataProfile("[ORGANIZATION]", "[LOCATION]", "[COLUMN_DATA_PROFILE]"),
};
// Make the request
ColumnDataProfile response = await dlpServiceClient.GetColumnDataProfileAsync(request);
}
}
// [END dlp_v2_generated_DlpService_GetColumnDataProfile_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 dlp_v2_generated_DlpService_GetColumnDataProfile_sync]
using Google.Cloud.Dlp.V2;

public sealed partial class GeneratedDlpServiceClientSnippets
{
/// <summary>Snippet for GetColumnDataProfile</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 GetColumnDataProfileRequestObject()
{
// Create client
DlpServiceClient dlpServiceClient = DlpServiceClient.Create();
// Initialize request argument(s)
GetColumnDataProfileRequest request = new GetColumnDataProfileRequest
{
ColumnDataProfileName = ColumnDataProfileName.FromOrganizationLocationColumnDataProfile("[ORGANIZATION]", "[LOCATION]", "[COLUMN_DATA_PROFILE]"),
};
// Make the request
ColumnDataProfile response = dlpServiceClient.GetColumnDataProfile(request);
}
}
// [END dlp_v2_generated_DlpService_GetColumnDataProfile_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 dlp_v2_generated_DlpService_GetColumnDataProfile_async_flattened_resourceNames]
using Google.Cloud.Dlp.V2;
using System.Threading.Tasks;

public sealed partial class GeneratedDlpServiceClientSnippets
{
/// <summary>Snippet for GetColumnDataProfileAsync</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 GetColumnDataProfileResourceNamesAsync()
{
// Create client
DlpServiceClient dlpServiceClient = await DlpServiceClient.CreateAsync();
// Initialize request argument(s)
ColumnDataProfileName name = ColumnDataProfileName.FromOrganizationLocationColumnDataProfile("[ORGANIZATION]", "[LOCATION]", "[COLUMN_DATA_PROFILE]");
// Make the request
ColumnDataProfile response = await dlpServiceClient.GetColumnDataProfileAsync(name);
}
}
// [END dlp_v2_generated_DlpService_GetColumnDataProfile_async_flattened_resourceNames]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// 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 dlp_v2_generated_DlpService_GetColumnDataProfile_sync_flattened_resourceNames]
using Google.Cloud.Dlp.V2;

public sealed partial class GeneratedDlpServiceClientSnippets
{
/// <summary>Snippet for GetColumnDataProfile</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 GetColumnDataProfileResourceNames()
{
// Create client
DlpServiceClient dlpServiceClient = DlpServiceClient.Create();
// Initialize request argument(s)
ColumnDataProfileName name = ColumnDataProfileName.FromOrganizationLocationColumnDataProfile("[ORGANIZATION]", "[LOCATION]", "[COLUMN_DATA_PROFILE]");
// Make the request
ColumnDataProfile response = dlpServiceClient.GetColumnDataProfile(name);
}
}
// [END dlp_v2_generated_DlpService_GetColumnDataProfile_sync_flattened_resourceNames]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// 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 dlp_v2_generated_DlpService_GetColumnDataProfile_sync_flattened]
using Google.Cloud.Dlp.V2;

public sealed partial class GeneratedDlpServiceClientSnippets
{
/// <summary>Snippet for GetColumnDataProfile</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 GetColumnDataProfile()
{
// Create client
DlpServiceClient dlpServiceClient = DlpServiceClient.Create();
// Initialize request argument(s)
string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/columnDataProfiles/[COLUMN_DATA_PROFILE]";
// Make the request
ColumnDataProfile response = dlpServiceClient.GetColumnDataProfile(name);
}
}
// [END dlp_v2_generated_DlpService_GetColumnDataProfile_sync_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 dlp_v2_generated_DlpService_GetProjectDataProfile_async_flattened]
using Google.Cloud.Dlp.V2;
using System.Threading.Tasks;

public sealed partial class GeneratedDlpServiceClientSnippets
{
/// <summary>Snippet for GetProjectDataProfileAsync</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 GetProjectDataProfileAsync()
{
// Create client
DlpServiceClient dlpServiceClient = await DlpServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/projectDataProfiles/[PROJECT_DATA_PROFILE]";
// Make the request
ProjectDataProfile response = await dlpServiceClient.GetProjectDataProfileAsync(name);
}
}
// [END dlp_v2_generated_DlpService_GetProjectDataProfile_async_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 dlp_v2_generated_DlpService_GetProjectDataProfile_async]
using Google.Cloud.Dlp.V2;
using System.Threading.Tasks;

public sealed partial class GeneratedDlpServiceClientSnippets
{
/// <summary>Snippet for GetProjectDataProfileAsync</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 GetProjectDataProfileRequestObjectAsync()
{
// Create client
DlpServiceClient dlpServiceClient = await DlpServiceClient.CreateAsync();
// Initialize request argument(s)
GetProjectDataProfileRequest request = new GetProjectDataProfileRequest
{
ProjectDataProfileName = ProjectDataProfileName.FromOrganizationLocationProjectDataProfile("[ORGANIZATION]", "[LOCATION]", "[PROJECT_DATA_PROFILE]"),
};
// Make the request
ProjectDataProfile response = await dlpServiceClient.GetProjectDataProfileAsync(request);
}
}
// [END dlp_v2_generated_DlpService_GetProjectDataProfile_async]
}
Loading

0 comments on commit 5dd8bca

Please sign in to comment.