コード例 #1
0
        /// <summary>Snippet for CreatePredictionApiKeyRegistrationAsync</summary>
        public async Task CreatePredictionApiKeyRegistrationAsync()
        {
            // Snippet: CreatePredictionApiKeyRegistrationAsync(string, PredictionApiKeyRegistration, CallSettings)
            // Additional: CreatePredictionApiKeyRegistrationAsync(string, PredictionApiKeyRegistration, CancellationToken)
            // Create client
            PredictionApiKeyRegistryClient predictionApiKeyRegistryClient = await PredictionApiKeyRegistryClient.CreateAsync();

            // Initialize request argument(s)
            string parent = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/eventStores/[EVENT_STORE]";
            PredictionApiKeyRegistration predictionApiKeyRegistration = new PredictionApiKeyRegistration();
            // Make the request
            PredictionApiKeyRegistration response = await predictionApiKeyRegistryClient.CreatePredictionApiKeyRegistrationAsync(parent, predictionApiKeyRegistration);

            // End snippet
        }
コード例 #2
0
        /// <summary>Snippet for CreatePredictionApiKeyRegistrationAsync</summary>
        public async Task CreatePredictionApiKeyRegistrationResourceNamesAsync()
        {
            // Snippet: CreatePredictionApiKeyRegistrationAsync(EventStoreName, PredictionApiKeyRegistration, CallSettings)
            // Additional: CreatePredictionApiKeyRegistrationAsync(EventStoreName, PredictionApiKeyRegistration, CancellationToken)
            // Create client
            PredictionApiKeyRegistryClient predictionApiKeyRegistryClient = await PredictionApiKeyRegistryClient.CreateAsync();

            // Initialize request argument(s)
            EventStoreName parent = EventStoreName.FromProjectLocationCatalogEventStore("[PROJECT]", "[LOCATION]", "[CATALOG]", "[EVENT_STORE]");
            PredictionApiKeyRegistration predictionApiKeyRegistration = new PredictionApiKeyRegistration();
            // Make the request
            PredictionApiKeyRegistration response = await predictionApiKeyRegistryClient.CreatePredictionApiKeyRegistrationAsync(parent, predictionApiKeyRegistration);

            // End snippet
        }
コード例 #3
0
        /// <summary>Snippet for CreatePredictionApiKeyRegistrationAsync</summary>
        public async Task CreatePredictionApiKeyRegistrationRequestObjectAsync()
        {
            // Snippet: CreatePredictionApiKeyRegistrationAsync(CreatePredictionApiKeyRegistrationRequest, CallSettings)
            // Additional: CreatePredictionApiKeyRegistrationAsync(CreatePredictionApiKeyRegistrationRequest, CancellationToken)
            // Create client
            PredictionApiKeyRegistryClient predictionApiKeyRegistryClient = await PredictionApiKeyRegistryClient.CreateAsync();

            // Initialize request argument(s)
            CreatePredictionApiKeyRegistrationRequest request = new CreatePredictionApiKeyRegistrationRequest
            {
                ParentAsEventStoreName       = EventStoreName.FromProjectLocationCatalogEventStore("[PROJECT]", "[LOCATION]", "[CATALOG]", "[EVENT_STORE]"),
                PredictionApiKeyRegistration = new PredictionApiKeyRegistration(),
            };
            // Make the request
            PredictionApiKeyRegistration response = await predictionApiKeyRegistryClient.CreatePredictionApiKeyRegistrationAsync(request);

            // End snippet
        }