// [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>();


            DetectIntentTexts.RegisterCommands(verbMap);
            DetectIntentStream.RegisterCommands(verbMap);
            DetectIntentTexttospeechResponse.RegisterCommands(verbMap);
            DetectIntentAudioFile.RegisterCommands(verbMap);
            IntentManagement.RegisterCommands(verbMap);

            verbMap.NotParsedFunc = (err) => 1;

            return((int)verbMap.Run(args));
        }
        public static int Main(string[] args)
        {
            var verbMap = new VerbMap <object>();

            DetectIntentTexts.RegisterCommands(verbMap);
            ContextManagement.RegisterCommands(verbMap);
            IntentManagement.RegisterCommands(verbMap);
            EntityManagement.RegisterCommands(verbMap);
            EntityTypeManagement.RegisterCommands(verbMap);
            SessionEntityTypeManagement.RegisterCommands(verbMap);

            verbMap.NotParsedFunc = (err) => 1;

            return((int)verbMap.Run(args));
        }
Beispiel #4
0
        public static int Main(string[] args)
        {
            var verbMap = new VerbMap <int>()
                          .Add((ListPoliciesOptions opts) => ListAlertPolicies(opts.ProjectId))
                          .Add((BackupPoliciesOptions opts) => BackupPolicies(opts.ProjectId, opts.OutputFilePath))
                          .Add((RestorePoliciesOptions opts) => RestorePolicies(opts.ProjectId, opts.OutputFilePath))
                          .Add((ReplaceChannelsOptions opts) => ReplaceChannels(opts.ProjectId, opts.AlertId, opts.ChannelId))
                          .Add((EnablePoliciesOptions opts) => EnablePolicies(opts.ProjectId, opts.Filter, true))
                          .Add((DisablePoliciesOptions opts) => EnablePolicies(opts.ProjectId, opts.Filter, false))
                          .Add((DeleteAlertPolicyOptions opts) => DeleteAlertPolicy(opts.PolicyName))
                          .Add((ListChannelsOptions opts) => ListNotificationChannels(opts.ProjectId))
                          .Add((DeleteNotificationChannelOptions opts) => DeleteNotificationChannel(opts.ChannelName, opts.Force))
                          .SetNotParsedFunc((errs) => 1);

            return(verbMap.Run(args));
        }
Beispiel #5
0
        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));
        }
Beispiel #6
0
        //[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));
        }
Beispiel #7
0
        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((DetectIntentFromTextsOptions opts) =>
          DetectIntentFromTexts(opts.ProjectId, opts.SessionId, opts.Texts, opts.LanguageCode));
 }
Beispiel #9
0
 public static void RegisterCommands(VerbMap <object> verbMap)
 {
     verbMap
     .Add((DetectIntentFromStreamOptions opts) =>
          DetectIntentFromStreamAsync(opts.ProjectId, opts.SessionId, opts.FilePath).Result);
 }
Beispiel #10
0
 public static void RegisterCommands(VerbMap <object> verbMap)
 {
     verbMap
     .Add((DetectIntentAudioFileOptions opts) =>
          DetectIntentFromAudioFile(opts.ProjectId, opts.SessionId, opts.FilePath, opts.LanguageCode));
 }
Beispiel #11
0
 public static void RegisterCommands(VerbMap <object> verbMap)
 {
     verbMap
     .Add((ImportProductSetOptions opts) => ImportProductSet(opts));
 }
Beispiel #12
0
 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((CreateOptions opts) => Create(opts.ProjectId, opts.DisplayName, opts.Kind))
     .Add((ListOptions opts) => List(opts.ProjectId))
     .Add((DeleteOptions opts) => Delete(opts.ProjectId, opts.EntityTypeId));
 }