예제 #1
0
        public void UpdateAuthorizedCertificateRequestObject()
        {
            moq::Mock <AuthorizedCertificates.AuthorizedCertificatesClient> mockGrpcClient = new moq::Mock <AuthorizedCertificates.AuthorizedCertificatesClient>(moq::MockBehavior.Strict);
            UpdateAuthorizedCertificateRequest request = new UpdateAuthorizedCertificateRequest
            {
                Name        = "name1c9368b0",
                Certificate = new AuthorizedCertificate(),
                UpdateMask  = new wkt::FieldMask(),
            };
            AuthorizedCertificate expectedResponse = new AuthorizedCertificate
            {
                Name        = "name1c9368b0",
                Id          = "id74b70bb8",
                DisplayName = "display_name137f65c2",
                DomainNames =
                {
                    "domain_names58aa2a78",
                },
                ExpireTime            = new wkt::Timestamp(),
                CertificateRawData    = new CertificateRawData(),
                ManagedCertificate    = new ManagedCertificate(),
                VisibleDomainMappings =
                {
                    "visible_domain_mappings231706d8",
                },
                DomainMappingsCount = 1489673528,
            };

            mockGrpcClient.Setup(x => x.UpdateAuthorizedCertificate(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            AuthorizedCertificatesClient client   = new AuthorizedCertificatesClientImpl(mockGrpcClient.Object, null);
            AuthorizedCertificate        response = client.UpdateAuthorizedCertificate(request);

            xunit::Assert.Same(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
 /// <summary>Snippet for UpdateAuthorizedCertificate</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void UpdateAuthorizedCertificateRequestObject()
 {
     // Create client
     AuthorizedCertificatesClient authorizedCertificatesClient = AuthorizedCertificatesClient.Create();
     // Initialize request argument(s)
     UpdateAuthorizedCertificateRequest request = new UpdateAuthorizedCertificateRequest
     {
         Name        = "",
         Certificate = new AuthorizedCertificate(),
         UpdateMask  = new FieldMask(),
     };
     // Make the request
     AuthorizedCertificate response = authorizedCertificatesClient.UpdateAuthorizedCertificate(request);
 }
예제 #3
0
        /// <summary>Snippet for UpdateAuthorizedCertificateAsync</summary>
        public async Task UpdateAuthorizedCertificateRequestObjectAsync()
        {
            // Snippet: UpdateAuthorizedCertificateAsync(UpdateAuthorizedCertificateRequest, CallSettings)
            // Additional: UpdateAuthorizedCertificateAsync(UpdateAuthorizedCertificateRequest, CancellationToken)
            // Create client
            AuthorizedCertificatesClient authorizedCertificatesClient = await AuthorizedCertificatesClient.CreateAsync();

            // Initialize request argument(s)
            UpdateAuthorizedCertificateRequest request = new UpdateAuthorizedCertificateRequest
            {
                Name        = "",
                Certificate = new AuthorizedCertificate(),
                UpdateMask  = new FieldMask(),
            };
            // Make the request
            AuthorizedCertificate response = await authorizedCertificatesClient.UpdateAuthorizedCertificateAsync(request);

            // End snippet
        }
예제 #4
0
        public async stt::Task UpdateAuthorizedCertificateRequestObjectAsync()
        {
            moq::Mock <AuthorizedCertificates.AuthorizedCertificatesClient> mockGrpcClient = new moq::Mock <AuthorizedCertificates.AuthorizedCertificatesClient>(moq::MockBehavior.Strict);
            UpdateAuthorizedCertificateRequest request = new UpdateAuthorizedCertificateRequest
            {
                Name        = "name1c9368b0",
                Certificate = new AuthorizedCertificate(),
                UpdateMask  = new wkt::FieldMask(),
            };
            AuthorizedCertificate expectedResponse = new AuthorizedCertificate
            {
                Name        = "name1c9368b0",
                Id          = "id74b70bb8",
                DisplayName = "display_name137f65c2",
                DomainNames =
                {
                    "domain_names58aa2a78",
                },
                ExpireTime            = new wkt::Timestamp(),
                CertificateRawData    = new CertificateRawData(),
                ManagedCertificate    = new ManagedCertificate(),
                VisibleDomainMappings =
                {
                    "visible_domain_mappings231706d8",
                },
                DomainMappingsCount = 1489673528,
            };

            mockGrpcClient.Setup(x => x.UpdateAuthorizedCertificateAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <AuthorizedCertificate>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            AuthorizedCertificatesClient client = new AuthorizedCertificatesClientImpl(mockGrpcClient.Object, null);
            AuthorizedCertificate        responseCallSettings = await client.UpdateAuthorizedCertificateAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            xunit::Assert.Same(expectedResponse, responseCallSettings);
            AuthorizedCertificate responseCancellationToken = await client.UpdateAuthorizedCertificateAsync(request, st::CancellationToken.None);

            xunit::Assert.Same(expectedResponse, responseCancellationToken);
            mockGrpcClient.VerifyAll();
        }
예제 #5
0
 /// <summary>
 /// Updates the specified SSL certificate. To renew a certificate and maintain
 /// its existing domain mappings, update `certificate_data` with a new
 /// certificate. The new certificate must be applicable to the same domains as
 /// the original certificate. The certificate `display_name` may also be
 /// updated.
 /// </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 <AuthorizedCertificate> UpdateAuthorizedCertificateAsync(UpdateAuthorizedCertificateRequest request, gaxgrpc::CallSettings callSettings = null)
 {
     Modify_UpdateAuthorizedCertificateRequest(ref request, ref callSettings);
     return(_callUpdateAuthorizedCertificate.Async(request, callSettings));
 }
예제 #6
0
 partial void Modify_UpdateAuthorizedCertificateRequest(ref UpdateAuthorizedCertificateRequest request, ref gaxgrpc::CallSettings settings);
예제 #7
0
 /// <summary>
 /// Updates the specified SSL certificate. To renew a certificate and maintain
 /// its existing domain mappings, update `certificate_data` with a new
 /// certificate. The new certificate must be applicable to the same domains as
 /// the original certificate. The certificate `display_name` may also be
 /// updated.
 /// </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 <AuthorizedCertificate> UpdateAuthorizedCertificateAsync(UpdateAuthorizedCertificateRequest request, st::CancellationToken cancellationToken) =>
 UpdateAuthorizedCertificateAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
예제 #8
0
 /// <summary>
 /// Updates the specified SSL certificate. To renew a certificate and maintain
 /// its existing domain mappings, update `certificate_data` with a new
 /// certificate. The new certificate must be applicable to the same domains as
 /// the original certificate. The certificate `display_name` may also be
 /// updated.
 /// </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 <AuthorizedCertificate> UpdateAuthorizedCertificateAsync(UpdateAuthorizedCertificateRequest request, gaxgrpc::CallSettings callSettings = null) =>
 throw new sys::NotImplementedException();