/// <summary>Snippet for GetHotelGroupView</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetHotelGroupViewResourceNames()
 {
     // Create client
     HotelGroupViewServiceClient hotelGroupViewServiceClient = HotelGroupViewServiceClient.Create();
     // Initialize request argument(s)
     HotelGroupViewName resourceName = HotelGroupViewName.FromCustomerHotelGroupView("[CUSTOMER]", "[HOTEL_GROUP_VIEW]");
     // Make the request
     HotelGroupView response = hotelGroupViewServiceClient.GetHotelGroupView(resourceName);
 }
 /// <summary>Snippet for GetHotelGroupView</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetHotelGroupViewResourceNames()
 {
     // Create client
     HotelGroupViewServiceClient hotelGroupViewServiceClient = HotelGroupViewServiceClient.Create();
     // Initialize request argument(s)
     HotelGroupViewName resourceName = HotelGroupViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]");
     // Make the request
     HotelGroupView response = hotelGroupViewServiceClient.GetHotelGroupView(resourceName);
 }
 /// <summary>Snippet for GetHotelGroupView</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetHotelGroupView()
 {
     // Create client
     HotelGroupViewServiceClient hotelGroupViewServiceClient = HotelGroupViewServiceClient.Create();
     // Initialize request argument(s)
     string resourceName = "customers/[CUSTOMER]/hotelGroupViews/[HOTEL_GROUP_VIEW]";
     // Make the request
     HotelGroupView response = hotelGroupViewServiceClient.GetHotelGroupView(resourceName);
 }
Пример #4
0
        /// <summary>Snippet for GetHotelGroupViewAsync</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 GetHotelGroupViewAsync()
        {
            // Create client
            HotelGroupViewServiceClient hotelGroupViewServiceClient = await HotelGroupViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            string resourceName = "customers/[CUSTOMER_ID]/hotelGroupViews/[AD_GROUP_ID]~[CRITERION_ID]";
            // Make the request
            HotelGroupView response = await hotelGroupViewServiceClient.GetHotelGroupViewAsync(resourceName);
        }
Пример #5
0
 /// <summary>Snippet for GetHotelGroupView</summary>
 public void GetHotelGroupView()
 {
     // Snippet: GetHotelGroupView(string, CallSettings)
     // Create client
     HotelGroupViewServiceClient hotelGroupViewServiceClient = HotelGroupViewServiceClient.Create();
     // Initialize request argument(s)
     string resourceName = "customers/[CUSTOMER_ID]/hotelGroupViews/[AD_GROUP_ID]~[CRITERION_ID]";
     // Make the request
     HotelGroupView response = hotelGroupViewServiceClient.GetHotelGroupView(resourceName);
     // End snippet
 }
        /// <summary>Snippet for GetHotelGroupViewAsync</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 GetHotelGroupViewRequestObjectAsync()
        {
            // Create client
            HotelGroupViewServiceClient hotelGroupViewServiceClient = await HotelGroupViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            GetHotelGroupViewRequest request = new GetHotelGroupViewRequest
            {
                ResourceNameAsHotelGroupViewName = HotelGroupViewName.FromCustomerHotelGroupView("[CUSTOMER]", "[HOTEL_GROUP_VIEW]"),
            };
            // Make the request
            HotelGroupView response = await hotelGroupViewServiceClient.GetHotelGroupViewAsync(request);
        }
