Example #1
0
        /// <summary>Snippet for GetAsync</summary>
        public async Task GetAsync()
        {
            // Snippet: GetAsync(string, string, string, CallSettings)
            // Additional: GetAsync(string, string, string, CancellationToken)
            // Create client
            MachineTypesClient machineTypesClient = await MachineTypesClient.CreateAsync();

            // Initialize request argument(s)
            string project     = "";
            string zone        = "";
            string machineType = "";
            // Make the request
            MachineType response = await machineTypesClient.GetAsync(project, zone, machineType);

            // End snippet
        }
Example #2
0
        /// <summary>Snippet for GetAsync</summary>
        public async Task GetRequestObjectAsync()
        {
            // Snippet: GetAsync(GetMachineTypeRequest, CallSettings)
            // Additional: GetAsync(GetMachineTypeRequest, CancellationToken)
            // Create client
            MachineTypesClient machineTypesClient = await MachineTypesClient.CreateAsync();

            // Initialize request argument(s)
            GetMachineTypeRequest request = new GetMachineTypeRequest
            {
                Zone        = "",
                Project     = "",
                MachineType = "",
            };
            // Make the request
            MachineType response = await machineTypesClient.GetAsync(request);

            // End snippet
        }