Exemplo n.º 1
0
        public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems)
        {
            AmazonLexModelBuildingServiceConfig config = new AmazonLexModelBuildingServiceConfig();

            config.RegionEndpoint = region;
            ConfigureClient(config);
            AmazonLexModelBuildingServiceClient client = new AmazonLexModelBuildingServiceClient(creds, config);

            GetSlotTypesResponse resp = new GetSlotTypesResponse();

            do
            {
                GetSlotTypesRequest req = new GetSlotTypesRequest
                {
                    NextToken = resp.NextToken
                    ,
                    MaxResults = maxItems
                };

                resp = client.GetSlotTypes(req);
                CheckError(resp.HttpStatusCode, "200");

                foreach (var obj in resp.SlotTypes)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.NextToken));
        }
Exemplo n.º 2
0
        public void LexModelBuildingServiceGetSlotTypes()
        {
            #region to-get-a-list-of-slot-types-1494432757458

            var client   = new AmazonLexModelBuildingServiceClient();
            var response = client.GetSlotTypes(new GetSlotTypesRequest
            {
                MaxResults = 10,
                NextToken  = ""
            });

            List <SlotTypeMetadata> slotTypes = response.SlotTypes;

            #endregion
        }