private IdentityAwareProxyAdminServiceSettings(IdentityAwareProxyAdminServiceSettings existing) : base(existing) { gax::GaxPreconditions.CheckNotNull(existing, nameof(existing)); SetIamPolicySettings = existing.SetIamPolicySettings; GetIamPolicySettings = existing.GetIamPolicySettings; TestIamPermissionsSettings = existing.TestIamPermissionsSettings; GetIapSettingsSettings = existing.GetIapSettingsSettings; UpdateIapSettingsSettings = existing.UpdateIapSettingsSettings; OnCopy(existing); }
/// <summary> /// Constructs a client wrapper for the IdentityAwareProxyAdminService service, with the specified gRPC client /// and settings. /// </summary> /// <param name="grpcClient">The underlying gRPC client.</param> /// <param name="settings"> /// The base <see cref="IdentityAwareProxyAdminServiceSettings"/> used within this client. /// </param> public IdentityAwareProxyAdminServiceClientImpl(IdentityAwareProxyAdminService.IdentityAwareProxyAdminServiceClient grpcClient, IdentityAwareProxyAdminServiceSettings settings) { GrpcClient = grpcClient; IdentityAwareProxyAdminServiceSettings effectiveSettings = settings ?? IdentityAwareProxyAdminServiceSettings.GetDefault(); gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings); _callSetIamPolicy = clientHelper.BuildApiCall <gciv::SetIamPolicyRequest, gciv::Policy>(grpcClient.SetIamPolicyAsync, grpcClient.SetIamPolicy, effectiveSettings.SetIamPolicySettings).WithGoogleRequestParam("resource", request => request.Resource); Modify_ApiCall(ref _callSetIamPolicy); Modify_SetIamPolicyApiCall(ref _callSetIamPolicy); _callGetIamPolicy = clientHelper.BuildApiCall <gciv::GetIamPolicyRequest, gciv::Policy>(grpcClient.GetIamPolicyAsync, grpcClient.GetIamPolicy, effectiveSettings.GetIamPolicySettings).WithGoogleRequestParam("resource", request => request.Resource); Modify_ApiCall(ref _callGetIamPolicy); Modify_GetIamPolicyApiCall(ref _callGetIamPolicy); _callTestIamPermissions = clientHelper.BuildApiCall <gciv::TestIamPermissionsRequest, gciv::TestIamPermissionsResponse>(grpcClient.TestIamPermissionsAsync, grpcClient.TestIamPermissions, effectiveSettings.TestIamPermissionsSettings).WithGoogleRequestParam("resource", request => request.Resource); Modify_ApiCall(ref _callTestIamPermissions); Modify_TestIamPermissionsApiCall(ref _callTestIamPermissions); _callGetIapSettings = clientHelper.BuildApiCall <GetIapSettingsRequest, IapSettings>(grpcClient.GetIapSettingsAsync, grpcClient.GetIapSettings, effectiveSettings.GetIapSettingsSettings).WithGoogleRequestParam("name", request => request.Name); Modify_ApiCall(ref _callGetIapSettings); Modify_GetIapSettingsApiCall(ref _callGetIapSettings); _callUpdateIapSettings = clientHelper.BuildApiCall <UpdateIapSettingsRequest, IapSettings>(grpcClient.UpdateIapSettingsAsync, grpcClient.UpdateIapSettings, effectiveSettings.UpdateIapSettingsSettings).WithGoogleRequestParam("iap_settings.name", request => request.IapSettings?.Name); Modify_ApiCall(ref _callUpdateIapSettings); Modify_UpdateIapSettingsApiCall(ref _callUpdateIapSettings); OnConstruction(grpcClient, effectiveSettings, clientHelper); }
partial void OnCopy(IdentityAwareProxyAdminServiceSettings existing);
partial void OnConstruction(IdentityAwareProxyAdminService.IdentityAwareProxyAdminServiceClient grpcClient, IdentityAwareProxyAdminServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
/// <summary> /// Creates a <see cref="IdentityAwareProxyAdminServiceClient"/> which uses the specified call invoker for /// remote operations. /// </summary> /// <param name="callInvoker"> /// The <see cref="grpccore::CallInvoker"/> for remote operations. Must not be null. /// </param> /// <param name="settings">Optional <see cref="IdentityAwareProxyAdminServiceSettings"/>.</param> /// <returns>The created <see cref="IdentityAwareProxyAdminServiceClient"/>.</returns> internal static IdentityAwareProxyAdminServiceClient Create(grpccore::CallInvoker callInvoker, IdentityAwareProxyAdminServiceSettings settings = null) { gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker)); grpcinter::Interceptor interceptor = settings?.Interceptor; if (interceptor != null) { callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor); } IdentityAwareProxyAdminService.IdentityAwareProxyAdminServiceClient grpcClient = new IdentityAwareProxyAdminService.IdentityAwareProxyAdminServiceClient(callInvoker); return(new IdentityAwareProxyAdminServiceClientImpl(grpcClient, settings)); }