Skip to content

Commit

Permalink
feat: add ResourcePolicyMember to google/iam/v1
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 699258514

Source-Link: googleapis/googleapis@1c69885

Source-Link: googleapis/googleapis-gen@01e3cd8
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuSWFtLlYxLy5Pd2xCb3QueWFtbCIsImgiOiIwMWUzY2Q4MDhjNGM1ZDE4MjYzNzU4MTkxNWQwOTExZGU2NmY3MDhkIn0=
  • Loading branch information
gcf-owl-bot[bot] committed Nov 22, 2024
1 parent 85f11dc commit 91c22a0
Show file tree
Hide file tree
Showing 22 changed files with 6,105 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.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>
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]
}
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]
}
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]
}
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]
}
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]
}
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]
}
Loading

0 comments on commit 91c22a0

Please sign in to comment.