public async stt::Task PatchModelAsync()
        {
            moq::Mock <ModelService.ModelServiceClient> mockGrpcClient = new moq::Mock <ModelService.ModelServiceClient>(moq::MockBehavior.Strict);
            PatchModelRequest request = new PatchModelRequest
            {
                ProjectId = "project_id43ad98b0",
                DatasetId = "dataset_id08d366d3",
                ModelId   = "model_id8abf7c47",
                Model     = new Model(),
            };
            Model expectedResponse = new Model
            {
                Etag             = "etage8ad7218",
                ModelReference   = new ModelReference(),
                CreationTime     = -5025413042314785256L,
                LastModifiedTime = 1315234198627015670L,
                ModelType        = Model.Types.ModelType.BoostedTreeClassifier,
                TrainingRuns     =
                {
                    new Model.Types.TrainingRun(),
                },
                FeatureColumns =
                {
                    new StandardSqlField(),
                },
                LabelColumns =
                {
                    new StandardSqlField(),
                },
                Description  = "description2cf9da67",
                Location     = "locatione09d18d5",
                FriendlyName = "friendly_name6171e36b",
                Labels       =
                {
                    {
                        "key8a0b6e3c",
                        "value60c16320"
                    },
                },
                ExpirationTime          = -3281957478759130153L,
                EncryptionConfiguration = new EncryptionConfiguration(),
            };

            mockGrpcClient.Setup(x => x.PatchModelAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <Model>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            ModelServiceClient client  = new ModelServiceClientImpl(mockGrpcClient.Object, null);
            Model responseCallSettings = await client.PatchModelAsync(request.ProjectId, request.DatasetId, request.ModelId, request.Model, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            xunit::Assert.Same(expectedResponse, responseCallSettings);
            Model responseCancellationToken = await client.PatchModelAsync(request.ProjectId, request.DatasetId, request.ModelId, request.Model, st::CancellationToken.None);

            xunit::Assert.Same(expectedResponse, responseCancellationToken);
            mockGrpcClient.VerifyAll();
        }
 /// <summary>Snippet for PatchModel</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void PatchModelRequestObject()
 {
     // Create client
     ModelServiceClient modelServiceClient = ModelServiceClient.Create();
     // Initialize request argument(s)
     PatchModelRequest request = new PatchModelRequest
     {
         ProjectId = "",
         DatasetId = "",
         ModelId   = "",
         Model     = new Model(),
     };
     // Make the request
     Model response = modelServiceClient.PatchModel(request);
 }
        /// <summary>Snippet for PatchModelAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task PatchModelRequestObjectAsync()
        {
            // Create client
            ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();

            // Initialize request argument(s)
            PatchModelRequest request = new PatchModelRequest
            {
                ProjectId = "",
                DatasetId = "",
                ModelId   = "",
                Model     = new Model(),
            };
            // Make the request
            Model response = await modelServiceClient.PatchModelAsync(request);
        }
        /// <summary>Snippet for PatchModelAsync</summary>
        public async Task PatchModelRequestObjectAsync()
        {
            // Snippet: PatchModelAsync(PatchModelRequest, CallSettings)
            // Additional: PatchModelAsync(PatchModelRequest, CancellationToken)
            // Create client
            ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();

            // Initialize request argument(s)
            PatchModelRequest request = new PatchModelRequest
            {
                ProjectId = "",
                DatasetId = "",
                ModelId   = "",
                Model     = new Model(),
            };
            // Make the request
            Model response = await modelServiceClient.PatchModelAsync(request);

            // End snippet
        }
示例#5
0
 /// <summary>
 /// Patch specific fields in the specified model.
 /// </summary>
 /// <param name="request">The request object containing all of the parameters for the API call.</param>
 /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
 /// <returns>A Task containing the RPC response.</returns>
 public override stt::Task <Model> PatchModelAsync(PatchModelRequest request, gaxgrpc::CallSettings callSettings = null)
 {
     Modify_PatchModelRequest(ref request, ref callSettings);
     return(_callPatchModel.Async(request, callSettings));
 }
示例#6
0
 /// <summary>
 /// Patch specific fields in the specified model.
 /// </summary>
 /// <param name="request">The request object containing all of the parameters for the API call.</param>
 /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
 /// <returns>The RPC response.</returns>
 public override Model PatchModel(PatchModelRequest request, gaxgrpc::CallSettings callSettings = null)
 {
     Modify_PatchModelRequest(ref request, ref callSettings);
     return(_callPatchModel.Sync(request, callSettings));
 }
示例#7
0
 partial void Modify_PatchModelRequest(ref PatchModelRequest request, ref gaxgrpc::CallSettings settings);
示例#8
0
 /// <summary>
 /// Patch specific fields in the specified model.
 /// </summary>
 /// <param name="request">The request object containing all of the parameters for the API call.</param>
 /// <param name="cancellationToken">A <see cref="st::CancellationToken"/> to use for this RPC.</param>
 /// <returns>A Task containing the RPC response.</returns>
 public virtual stt::Task <Model> PatchModelAsync(PatchModelRequest request, st::CancellationToken cancellationToken) =>
 PatchModelAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
示例#9
0
 /// <summary>
 /// Patch specific fields in the specified model.
 /// </summary>
 /// <param name="request">The request object containing all of the parameters for the API call.</param>
 /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
 /// <returns>A Task containing the RPC response.</returns>
 public virtual stt::Task <Model> PatchModelAsync(PatchModelRequest request, gaxgrpc::CallSettings callSettings = null) =>
 throw new sys::NotImplementedException();
示例#10
0
 /// <summary>
 /// Patch specific fields in the specified model.
 /// </summary>
 /// <param name="request">The request object containing all of the parameters for the API call.</param>
 /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
 /// <returns>The RPC response.</returns>
 public virtual Model PatchModel(PatchModelRequest request, gaxgrpc::CallSettings callSettings = null) =>
 throw new sys::NotImplementedException();