public static void RegisterCommands(VerbMap <object> verbMap) { verbMap .Add((CreateOptions opts) => Create(opts.ProjectId, opts.SessionId, opts.EntityTypeDisplayName, opts.EntityValues)) .Add((ListOptions opts) => List(opts.ProjectId, opts.SessionId)) .Add((DeleteOptions opts) => Delete(opts.ProjectId, opts.SessionId, opts.EntityTypeDisplayName)); }
static int Main(string[] args) { var verbMap = new VerbMap <int>(); verbMap .Add((Verb1 v1) => Console.WriteLine("You invoked Verb1!")) .Add((Verb2 v2) => Console.WriteLine("You invoked Verb2!")) .Add((Verb3 v3) => Console.WriteLine("You invoked Verb3!")) .Add((Verb4 v4) => Console.WriteLine("You invoked Verb4!")) .Add((Verb5 v5) => { Console.WriteLine("You invoked Verb5! It returns 5."); return(5); }) .Add((Verb6 v6) => Console.WriteLine("You invoked Verb6!")) .Add((Verb7 v7) => Console.WriteLine("You invoked Verb7!")) .Add((Verb8 v8) => Console.WriteLine("You invoked Verb8!")) .Add((Verb9 v9) => Console.WriteLine("You invoked Verb9!")) .Add((Verb10 v10) => Console.WriteLine("You invoked Verb10!")) .Add((Verb11 v11) => Console.WriteLine("You invoked Verb11!")) .Add((Verb12 v12) => Console.WriteLine("You invoked Verb12!")) .Add((Verb13 v13) => Console.WriteLine("You invoked Verb13!")) .Add((Verb14 v14) => Console.WriteLine("You invoked Verb14!")) .Add((Verb15 v15) => Console.WriteLine("You invoked Verb15!")) .Add((Verb16 v16) => Console.WriteLine("You invoked Verb16!")) .Add((Verb17 v17) => Console.WriteLine("You invoked Verb17!")) .NotParsedFunc = (err) => 255; return(verbMap.Run(args)); }
public static void RegisterCommands(VerbMap <object> verbMap) { verbMap .Add((AddProductToProductSetOptions opts) => AddProductToProductSet(opts)) .Add((ListProductsInProductSetOptions opts) => ListProductsInProductSet(opts)) .Add((RemoveProductFromProductSetOptions opts) => RemoveProductFromProductSet(opts)); }
public static void RegisterCommands(VerbMap <object> verbMap) { verbMap .Add((CreateOptions opts) => Create(opts.ProjectId, opts.DisplayName, opts.MessageText, opts.TrainingPhrasesParts)) .Add((ListOptions opts) => List(opts.ProjectId)) .Add((DeleteOptions opts) => Delete(opts.ProjectId, opts.IntentId)); }
public static int Main(string[] args) { var verbMap = new VerbMap <object>(); verbMap .Add((CreateRegistryOptions opts) => CreateRegistry( opts.projectId, opts.regionId, opts.registryId, opts.pubsubTopic)) .Add((CreateRsaDeviceOptions opts) => CreateRsaDevice( opts.projectId, opts.regionId, opts.registryId, opts.deviceId, opts.certificiatePath)) .Add((DeleteRegistryOptions opts) => DeleteRegistry( opts.projectId, opts.regionId, opts.registryId)) .Add((DeleteDeviceOptions opts) => DeleteDevice( opts.projectId, opts.regionId, opts.registryId, opts.deviceId)) .Add((SendCommandOptions opts) => SendCommand( opts.deviceId, opts.projectId, opts.regionId, opts.registryId, opts.command)) .Add((MqttExampleOptions opts) => StartMqtt( opts.projectId, opts.regionId, opts.registryId, opts.deviceId, opts.private_key_file, opts.algorithm, opts.caCert, opts.numMessages, opts.messageType, opts.mqttBridgeHostname, opts.mqttBridgePort, opts.jwtExpiresMinutes, opts.waitTime)) .NotParsedFunc = (err) => 1; return((int)verbMap.Run(args)); }
public static int Main(string[] args) { var verbMap = new VerbMap <object>(); verbMap .Add((ListTenantsOptions opts) => ListTenantsSample.ListTenants( opts.ProjectId)) .Add((CreateCompanyOptions opts) => CreateCompanySample.CreateCompany(opts.ProjectId, opts.TenantId, opts.DisplayName, opts.CompanyExternalId)) .Add((GetCommpanyOptions opts) => GetCompanySample.GetCompany(opts.ProjectId, opts.TenantId, opts.CompanyId)) .Add((ListCompaniesOptions opts) => ListCompaniesSample.ListCompanies(opts.ProjectId, opts.TenantId)) .Add((CreateTenantOptions opts) => CreateTenantSample.CreateTenant(opts.ProjectId, opts.TenantExternalId)) .Add((GetTenantOptions opts) => GetTenantSample.GetTenant(opts.ProjectId, opts.TenantId)) .Add((DeleteTenantOptions opts) => DeleteTenantSample.DeleteTenant(opts.ProjectId, opts.TenantId)) .Add((DeleteCompanyOptions opts) => DeleteCompanySample.DeleteCompany(opts.ProjectId, opts.TenantId, opts.CompanyId)) .Add((CreateJobOptions opts) => CreateJobSample.CreateJob(opts.ProjectId, opts.TenantId, opts.CompanyId, opts.RequisitionId, opts.JobApplicationUrl)) .Add((ListJobsOptions opts) => ListJobsSample.ListJobs(opts.ProjectId, opts.TenantId, opts.Filter)) .Add((GetJobOptions opts) => GetJobSample.GetJob(opts.ProjectId, opts.TenantId, opts.JobId)) .Add((DeleteJobOptions opts) => DeleteJobSample.DeleteJob(opts.ProjectId, opts.TenantId, opts.JobId)) .Add((CreateClientEventOptions opts) => CreateClientEventSample.CreateClientEvent(opts.ProjectId, opts.TenantId, opts.RequestId, opts.EventId, opts.JobIDs)) .Add((CreateJobCustomAttributesOptions opts) => CreateJobCustomAttributesSample.CreateJobCustomAttributes(opts.ProjectId, opts.TenantId, opts.CompanyId, opts.RequisitionId)) .Add((CustomRankingSearchOptions opts) => CustomRankingSearchSample.CustomRankingSearch(opts.ProjectId, opts.TenantId)) .Add((CommuteSearchJobsOptions opts) => CommuteSearchJobsSample.CommuteSearchJobs(opts.ProjectId, opts.TenantId)) .Add((HistogramSearchJobsOptions opts) => HistogramSearch.HistogramSearchJobs(opts.ProjectId, opts.TenantId, opts.Query)) .Add((AutoCompleteJobTitleOptions opts) => AutoCompleteJobTitleSample.CompleteQuery(opts.ProjectId, opts.TenantId, opts.Query)) .NotParsedFunc = (err) => 1; return((int)verbMap.Run(args)); }
public static void RegisterCommands(VerbMap <object> verbMap) { verbMap .Add((CreateOptions opts) => Create(opts.ProjectId, opts.SessionId, opts.ContextId, opts.LifespanCount)) .Add((ListOptions opts) => List(opts.ProjectId, opts.SessionId)) .Add((DeleteOptions opts) => Delete(opts.ProjectId, opts.SessionId, opts.ContextId)); }
public static void RegisterCommands(VerbMap<object> verbMap) { verbMap .Add((CreateProductSetsOptions opts) => CreateProductSet(opts)) .Add((ListProductSetsOptions opts) => ListProductsSet(opts)) .Add((GetProductSetOptions opts) => GetProductSet(opts)) .Add((DeleteProductSetOptions opts) => DeleteProductSet(opts)); }
public static void RegisterCommands(VerbMap <object> verbMap) { verbMap .Add((CreateReferenceImageOptions opts) => CreateReferenceImage(opts)) .Add((ListReferenceImagesOptions opts) => ListReferenceImagesOfProduct(opts)) .Add((GetReferenceImageOptions opts) => GetReferenceImage(opts)) .Add((DeleteReferenceImageOptions opts) => DeleteReferenceImage(opts)); }
public static void RegisterCommands(VerbMap <object> verbMap) { verbMap.Add((CreateOptions opts) => Create(opts.ProjectId, opts.DisplayName, opts.Kind)) .Add((ListOptions opts) => List(opts.ProjectId)) .Add((DeleteOptions opts) => opts.EntityTypeId.Count() == 1 ? Delete(opts.ProjectId, opts.EntityTypeId.First()) : BatchDelete(opts.ProjectId, opts.EntityTypeId)); }
public static void RegisterCommands(VerbMap <object> verbMap) { verbMap .Add((CreateProductOptions opts) => CreateProduct(opts)) .Add((ListProductsOptions opts) => ListProducts(opts)) .Add((GetProductOptions opts) => GetProduct(opts)) .Add((UpdateProductLabelsOptions opts) => UpdateProductLabels(opts)) .Add((DeleteProductOptions opts) => DeleteProduct(opts)) .Add((PurgeOrphanProductsOptions opts) => PurgeOrphanProducts(opts)); }
// [END monitoring_uptime_check_get] public static int Main(string[] args) { var verbMap = new VerbMap <int>(); verbMap .Add((CreateOptions opts) => CreateUptimeCheck(opts.ProjectId, opts.HostName, opts.DisplayName)) .Add((DeleteOptions opts) => DeleteUptimeCheckConfig(opts.ConfigName)) .Add((ListOptions opts) => ListUptimeCheckConfigs(opts.ProjectId)) .Add((ListIpsOptions opts) => ListUptimeCheckIps()) .Add((GetOptions opts) => GetUptimeCheckConfig(opts.ConfigName)) .Add((UpdateOptions opts) => UpdateUptimeCheck(opts.ConfigName, opts.HttpPath, opts.DisplayName)) .NotParsedFunc = (err) => 255; return(verbMap.Run(args)); }
public static int Main(string[] args) { var verbMap = new VerbMap <object>(); verbMap .Add((ListTenantsOptions opts) => ListTenantsSample.ListTenants( opts.ProjectId)) .Add((CreateCompanyOptions opts) => CreateCompanySample.CreateCompany(opts.ProjectId, opts.TenantId, opts.DisplayName, opts.CompanyExternalId)) .Add((GetCommpanyOptions opts) => GetCompanySample.GetCompany(opts.ProjectId, opts.TenantId, opts.CompanyId)) .Add((ListCompaniesOptions opts) => ListCompaniesSample.ListCompanies(opts.ProjectId, opts.TenantId)) .Add((CreateTenantOptions opts) => CreateTenantSample.CreateTenant(opts.ProjectId, opts.TenantExternalId)) .Add((GetTenantOptions opts) => GetTenantSample.GetTenant(opts.ProjectId, opts.TenantId)) .Add((DeleteTenantOptions opts) => DeleteTenantSample.DeleteTenant(opts.ProjectId, opts.TenantId)) .Add((DeleteCompanyOptions opts) => DeleteCompanySample.DeleteCompany(opts.ProjectId, opts.TenantId, opts.CompanyId)) .NotParsedFunc = (err) => 1; return((int)verbMap.Run(args)); }
//[END iot_send_command] public static int Main(string[] args) { var verbMap = new VerbMap <object>(); verbMap .Add((CreateRegistryOptions opts) => CreateRegistry( opts.projectId, opts.regionId, opts.registryId, opts.pubsubTopic)) .Add((DeleteRegistryOptions opts) => DeleteRegistry( opts.projectId, opts.regionId, opts.registryId)) .Add((GetRegistryOptions opts) => GetRegistry( opts.projectId, opts.regionId, opts.registryId)) .Add((ListRegistryOptions opts) => ListRegistries( opts.projectId, opts.regionId)) .Add((CreateDeviceOptions opts) => CreateUnauthDevice( opts.projectId, opts.regionId, opts.registryId, opts.deviceId)) .Add((CreateEsDeviceOptions opts) => CreateEsDevice( opts.projectId, opts.regionId, opts.registryId, opts.deviceId, opts.certificiatePath)) .Add((CreateRsaDeviceOptions opts) => CreateRsaDevice( opts.projectId, opts.regionId, opts.registryId, opts.deviceId, opts.certificiatePath)) .Add((DeleteDeviceOptions opts) => DeleteDevice( opts.projectId, opts.regionId, opts.registryId, opts.deviceId)) .Add((GetDeviceOptions opts) => GetDevice( opts.projectId, opts.regionId, opts.registryId, opts.deviceId)) .Add((GetDeviceConfigsOptions opts) => GetDeviceConfigurations( opts.projectId, opts.regionId, opts.registryId, opts.deviceId)) .Add((GetIamPolicyOptions opts) => GetIamPolicy( opts.projectId, opts.regionId, opts.registryId)) .Add((ListDevicesOptions opts) => ListDevices( opts.projectId, opts.regionId, opts.registryId)) .Add((PatchEsDeviceOptions opts) => PatchEsDevice( opts.projectId, opts.regionId, opts.registryId, opts.deviceId, opts.certificiatePath)) .Add((PatchRsaDeviceOptions opts) => PatchRsaDevice( opts.projectId, opts.regionId, opts.registryId, opts.deviceId, opts.certificiatePath)) .Add((SetDeviceConfigOptions opts) => SetDeviceConfig( opts.projectId, opts.regionId, opts.registryId, opts.deviceId, opts.data)) .Add((SetIamPolicyOptions opts) => SetIamPolicy( opts.projectId, opts.regionId, opts.registryId, opts.role, opts.member)) .Add((SendCommandOptions opts) => SendCommand( opts.deviceId, opts.projectId, opts.regionId, opts.registryId, opts.command)) .NotParsedFunc = (err) => 1; return((int)verbMap.Run(args)); }
public static int Main(string[] args) { var verbMap = new VerbMap <object>(); verbMap .Add((ListenForConfigMessagesOptions opts) => ListenForConfigMessages( opts.projectId, opts.regionId, opts.registryId, opts.deviceId, opts.gatewayId, opts.numMsgs, opts.privateKeyPath, opts.algorithm, opts.ca_certs, "mqtt.googleapis.com", 8883, opts.jwtExpTime, opts.listenTime)) .Add((SendDataFromBoundDeviceOptions opts) => SendDataFromBoundDevice( opts.projectId, opts.regionId, opts.registryId, opts.deviceId, opts.gatewayId, opts.privateKeyPath, opts.algorithm, opts.ca_certs, "mqtt.googleapis.com", 8883, opts.jwtExpTime, opts.messageType, opts.data)) .Add((MqttExampleOptions opts) => StartMqtt( opts.projectId, opts.regionId, opts.registryId, opts.deviceId, opts.private_key_file, opts.algorithm, opts.caCert, opts.numMessages, opts.messageType, opts.mqttBridgeHostname, opts.mqttBridgePort, opts.jwtExpiresMinutes, opts.waitTime)) .NotParsedFunc = (err) => 1; return((int)verbMap.Run(args)); }
public static void RegisterCommands(VerbMap <object> verbMap) { verbMap .Add((DetectIntentAudioFileOptions opts) => DetectIntentFromAudioFile(opts.ProjectId, opts.SessionId, opts.FilePath, opts.LanguageCode)); }
public static void RegisterCommands(VerbMap <object> verbMap) { verbMap .Add((GetSimilarProductsOptions opts) => GetSimilarProductsFile(opts)) .Add((GetSimilarProductsGcsOptions opts) => GetSimilarProductsGcs(opts)); }
public static void RegisterCommands(VerbMap <object> verbMap) { verbMap .Add((DetectIntentFromTextsOptions opts) => DetectIntentFromTexts(opts.ProjectId, opts.SessionId, opts.Texts, opts.LanguageCode)); }
public static void RegisterCommands(VerbMap <object> verbMap) { verbMap .Add((DetectIntentFromStreamOptions opts) => DetectIntentFromStreamAsync(opts.ProjectId, opts.SessionId, opts.FilePath).Result); }
public static void RegisterCommands(VerbMap <object> verbMap) { verbMap .Add((ImportProductSetOptions opts) => ImportProductSet(opts)); }