Esempio n. 1
0
 private RegionNetworkEndpointGroupsSettings(RegionNetworkEndpointGroupsSettings existing) : base(existing)
 {
     gax::GaxPreconditions.CheckNotNull(existing, nameof(existing));
     DeleteSettings = existing.DeleteSettings;
     GetSettings    = existing.GetSettings;
     InsertSettings = existing.InsertSettings;
     ListSettings   = existing.ListSettings;
     OnCopy(existing);
 }
Esempio n. 2
0
        /// <summary>
        /// Constructs a client wrapper for the RegionNetworkEndpointGroups service, with the specified gRPC client and
        /// settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">
        /// The base <see cref="RegionNetworkEndpointGroupsSettings"/> used within this client.
        /// </param>
        public RegionNetworkEndpointGroupsClientImpl(RegionNetworkEndpointGroups.RegionNetworkEndpointGroupsClient grpcClient, RegionNetworkEndpointGroupsSettings settings)
        {
            GrpcClient = grpcClient;
            RegionNetworkEndpointGroupsSettings effectiveSettings = settings ?? RegionNetworkEndpointGroupsSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings);

            _callDelete = clientHelper.BuildApiCall <DeleteRegionNetworkEndpointGroupRequest, Operation>(grpcClient.DeleteAsync, grpcClient.Delete, effectiveSettings.DeleteSettings).WithGoogleRequestParam("project", request => request.Project).WithGoogleRequestParam("region", request => request.Region).WithGoogleRequestParam("network_endpoint_group", request => request.NetworkEndpointGroup);
            Modify_ApiCall(ref _callDelete);
            Modify_DeleteApiCall(ref _callDelete);
            _callGet = clientHelper.BuildApiCall <GetRegionNetworkEndpointGroupRequest, NetworkEndpointGroup>(grpcClient.GetAsync, grpcClient.Get, effectiveSettings.GetSettings).WithGoogleRequestParam("project", request => request.Project).WithGoogleRequestParam("region", request => request.Region).WithGoogleRequestParam("network_endpoint_group", request => request.NetworkEndpointGroup);
            Modify_ApiCall(ref _callGet);
            Modify_GetApiCall(ref _callGet);
            _callInsert = clientHelper.BuildApiCall <InsertRegionNetworkEndpointGroupRequest, Operation>(grpcClient.InsertAsync, grpcClient.Insert, effectiveSettings.InsertSettings).WithGoogleRequestParam("project", request => request.Project).WithGoogleRequestParam("region", request => request.Region);
            Modify_ApiCall(ref _callInsert);
            Modify_InsertApiCall(ref _callInsert);
            _callList = clientHelper.BuildApiCall <ListRegionNetworkEndpointGroupsRequest, NetworkEndpointGroupList>(grpcClient.ListAsync, grpcClient.List, effectiveSettings.ListSettings).WithGoogleRequestParam("project", request => request.Project).WithGoogleRequestParam("region", request => request.Region);
            Modify_ApiCall(ref _callList);
            Modify_ListApiCall(ref _callList);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Esempio n. 3
0
 partial void OnConstruction(RegionNetworkEndpointGroups.RegionNetworkEndpointGroupsClient grpcClient, RegionNetworkEndpointGroupsSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
Esempio n. 4
0
 partial void OnCopy(RegionNetworkEndpointGroupsSettings existing);
Esempio n. 5
0
        /// <summary>
        /// Creates a <see cref="RegionNetworkEndpointGroupsClient"/> 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="RegionNetworkEndpointGroupsSettings"/>.</param>
        /// <returns>The created <see cref="RegionNetworkEndpointGroupsClient"/>.</returns>
        internal static RegionNetworkEndpointGroupsClient Create(grpccore::CallInvoker callInvoker, RegionNetworkEndpointGroupsSettings settings = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            RegionNetworkEndpointGroups.RegionNetworkEndpointGroupsClient grpcClient = new RegionNetworkEndpointGroups.RegionNetworkEndpointGroupsClient(callInvoker);
            return(new RegionNetworkEndpointGroupsClientImpl(grpcClient, settings));
        }