Skip to content

Commit

Permalink
Regenerate Google.Cloud.Bigtable.Admin.V2 (#3412)
Browse files Browse the repository at this point in the history
Adds IAM support for table admin
  • Loading branch information
yoshi-automation authored and jskeet committed Sep 4, 2019
1 parent 043d1e8 commit 6ee4904
Show file tree
Hide file tree
Showing 5 changed files with 1,428 additions and 106 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ namespace Google.Cloud.Bigtable.Admin.V2.Snippets
using Google.Api.Gax.Grpc;
using apis = Google.Cloud.Bigtable.Admin.V2;
using Google.Cloud.Bigtable.Common.V2;
using Google.Cloud.Iam.V1;
using Google.Protobuf;
using Google.Protobuf.WellKnownTypes;
using Grpc.Core;
Expand Down Expand Up @@ -625,5 +626,193 @@ public void CheckConsistency_RequestObject()
// End snippet
}

/// <summary>Snippet for GetIamPolicyAsync</summary>
public async Task GetIamPolicyAsync()
{
// Snippet: GetIamPolicyAsync(string,CallSettings)
// Additional: GetIamPolicyAsync(string,CancellationToken)
// Create client
BigtableTableAdminClient bigtableTableAdminClient = await BigtableTableAdminClient.CreateAsync();
// Initialize request argument(s)
string formattedResource = new Google.Cloud.Bigtable.Common.V2.TableName("[PROJECT]", "[INSTANCE]", "[TABLE]").ToString();
// Make the request
Policy response = await bigtableTableAdminClient.GetIamPolicyAsync(formattedResource);
// End snippet
}

/// <summary>Snippet for GetIamPolicy</summary>
public void GetIamPolicy()
{
// Snippet: GetIamPolicy(string,CallSettings)
// Create client
BigtableTableAdminClient bigtableTableAdminClient = BigtableTableAdminClient.Create();
// Initialize request argument(s)
string formattedResource = new Google.Cloud.Bigtable.Common.V2.TableName("[PROJECT]", "[INSTANCE]", "[TABLE]").ToString();
// Make the request
Policy response = bigtableTableAdminClient.GetIamPolicy(formattedResource);
// End snippet
}

/// <summary>Snippet for GetIamPolicyAsync</summary>
public async Task GetIamPolicyAsync_RequestObject()
{
// Snippet: GetIamPolicyAsync(GetIamPolicyRequest,CallSettings)
// Additional: GetIamPolicyAsync(GetIamPolicyRequest,CancellationToken)
// Create client
BigtableTableAdminClient bigtableTableAdminClient = await BigtableTableAdminClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
Resource = new Google.Cloud.Bigtable.Common.V2.TableName("[PROJECT]", "[INSTANCE]", "[TABLE]").ToString(),
};
// Make the request
Policy response = await bigtableTableAdminClient.GetIamPolicyAsync(request);
// End snippet
}

/// <summary>Snippet for GetIamPolicy</summary>
public void GetIamPolicy_RequestObject()
{
// Snippet: GetIamPolicy(GetIamPolicyRequest,CallSettings)
// Create client
BigtableTableAdminClient bigtableTableAdminClient = BigtableTableAdminClient.Create();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
Resource = new Google.Cloud.Bigtable.Common.V2.TableName("[PROJECT]", "[INSTANCE]", "[TABLE]").ToString(),
};
// Make the request
Policy response = bigtableTableAdminClient.GetIamPolicy(request);
// End snippet
}

/// <summary>Snippet for SetIamPolicyAsync</summary>
public async Task SetIamPolicyAsync()
{
// Snippet: SetIamPolicyAsync(string,Policy,CallSettings)
// Additional: SetIamPolicyAsync(string,Policy,CancellationToken)
// Create client
BigtableTableAdminClient bigtableTableAdminClient = await BigtableTableAdminClient.CreateAsync();
// Initialize request argument(s)
string formattedResource = new Google.Cloud.Bigtable.Common.V2.TableName("[PROJECT]", "[INSTANCE]", "[TABLE]").ToString();
Policy policy = new Policy();
// Make the request
Policy response = await bigtableTableAdminClient.SetIamPolicyAsync(formattedResource, policy);
// End snippet
}

/// <summary>Snippet for SetIamPolicy</summary>
public void SetIamPolicy()
{
// Snippet: SetIamPolicy(string,Policy,CallSettings)
// Create client
BigtableTableAdminClient bigtableTableAdminClient = BigtableTableAdminClient.Create();
// Initialize request argument(s)
string formattedResource = new Google.Cloud.Bigtable.Common.V2.TableName("[PROJECT]", "[INSTANCE]", "[TABLE]").ToString();
Policy policy = new Policy();
// Make the request
Policy response = bigtableTableAdminClient.SetIamPolicy(formattedResource, policy);
// End snippet
}

