/// <summary>Snippet for GetEntryGroup</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetEntryGroup1ResourceNames()
 {
     // Create client
     DataCatalogClient dataCatalogClient = DataCatalogClient.Create();
     // Initialize request argument(s)
     EntryGroupName name = EntryGroupName.FromProjectLocationEntryGroup("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
     // Make the request
     EntryGroup response = dataCatalogClient.GetEntryGroup(name);
 }
예제 #2
0
        /// <summary>Snippet for DeleteEntryGroupAsync</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 DeleteEntryGroupResourceNamesAsync()
        {
            // Create client
            DataCatalogClient dataCatalogClient = await DataCatalogClient.CreateAsync();

            // Initialize request argument(s)
            EntryGroupName name = EntryGroupName.FromProjectLocationEntryGroup("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
            // Make the request
            await dataCatalogClient.DeleteEntryGroupAsync(name);
        }
 /// <summary>Snippet for CreateEntry</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void CreateEntryResourceNames()
 {
     // Create client
     DataCatalogClient dataCatalogClient = DataCatalogClient.Create();
     // Initialize request argument(s)
     EntryGroupName parent  = EntryGroupName.FromProjectLocationEntryGroup("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
     string         entryId = "";
     Entry          entry   = new Entry();
     // Make the request
     Entry response = dataCatalogClient.CreateEntry(parent, entryId, entry);
 }
예제 #4
0
        /// <summary>Snippet for GetEntryGroupAsync</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 GetEntryGroup2ResourceNamesAsync()
        {
            // Create client
            DataCatalogClient dataCatalogClient = await DataCatalogClient.CreateAsync();

            // Initialize request argument(s)
            EntryGroupName name     = EntryGroupName.FromProjectLocationEntryGroup("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
            FieldMask      readMask = new FieldMask();
            // Make the request
            EntryGroup response = await dataCatalogClient.GetEntryGroupAsync(name, readMask);
        }
 /// <summary>Snippet for GetEntryGroup</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetEntryGroupRequestObject()
 {
     // Create client
     DataCatalogClient dataCatalogClient = DataCatalogClient.Create();
     // Initialize request argument(s)
     GetEntryGroupRequest request = new GetEntryGroupRequest
     {
         EntryGroupName = EntryGroupName.FromProjectLocationEntryGroup("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]"),
         ReadMask       = new FieldMask(),
     };
     // Make the request
     EntryGroup response = dataCatalogClient.GetEntryGroup(request);
 }
        /// <summary>Snippet for DeleteEntryGroup</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public void DeleteEntryGroupRequestObject()
        {
            // Create client
            DataCatalogClient dataCatalogClient = DataCatalogClient.Create();
            // Initialize request argument(s)
            DeleteEntryGroupRequest request = new DeleteEntryGroupRequest
            {
                EntryGroupName = EntryGroupName.FromProjectLocationEntryGroup("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]"),
                Force          = false,
            };

            // Make the request
            dataCatalogClient.DeleteEntryGroup(request);
        }
 /// <summary>Snippet for CreateEntry</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void CreateEntryRequestObject()
 {
     // Create client
     DataCatalogClient dataCatalogClient = DataCatalogClient.Create();
     // Initialize request argument(s)
     CreateEntryRequest request = new CreateEntryRequest
     {
         ParentAsEntryGroupName = EntryGroupName.FromProjectLocationEntryGroup("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]"),
         Entry   = new Entry(),
         EntryId = "",
     };
     // Make the request
     Entry response = dataCatalogClient.CreateEntry(request);
 }
        /// <summary>Snippet for ListEntriesAsync</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 ListEntriesRequestObjectAsync()
        {
            // Create client
            DataCatalogClient dataCatalogClient = await DataCatalogClient.CreateAsync();

            // Initialize request argument(s)
            ListEntriesRequest request = new ListEntriesRequest
            {
                ParentAsEntryGroupName = EntryGroupName.FromProjectLocationEntryGroup("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]"),
                ReadMask = new FieldMask(),
            };
            // Make the request
            PagedAsyncEnumerable <ListEntriesResponse, Entry> response = dataCatalogClient.ListEntriesAsync(request);

            // Iterate over all response items, lazily performing RPCs as required
            await response.ForEachAsync((Entry item) =>
            {
                // Do something with each item
                Console.WriteLine(item);
            });

            // Or iterate over pages (of server-defined size), performing one RPC per page
            await response.AsRawResponses().ForEachAsync((ListEntriesResponse page) =>
            {
                // Do something with each page of items
                Console.WriteLine("A page of results:");
                foreach (Entry 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 <Entry> singlePage = await response.ReadPageAsync(pageSize);

            // Do something with the page of items
            Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
            foreach (Entry 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;
        }
예제 #9
0
        /// <summary>Snippet for ListEntries</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public void ListEntriesResourceNames()
        {
            // Create client
            DataCatalogClient dataCatalogClient = DataCatalogClient.Create();
            // Initialize request argument(s)
            EntryGroupName parent = EntryGroupName.FromProjectLocationEntryGroup("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
            // Make the request
            PagedEnumerable <ListEntriesResponse, Entry> response = dataCatalogClient.ListEntries(parent);

            // Iterate over all response items, lazily performing RPCs as required
            foreach (Entry 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 (ListEntriesResponse page in response.AsRawResponses())
            {
                // Do something with each page of items
                Console.WriteLine("A page of results:");
                foreach (Entry 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 <Entry> 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 (Entry 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;
        }