Skip to content

Commit

Permalink
feat: added client side library for the followings:
Browse files Browse the repository at this point in the history
1. Content APIs.
2. Create|Update|Delete Metadata APIs (e.g. Entity and/or Partition).

PiperOrigin-RevId: 429081053

Source-Link: googleapis/googleapis@7b42fd0

Source-Link: googleapis/googleapis-gen@3f71d2d
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuRGF0YXBsZXguVjEvLk93bEJvdC55YW1sIiwiaCI6IjNmNzFkMmRmNWMxMDJlZTFmZTgyZjQ5MmRlNTQ1Y2QzYTNkYzdmNzkifQ==
  • Loading branch information
gcf-owl-bot[bot] authored and jskeet committed Feb 17, 2022
1 parent 3839893 commit 1ea3fe0
Show file tree
Hide file tree
Showing 111 changed files with 27,615 additions and 2,482 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Copyright 2022 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 Google.Cloud.Dataplex.V1.Snippets
{
// [START dataplex_v1_generated_ContentService_CreateContent_async_flattened]
using System.Threading.Tasks;
using gcdv = Google.Cloud.Dataplex.V1;

public sealed partial class GeneratedContentServiceClientSnippets
{
/// <summary>Snippet for CreateContentAsync</summary>
/// <remarks>
/// This snippet has been automatically generated for illustrative purposes only.
/// It may require modifications to work in your environment.
/// </remarks>
public async Task CreateContentAsync()
{
// Create client
ContentServiceClient contentServiceClient = await ContentServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/lakes/[LAKE]";
Content content = new Content();
// Make the request
Content response = await contentServiceClient.CreateContentAsync(parent, content);
}
}
// [END dataplex_v1_generated_ContentService_CreateContent_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// Copyright 2022 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 Google.Cloud.Dataplex.V1.Snippets
{
// [START dataplex_v1_generated_ContentService_CreateContent_async]
using System.Threading.Tasks;
using gcdv = Google.Cloud.Dataplex.V1;

public sealed partial class GeneratedContentServiceClientSnippets
{
/// <summary>Snippet for CreateContentAsync</summary>
/// <remarks>
/// This snippet has been automatically generated for illustrative purposes only.
/// It may require modifications to work in your environment.
/// </remarks>
public async Task CreateContentRequestObjectAsync()
{
// Create client
ContentServiceClient contentServiceClient = await ContentServiceClient.CreateAsync();
// Initialize request argument(s)
CreateContentRequest request = new CreateContentRequest
{
ParentAsLakeName = LakeName.FromProjectLocationLake("[PROJECT]", "[LOCATION]", "[LAKE]"),
Content = new Content(),
ValidateOnly = false,
};
// Make the request
Content response = await contentServiceClient.CreateContentAsync(request);
}
}
// [END dataplex_v1_generated_ContentService_CreateContent_async]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// Copyright 2022 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 Google.Cloud.Dataplex.V1.Snippets
{
// [START dataplex_v1_generated_ContentService_CreateContent_sync]
using Google.Cloud.Dataplex.V1;

public sealed partial class GeneratedContentServiceClientSnippets
{
/// <summary>Snippet for CreateContent</summary>
/// <remarks>
/// This snippet has been automatically generated for illustrative purposes only.
/// It may require modifications to work in your environment.
/// </remarks>
public void CreateContentRequestObject()
{
// Create client
ContentServiceClient contentServiceClient = ContentServiceClient.Create();
// Initialize request argument(s)
CreateContentRequest request = new CreateContentRequest
{
ParentAsLakeName = LakeName.FromProjectLocationLake("[PROJECT]", "[LOCATION]", "[LAKE]"),
Content = new Content(),
ValidateOnly = false,
};
// Make the request
Content response = contentServiceClient.CreateContent(request);
}
}
// [END dataplex_v1_generated_ContentService_CreateContent_sync]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Copyright 2022 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 Google.Cloud.Dataplex.V1.Snippets
{
// [START dataplex_v1_generated_ContentService_CreateContent_async_flattened_resourceNames]
using System.Threading.Tasks;
using gcdv = Google.Cloud.Dataplex.V1;

public sealed partial class GeneratedContentServiceClientSnippets
{
/// <summary>Snippet for CreateContentAsync</summary>
/// <remarks>
/// This snippet has been automatically generated for illustrative purposes only.
/// It may require modifications to work in your environment.
/// </remarks>
public async Task CreateContentResourceNamesAsync()
{
// Create client
ContentServiceClient contentServiceClient = await ContentServiceClient.CreateAsync();
// Initialize request argument(s)
LakeName parent = LakeName.FromProjectLocationLake("[PROJECT]", "[LOCATION]", "[LAKE]");
Content content = new Content();
// Make the request
Content response = await contentServiceClient.CreateContentAsync(parent, content);
}
}
// [END dataplex_v1_generated_ContentService_CreateContent_async_flattened_resourceNames]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Copyright 2022 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 Google.Cloud.Dataplex.V1.Snippets
{
// [START dataplex_v1_generated_ContentService_CreateContent_sync_flattened_resourceNames]
using Google.Cloud.Dataplex.V1;

public sealed partial class GeneratedContentServiceClientSnippets
{
/// <summary>Snippet for CreateContent</summary>
/// <remarks>
/// This snippet has been automatically generated for illustrative purposes only.
/// It may require modifications to work in your environment.
/// </remarks>
public void CreateContentResourceNames()
{
// Create client
ContentServiceClient contentServiceClient = ContentServiceClient.Create();
// Initialize request argument(s)
LakeName parent = LakeName.FromProjectLocationLake("[PROJECT]", "[LOCATION]", "[LAKE]");
Content content = new Content();
// Make the request
Content response = contentServiceClient.CreateContent(parent, content);
}
}
// [END dataplex_v1_generated_ContentService_CreateContent_sync_flattened_resourceNames]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Copyright 2022 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 Google.Cloud.Dataplex.V1.Snippets
{
// [START dataplex_v1_generated_ContentService_CreateContent_sync_flattened]
using Google.Cloud.Dataplex.V1;

public sealed partial class GeneratedContentServiceClientSnippets
{
/// <summary>Snippet for CreateContent</summary>
/// <remarks>
/// This snippet has been automatically generated for illustrative purposes only.
/// It may require modifications to work in your environment.
/// </remarks>
public void CreateContent()
{
// Create client
ContentServiceClient contentServiceClient = ContentServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/lakes/[LAKE]";
Content content = new Content();
// Make the request
Content response = contentServiceClient.CreateContent(parent, content);
}
}
// [END dataplex_v1_generated_ContentService_CreateContent_sync_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Copyright 2022 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 Google.Cloud.Dataplex.V1.Snippets
{
// [START dataplex_v1_generated_ContentService_DeleteContent_async_flattened]
using System.Threading.Tasks;
using gcdv = Google.Cloud.Dataplex.V1;

public sealed partial class GeneratedContentServiceClientSnippets
{
/// <summary>Snippet for DeleteContentAsync</summary>
/// <remarks>
/// This snippet has been automatically generated for illustrative purposes only.
/// It may require modifications to work in your environment.
/// </remarks>
public async Task DeleteContentAsync()
{
// Create client
ContentServiceClient contentServiceClient = await ContentServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/lakes/[LAKE]/content/[CONTENT]";
// Make the request
await contentServiceClient.DeleteContentAsync(name);
}
}
// [END dataplex_v1_generated_ContentService_DeleteContent_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Copyright 2022 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 Google.Cloud.Dataplex.V1.Snippets
{
// [START dataplex_v1_generated_ContentService_DeleteContent_async]
using System.Threading.Tasks;
using gcdv = Google.Cloud.Dataplex.V1;

public sealed partial class GeneratedContentServiceClientSnippets
{
/// <summary>Snippet for DeleteContentAsync</summary>
/// <remarks>
/// This snippet has been automatically generated for illustrative purposes only.
/// It may require modifications to work in your environment.
/// </remarks>
public async Task DeleteContentRequestObjectAsync()
{
// Create client
ContentServiceClient contentServiceClient = await ContentServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteContentRequest request = new DeleteContentRequest
{
ContentName = ContentName.FromProjectLocationLakeContent("[PROJECT]", "[LOCATION]", "[LAKE]", "[CONTENT]"),
};
// Make the request
await contentServiceClient.DeleteContentAsync(request);
}
}
// [END dataplex_v1_generated_ContentService_DeleteContent_async]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Copyright 2022 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 Google.Cloud.Dataplex.V1.Snippets
{
// [START dataplex_v1_generated_ContentService_DeleteContent_sync]
using Google.Cloud.Dataplex.V1;

public sealed partial class GeneratedContentServiceClientSnippets
{
/// <summary>Snippet for DeleteContent</summary>
/// <remarks>
/// This snippet has been automatically generated for illustrative purposes only.
/// It may require modifications to work in your environment.
/// </remarks>
public void DeleteContentRequestObject()
{
// Create client
ContentServiceClient contentServiceClient = ContentServiceClient.Create();
// Initialize request argument(s)
DeleteContentRequest request = new DeleteContentRequest
{
ContentName = ContentName.FromProjectLocationLakeContent("[PROJECT]", "[LOCATION]", "[LAKE]", "[CONTENT]"),
};
// Make the request
contentServiceClient.DeleteContent(request);
}
}
// [END dataplex_v1_generated_ContentService_DeleteContent_sync]
}
Loading

0 comments on commit 1ea3fe0

Please sign in to comment.