Пример #7
0
        /// <summary>Snippet for GetHotelGroupViewAsync</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 GetHotelGroupViewRequestObjectAsync()
        {
            // Create client
            HotelGroupViewServiceClient hotelGroupViewServiceClient = await HotelGroupViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            GetHotelGroupViewRequest request = new GetHotelGroupViewRequest
            {
                ResourceNameAsHotelGroupViewName = HotelGroupViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"),
            };
            // Make the request
            HotelGroupView response = await hotelGroupViewServiceClient.GetHotelGroupViewAsync(request);
        }
        /// <summary>Snippet for GetHotelGroupViewAsync</summary>
        public async Task GetHotelGroupViewAsync()
        {
            // Snippet: GetHotelGroupViewAsync(string, CallSettings)
            // Additional: GetHotelGroupViewAsync(string, CancellationToken)
            // Create client
            HotelGroupViewServiceClient hotelGroupViewServiceClient = await HotelGroupViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            string resourceName = "customers/[CUSTOMER]/hotelGroupViews/[HOTEL_GROUP_VIEW]";
            // Make the request
            HotelGroupView response = await hotelGroupViewServiceClient.GetHotelGroupViewAsync(resourceName);

            // End snippet
        }
 /// <summary>Snippet for GetHotelGroupView</summary>
 public void GetHotelGroupViewRequestObject()
 {
     // Snippet: GetHotelGroupView(GetHotelGroupViewRequest, CallSettings)
     // Create client
     HotelGroupViewServiceClient hotelGroupViewServiceClient = HotelGroupViewServiceClient.Create();
     // Initialize request argument(s)
     GetHotelGroupViewRequest request = new GetHotelGroupViewRequest
     {
         ResourceNameAsHotelGroupViewName = HotelGroupViewName.FromCustomerHotelGroupView("[CUSTOMER]", "[HOTEL_GROUP_VIEW]"),
     };
     // Make the request
     HotelGroupView response = hotelGroupViewServiceClient.GetHotelGroupView(request);
     // End snippet
 }
        /// <summary>Snippet for GetHotelGroupViewAsync</summary>
        public async Task GetHotelGroupViewResourceNamesAsync()
        {
            // Snippet: GetHotelGroupViewAsync(HotelGroupViewName, CallSettings)
            // Additional: GetHotelGroupViewAsync(HotelGroupViewName, CancellationToken)
            // Create client
            HotelGroupViewServiceClient hotelGroupViewServiceClient = await HotelGroupViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            HotelGroupViewName resourceName = HotelGroupViewName.FromCustomerHotelGroupView("[CUSTOMER]", "[HOTEL_GROUP_VIEW]");
            // Make the request
            HotelGroupView response = await hotelGroupViewServiceClient.GetHotelGroupViewAsync(resourceName);

            // End snippet
        }
Пример #11
0
        public void GetHotelGroupView2()
        {
            Mock <HotelGroupViewService.HotelGroupViewServiceClient> mockGrpcClient = new Mock <HotelGroupViewService.HotelGroupViewServiceClient>(MockBehavior.Strict);
            GetHotelGroupViewRequest request = new GetHotelGroupViewRequest
            {
                ResourceName = new HotelGroupViewName("[CUSTOMER]", "[HOTEL_GROUP_VIEW]").ToString(),
            };
            HotelGroupView expectedResponse = new HotelGroupView
            {
                ResourceName = "resourceName2625949903",
            };

            mockGrpcClient.Setup(x => x.GetHotelGroupView(request, It.IsAny <CallOptions>()))
            .Returns(expectedResponse);
            HotelGroupViewServiceClient client = new HotelGroupViewServiceClientImpl(mockGrpcClient.Object, null);
            HotelGroupView response            = client.GetHotelGroupView(request);

            Assert.AreEqual(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
Пример #12
0
        public async Task GetHotelGroupViewAsync2()
        {
            Mock <HotelGroupViewService.HotelGroupViewServiceClient> mockGrpcClient = new Mock <HotelGroupViewService.HotelGroupViewServiceClient>(MockBehavior.Strict);
            GetHotelGroupViewRequest request = new GetHotelGroupViewRequest
            {
                ResourceName = new HotelGroupViewName("[CUSTOMER]", "[HOTEL_GROUP_VIEW]").ToString(),
            };
            HotelGroupView expectedResponse = new HotelGroupView
            {
                ResourceName = "resourceName2625949903",
            };

            mockGrpcClient.Setup(x => x.GetHotelGroupViewAsync(request, It.IsAny <CallOptions>()))
            .Returns(new Grpc.Core.AsyncUnaryCall <HotelGroupView>(Task.FromResult(expectedResponse), null, null, null, null));
            HotelGroupViewServiceClient client = new HotelGroupViewServiceClientImpl(mockGrpcClient.Object, null);
            HotelGroupView response            = await client.GetHotelGroupViewAsync(request);

            Assert.AreEqual(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }