/// <summary>Snippet for CreateCompanyAsync</summary>
        public async Task CreateCompanyAsync()
        {
            // Snippet: CreateCompanyAsync(TenantOrProjectNameOneof,Company,CallSettings)
            // Additional: CreateCompanyAsync(TenantOrProjectNameOneof,Company,CancellationToken)
            // Create client
            CompanyServiceClient companyServiceClient = await CompanyServiceClient.CreateAsync();

            // Initialize request argument(s)
            TenantOrProjectNameOneof parent = TenantOrProjectNameOneof.From(new TenantName("[PROJECT]", "[TENANT]"));
            Company company = new Company();
            // Make the request
            Company response = await companyServiceClient.CreateCompanyAsync(parent, company);

            // End snippet
        }
        /// <summary>Snippet for CreateCompanyAsync</summary>
        public async Task CreateCompanyResourceNames2Async()
        {
            // Snippet: CreateCompanyAsync(ProjectName, Company, CallSettings)
            // Additional: CreateCompanyAsync(ProjectName, Company, CancellationToken)
            // Create client
            CompanyServiceClient companyServiceClient = await CompanyServiceClient.CreateAsync();

            // Initialize request argument(s)
            ProjectName parent  = ProjectName.FromProject("[PROJECT]");
            Company     company = new Company();
            // Make the request
            Company response = await companyServiceClient.CreateCompanyAsync(parent, company);

            // End snippet
        }
        /// <summary>Snippet for CreateCompanyAsync</summary>
        public async Task CreateCompanyAsync()
        {
            // Snippet: CreateCompanyAsync(string, Company, CallSettings)
            // Additional: CreateCompanyAsync(string, Company, CancellationToken)
            // Create client
            CompanyServiceClient companyServiceClient = await CompanyServiceClient.CreateAsync();

            // Initialize request argument(s)
            string  parent  = "projects/[PROJECT]/tenants/[TENANT]";
            Company company = new Company();
            // Make the request
            Company response = await companyServiceClient.CreateCompanyAsync(parent, company);

            // End snippet
        }
예제 #4
0
        /// <summary>Snippet for CreateCompanyAsync</summary>
        public async Task CreateCompanyAsync()
        {
            // Snippet: CreateCompanyAsync(string,Company,CallSettings)
            // Additional: CreateCompanyAsync(string,Company,CancellationToken)
            // Create client
            CompanyServiceClient companyServiceClient = await CompanyServiceClient.CreateAsync();

            // Initialize request argument(s)
            string  formattedParent = new ProjectName("[PROJECT]").ToString();
            Company company         = new Company();
            // Make the request
            Company response = await companyServiceClient.CreateCompanyAsync(formattedParent, company);

            // End snippet
        }
        /// <summary>Snippet for CreateCompanyAsync</summary>
        public async Task CreateCompanyAsync_RequestObject()
        {
            // Snippet: CreateCompanyAsync(CreateCompanyRequest,CallSettings)
            // Additional: CreateCompanyAsync(CreateCompanyRequest,CancellationToken)
            // Create client
            CompanyServiceClient companyServiceClient = await CompanyServiceClient.CreateAsync();

            // Initialize request argument(s)
            CreateCompanyRequest request = new CreateCompanyRequest
            {
                ParentAsTenantOrProjectNameOneof = TenantOrProjectNameOneof.From(new TenantName("[PROJECT]", "[TENANT]")),
                Company = new Company(),
            };
            // Make the request
            Company response = await companyServiceClient.CreateCompanyAsync(request);

            // End snippet
        }