/// <summary>Snippet for SetIamPolicyAsync</summary>
public async Task SetIamPolicyAsync_RequestObject()
{
// Snippet: SetIamPolicyAsync(SetIamPolicyRequest,CallSettings)
// Additional: SetIamPolicyAsync(SetIamPolicyRequest,CancellationToken)
// Create client
BigtableTableAdminClient bigtableTableAdminClient = await BigtableTableAdminClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyRequest request = new SetIamPolicyRequest
{
Resource = new Google.Cloud.Bigtable.Common.V2.TableName("[PROJECT]", "[INSTANCE]", "[TABLE]").ToString(),
Policy = new Policy(),
};
// Make the request
Policy response = await bigtableTableAdminClient.SetIamPolicyAsync(request);
// End snippet
}

/// <summary>Snippet for SetIamPolicy</summary>
public void SetIamPolicy_RequestObject()
{
// Snippet: SetIamPolicy(SetIamPolicyRequest,CallSettings)
// Create client
BigtableTableAdminClient bigtableTableAdminClient = BigtableTableAdminClient.Create();
// Initialize request argument(s)
SetIamPolicyRequest request = new SetIamPolicyRequest
{
Resource = new Google.Cloud.Bigtable.Common.V2.TableName("[PROJECT]", "[INSTANCE]", "[TABLE]").ToString(),
Policy = new Policy(),
};
// Make the request
Policy response = bigtableTableAdminClient.SetIamPolicy(request);
// End snippet
}

/// <summary>Snippet for TestIamPermissionsAsync</summary>
public async Task TestIamPermissionsAsync()
{
// Snippet: TestIamPermissionsAsync(string,IEnumerable<string>,CallSettings)
// Additional: TestIamPermissionsAsync(string,IEnumerable<string>,CancellationToken)
// Create client
BigtableTableAdminClient bigtableTableAdminClient = await BigtableTableAdminClient.CreateAsync();
// Initialize request argument(s)
string formattedResource = new Google.Cloud.Bigtable.Common.V2.TableName("[PROJECT]", "[INSTANCE]", "[TABLE]").ToString();
IEnumerable<string> permissions = new List<string>();
// Make the request
TestIamPermissionsResponse response = await bigtableTableAdminClient.TestIamPermissionsAsync(formattedResource, permissions);
// End snippet
}

/// <summary>Snippet for TestIamPermissions</summary>
public void TestIamPermissions()
{
// Snippet: TestIamPermissions(string,IEnumerable<string>,CallSettings)
// Create client
BigtableTableAdminClient bigtableTableAdminClient = BigtableTableAdminClient.Create();
// Initialize request argument(s)
string formattedResource = new Google.Cloud.Bigtable.Common.V2.TableName("[PROJECT]", "[INSTANCE]", "[TABLE]").ToString();
IEnumerable<string> permissions = new List<string>();
// Make the request
TestIamPermissionsResponse response = bigtableTableAdminClient.TestIamPermissions(formattedResource, permissions);
// End snippet
}

/// <summary>Snippet for TestIamPermissionsAsync</summary>
public async Task TestIamPermissionsAsync_RequestObject()
{
// Snippet: TestIamPermissionsAsync(TestIamPermissionsRequest,CallSettings)
// Additional: TestIamPermissionsAsync(TestIamPermissionsRequest,CancellationToken)
// Create client
BigtableTableAdminClient bigtableTableAdminClient = await BigtableTableAdminClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
Resource = new Google.Cloud.Bigtable.Common.V2.TableName("[PROJECT]", "[INSTANCE]", "[TABLE]").ToString(),
Permissions = { },
};
// Make the request
TestIamPermissionsResponse response = await bigtableTableAdminClient.TestIamPermissionsAsync(request);
// End snippet
}

/// <summary>Snippet for TestIamPermissions</summary>
public void TestIamPermissions_RequestObject()
{
// Snippet: TestIamPermissions(TestIamPermissionsRequest,CallSettings)
// Create client
BigtableTableAdminClient bigtableTableAdminClient = BigtableTableAdminClient.Create();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
Resource = new Google.Cloud.Bigtable.Common.V2.TableName("[PROJECT]", "[INSTANCE]", "[TABLE]").ToString(),
Permissions = { },
};
// Make the request
TestIamPermissionsResponse response = bigtableTableAdminClient.TestIamPermissions(request);
// End snippet
}

}
}
Loading

0 comments on commit 6ee4904

Please sign in to comment.