Exemple #1
0
        /// <summary>Snippet for CreatePhoneNumberInstanceAsync</summary>
        public async Task CreatePhoneNumberInstanceAsync()
        {
            // Snippet: CreatePhoneNumberInstanceAsync(string, PhoneNumberInstance, CallSettings)
            // Additional: CreatePhoneNumberInstanceAsync(string, PhoneNumberInstance, CancellationToken)
            // Create client
            PhoneNumberInstancesClient phoneNumberInstancesClient = await PhoneNumberInstancesClient.CreateAsync();

            // Initialize request argument(s)
            string parent = "projects/[PROJECT]";
            PhoneNumberInstance phoneNumberInstance = new PhoneNumberInstance();
            // Make the request
            PhoneNumberInstance response = await phoneNumberInstancesClient.CreatePhoneNumberInstanceAsync(parent, phoneNumberInstance);

            // End snippet
        }
Exemple #2
0
        /// <summary>Snippet for CreatePhoneNumberInstanceAsync</summary>
        public async Task CreatePhoneNumberInstanceResourceNamesAsync()
        {
            // Snippet: CreatePhoneNumberInstanceAsync(ProjectName, PhoneNumberInstance, CallSettings)
            // Additional: CreatePhoneNumberInstanceAsync(ProjectName, PhoneNumberInstance, CancellationToken)
            // Create client
            PhoneNumberInstancesClient phoneNumberInstancesClient = await PhoneNumberInstancesClient.CreateAsync();

            // Initialize request argument(s)
            ProjectName         parent = ProjectName.FromProject("[PROJECT]");
            PhoneNumberInstance phoneNumberInstance = new PhoneNumberInstance();
            // Make the request
            PhoneNumberInstance response = await phoneNumberInstancesClient.CreatePhoneNumberInstanceAsync(parent, phoneNumberInstance);

            // End snippet
        }
Exemple #3
0
        /// <summary>Snippet for CreatePhoneNumberInstanceAsync</summary>
        public async Task CreatePhoneNumberInstanceRequestObjectAsync()
        {
            // Snippet: CreatePhoneNumberInstanceAsync(CreatePhoneNumberInstanceRequest, CallSettings)
            // Additional: CreatePhoneNumberInstanceAsync(CreatePhoneNumberInstanceRequest, CancellationToken)
            // Create client
            PhoneNumberInstancesClient phoneNumberInstancesClient = await PhoneNumberInstancesClient.CreateAsync();

            // Initialize request argument(s)
            CreatePhoneNumberInstanceRequest request = new CreatePhoneNumberInstanceRequest
            {
                ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
                PhoneNumberInstance = new PhoneNumberInstance(),
            };
            // Make the request
            PhoneNumberInstance response = await phoneNumberInstancesClient.CreatePhoneNumberInstanceAsync(request);

            // End snippet
        }