/// <summary>Snippet for CreateApplication</summary>
 public void CreateApplication()
 {
     // Snippet: CreateApplication(string, Application, CallSettings)
     // Create client
     ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.Create();
     // Initialize request argument(s)
     string      parent      = "projects/[PROJECT]/tenants/[TENANT]/profiles/[PROFILE]";
     Application application = new Application();
     // Make the request
     Application response = applicationServiceClient.CreateApplication(parent, application);
     // End snippet
 }
        /// <summary>Snippet for DeleteApplication</summary>
        public void DeleteApplicationResourceNames()
        {
            // Snippet: DeleteApplication(ApplicationName, CallSettings)
            // Create client
            ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.Create();
            // Initialize request argument(s)
            ApplicationName name = ApplicationName.FromProjectTenantProfileApplication("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]");

            // Make the request
            applicationServiceClient.DeleteApplication(name);
            // End snippet
        }
        /// <summary>Snippet for DeleteApplication</summary>
        public void DeleteApplication()
        {
            // Snippet: DeleteApplication(string, CallSettings)
            // Create client
            ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.Create();
            // Initialize request argument(s)
            string name = "projects/[PROJECT]/tenants/[TENANT]/profiles/[PROFILE]/applications/[APPLICATION]";

            // Make the request
            applicationServiceClient.DeleteApplication(name);
            // End snippet
        }
Exemplo n.º 4
0
 /// <summary>Snippet for CreateApplication</summary>
 public void CreateApplicationResourceNames()
 {
     // Snippet: CreateApplication(ProfileName, Application, CallSettings)
     // Create client
     ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.Create();
     // Initialize request argument(s)
     ProfileName parent      = ProfileName.FromProjectTenantProfile("[PROJECT]", "[TENANT]", "[PROFILE]");
     Application application = new Application();
     // Make the request
     Application response = applicationServiceClient.CreateApplication(parent, application);
     // End snippet
 }
 /// <summary>Snippet for GetApplication</summary>
 public void GetApplicationRequestObject()
 {
     // Snippet: GetApplication(GetApplicationRequest, CallSettings)
     // Create client
     ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.Create();
     // Initialize request argument(s)
     GetApplicationRequest request = new GetApplicationRequest
     {
         ApplicationName = ApplicationName.FromProjectTenantProfileApplication("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]"),
     };
     // Make the request
     Application response = applicationServiceClient.GetApplication(request);
     // End snippet
 }
Exemplo n.º 6
0
 /// <summary>Snippet for UpdateApplication</summary>
 public void UpdateApplication_RequestObject()
 {
     // Snippet: UpdateApplication(UpdateApplicationRequest,CallSettings)
     // Create client
     ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.Create();
     // Initialize request argument(s)
     UpdateApplicationRequest request = new UpdateApplicationRequest
     {
         Application = new Application(),
     };
     // Make the request
     Application response = applicationServiceClient.UpdateApplication(request);
     // End snippet
 }
 /// <summary>Snippet for CreateApplication</summary>
 public void CreateApplicationRequestObject()
 {
     // Snippet: CreateApplication(CreateApplicationRequest, CallSettings)
     // Create client
     ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.Create();
     // Initialize request argument(s)
     CreateApplicationRequest request = new CreateApplicationRequest
     {
         ParentAsProfileName = ProfileName.FromProjectTenantProfile("[PROJECT]", "[TENANT]", "[PROFILE]"),
         Application         = new Application(),
     };
     // Make the request
     Application response = applicationServiceClient.CreateApplication(request);
     // End snippet
 }
Exemplo n.º 8
0
        /// <summary>Snippet for DeleteApplication</summary>
        public void DeleteApplication_RequestObject()
        {
            // Snippet: DeleteApplication(DeleteApplicationRequest,CallSettings)
            // Create client
            ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.Create();
            // Initialize request argument(s)
            DeleteApplicationRequest request = new DeleteApplicationRequest
            {
                ApplicationName = new ApplicationName("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]"),
            };

            // Make the request
            applicationServiceClient.DeleteApplication(request);
            // End snippet
        }
        /// <summary>Snippet for ListApplications</summary>
        public void ListApplicationsRequestObject()
        {
            // Snippet: ListApplications(ListApplicationsRequest, CallSettings)
            // Create client
            ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.Create();
            // Initialize request argument(s)
            ListApplicationsRequest request = new ListApplicationsRequest
            {
                ParentAsProfileName = ProfileName.FromProjectTenantProfile("[PROJECT]", "[TENANT]", "[PROFILE]"),
            };
            // Make the request
            PagedEnumerable <ListApplicationsResponse, Application> response = applicationServiceClient.ListApplications(request);

            // Iterate over all response items, lazily performing RPCs as required
            foreach (Application item in response)
            {
                // Do something with each item
                Console.WriteLine(item);
            }

            // Or iterate over pages (of server-defined size), performing one RPC per page
            foreach (ListApplicationsResponse page in response.AsRawResponses())
            {
                // Do something with each page of items
                Console.WriteLine("A page of results:");
                foreach (Application item in page)
                {
                    // Do something with each item
                    Console.WriteLine(item);
                }
            }

            // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
            int pageSize = 10;
            Page <Application> singlePage = response.ReadPage(pageSize);

            // Do something with the page of items
            Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
            foreach (Application item in singlePage)
            {
                // Do something with each item
                Console.WriteLine(item);
            }
            // Store the pageToken, for when the next page is required.
            string nextPageToken = singlePage.NextPageToken;
            // End snippet
        }