-
Notifications
You must be signed in to change notification settings - Fork 369
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add ResourcePolicyMember to google/iam/v1
PiperOrigin-RevId: 699258514 Source-Link: googleapis/googleapis@1c69885 Source-Link: googleapis/googleapis-gen@01e3cd8 Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuSWFtLlYxLy5Pd2xCb3QueWFtbCIsImgiOiIwMWUzY2Q4MDhjNGM1ZDE4MjYzNzU4MTkxNWQwOTExZGU2NmY3MDhkIn0=
- Loading branch information
1 parent
85f11dc
commit 91c22a0
Showing
22 changed files
with
6,105 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
...Iam.V1/Google.Cloud.Iam.V1.GeneratedSnippets/Google.Cloud.Iam.V1.GeneratedSnippets.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.Iam.V1/Google.Cloud.Iam.V1.csproj" /> | ||
<PackageReference Include="System.Linq.Async" Version="6.0.1" /> | ||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="All" /> | ||
</ItemGroup> | ||
|
||
</Project> |
49 changes: 49 additions & 0 deletions
49
...Cloud.Iam.V1.GeneratedSnippets/IAMPolicyClient.GetIamPolicyRequestObjectAsyncSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 iam_v1_generated_IAMPolicy_GetIamPolicy_async] | ||
using Google.Api.Gax; | ||
using Google.Cloud.Iam.V1; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedIAMPolicyClientSnippets | ||
{ | ||
/// <summary>Snippet for GetIamPolicyAsync</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 GetIamPolicyRequestObjectAsync() | ||
{ | ||
// Create client | ||
IAMPolicyClient iAMPolicyClient = await IAMPolicyClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
GetIamPolicyRequest request = new GetIamPolicyRequest | ||
{ | ||
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"), | ||
Options = new GetPolicyOptions(), | ||
}; | ||
// Make the request | ||
Policy response = await iAMPolicyClient.GetIamPolicyAsync(request); | ||
} | ||
} | ||
// [END iam_v1_generated_IAMPolicy_GetIamPolicy_async] | ||
} |
48 changes: 48 additions & 0 deletions
48
...ogle.Cloud.Iam.V1.GeneratedSnippets/IAMPolicyClient.GetIamPolicyRequestObjectSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 iam_v1_generated_IAMPolicy_GetIamPolicy_sync] | ||
using Google.Api.Gax; | ||
using Google.Cloud.Iam.V1; | ||
|
||
public sealed partial class GeneratedIAMPolicyClientSnippets | ||
{ | ||
/// <summary>Snippet for GetIamPolicy</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 GetIamPolicyRequestObject() | ||
{ | ||
// Create client | ||
IAMPolicyClient iAMPolicyClient = IAMPolicyClient.Create(); | ||
// Initialize request argument(s) | ||
GetIamPolicyRequest request = new GetIamPolicyRequest | ||
{ | ||
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"), | ||
Options = new GetPolicyOptions(), | ||
}; | ||
// Make the request | ||
Policy response = iAMPolicyClient.GetIamPolicy(request); | ||
} | ||
} | ||
// [END iam_v1_generated_IAMPolicy_GetIamPolicy_sync] | ||
} |
51 changes: 51 additions & 0 deletions
51
...Cloud.Iam.V1.GeneratedSnippets/IAMPolicyClient.SetIamPolicyRequestObjectAsyncSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// 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 iam_v1_generated_IAMPolicy_SetIamPolicy_async] | ||
using Google.Api.Gax; | ||
using Google.Cloud.Iam.V1; | ||
using Google.Protobuf.WellKnownTypes; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedIAMPolicyClientSnippets | ||
{ | ||
/// <summary>Snippet for SetIamPolicyAsync</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 SetIamPolicyRequestObjectAsync() | ||
{ | ||
// Create client | ||
IAMPolicyClient iAMPolicyClient = await IAMPolicyClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
SetIamPolicyRequest request = new SetIamPolicyRequest | ||
{ | ||
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"), | ||
Policy = new Policy(), | ||
UpdateMask = new FieldMask(), | ||
}; | ||
// Make the request | ||
Policy response = await iAMPolicyClient.SetIamPolicyAsync(request); | ||
} | ||
} | ||
// [END iam_v1_generated_IAMPolicy_SetIamPolicy_async] | ||
} |
50 changes: 50 additions & 0 deletions
50
...ogle.Cloud.Iam.V1.GeneratedSnippets/IAMPolicyClient.SetIamPolicyRequestObjectSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// 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 iam_v1_generated_IAMPolicy_SetIamPolicy_sync] | ||
using Google.Api.Gax; | ||
using Google.Cloud.Iam.V1; | ||
using Google.Protobuf.WellKnownTypes; | ||
|
||
public sealed partial class GeneratedIAMPolicyClientSnippets | ||
{ | ||
/// <summary>Snippet for SetIamPolicy</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 SetIamPolicyRequestObject() | ||
{ | ||
// Create client | ||
IAMPolicyClient iAMPolicyClient = IAMPolicyClient.Create(); | ||
// Initialize request argument(s) | ||
SetIamPolicyRequest request = new SetIamPolicyRequest | ||
{ | ||
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"), | ||
Policy = new Policy(), | ||
UpdateMask = new FieldMask(), | ||
}; | ||
// Make the request | ||
Policy response = iAMPolicyClient.SetIamPolicy(request); | ||
} | ||
} | ||
// [END iam_v1_generated_IAMPolicy_SetIamPolicy_sync] | ||
} |
49 changes: 49 additions & 0 deletions
49
...Iam.V1.GeneratedSnippets/IAMPolicyClient.TestIamPermissionsRequestObjectAsyncSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 iam_v1_generated_IAMPolicy_TestIamPermissions_async] | ||
using Google.Api.Gax; | ||
using Google.Cloud.Iam.V1; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedIAMPolicyClientSnippets | ||
{ | ||
/// <summary>Snippet for TestIamPermissionsAsync</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 TestIamPermissionsRequestObjectAsync() | ||
{ | ||
// Create client | ||
IAMPolicyClient iAMPolicyClient = await IAMPolicyClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
TestIamPermissionsRequest request = new TestIamPermissionsRequest | ||
{ | ||
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"), | ||
Permissions = { "", }, | ||
}; | ||
// Make the request | ||
TestIamPermissionsResponse response = await iAMPolicyClient.TestIamPermissionsAsync(request); | ||
} | ||
} | ||
// [END iam_v1_generated_IAMPolicy_TestIamPermissions_async] | ||
} |
48 changes: 48 additions & 0 deletions
48
...loud.Iam.V1.GeneratedSnippets/IAMPolicyClient.TestIamPermissionsRequestObjectSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 iam_v1_generated_IAMPolicy_TestIamPermissions_sync] | ||
using Google.Api.Gax; | ||
using Google.Cloud.Iam.V1; | ||
|
||
public sealed partial class GeneratedIAMPolicyClientSnippets | ||
{ | ||
/// <summary>Snippet for TestIamPermissions</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 TestIamPermissionsRequestObject() | ||
{ | ||
// Create client | ||
IAMPolicyClient iAMPolicyClient = IAMPolicyClient.Create(); | ||
// Initialize request argument(s) | ||
TestIamPermissionsRequest request = new TestIamPermissionsRequest | ||
{ | ||
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"), | ||
Permissions = { "", }, | ||
}; | ||
// Make the request | ||
TestIamPermissionsResponse response = iAMPolicyClient.TestIamPermissions(request); | ||
} | ||
} | ||
// [END iam_v1_generated_IAMPolicy_TestIamPermissions_sync] | ||
} |
Oops, something went wrong.