From f5bec9a07d2ca97ae8f2e285ec397d2560d7ec9b Mon Sep 17 00:00:00 2001 From: Takashi Oguma Date: Wed, 18 Sep 2024 15:49:27 +0900 Subject: [PATCH] treat x-soracom-cli-pagination and x-soracom-alternative-cli properly --- generators/cmd/src/gen_leaf_cmd.go | 13 +++++++------ soracom/generated/cmd/audit_logs_api_get.go | 9 +++++++++ soracom/generated/cmd/audit_logs_napter_get.go | 9 +++++++++ soracom/generated/cmd/data_get.go | 9 +++++++++ soracom/generated/cmd/data_get_entries.go | 9 +++++++++ soracom/generated/cmd/data_list_source_resources.go | 9 +++++++++ soracom/generated/cmd/devices_get_data.go | 9 +++++++++ soracom/generated/cmd/devices_list.go | 9 +++++++++ soracom/generated/cmd/devices_list_object_models.go | 9 +++++++++ soracom/generated/cmd/files_find.go | 9 +++++++++ soracom/generated/cmd/files_list.go | 9 +++++++++ soracom/generated/cmd/gadgets_list.go | 9 +++++++++ soracom/generated/cmd/groups_list.go | 9 +++++++++ soracom/generated/cmd/groups_list_subscribers.go | 9 +++++++++ soracom/generated/cmd/logs_get.go | 9 +++++++++ soracom/generated/cmd/lora_devices_get_data.go | 9 +++++++++ soracom/generated/cmd/lora_devices_list.go | 9 +++++++++ soracom/generated/cmd/lora_gateways_list.go | 9 +++++++++ soracom/generated/cmd/lora_network_sets_list.go | 9 +++++++++ .../cmd/lora_network_sets_list_gateways.go | 9 +++++++++ soracom/generated/cmd/orders_list_subscribers.go | 9 +++++++++ soracom/generated/cmd/port_mappings_list.go | 9 +++++++++ soracom/generated/cmd/query_devices.go | 9 +++++++++ soracom/generated/cmd/query_sigfox_devices.go | 9 +++++++++ soracom/generated/cmd/query_sims.go | 9 +++++++++ soracom/generated/cmd/query_subscribers.go | 10 ++++++++++ soracom/generated/cmd/sigfox_devices_get_data.go | 9 +++++++++ soracom/generated/cmd/sigfox_devices_list.go | 9 +++++++++ soracom/generated/cmd/sim_profile_orders_list.go | 9 +++++++++ soracom/generated/cmd/sims_get_data.go | 9 +++++++++ soracom/generated/cmd/sims_list.go | 9 +++++++++ .../cmd/sims_list_packet_capture_sessions.go | 9 +++++++++ soracom/generated/cmd/sims_list_status_history.go | 9 +++++++++ soracom/generated/cmd/sims_session_events.go | 9 +++++++++ .../generated/cmd/sora_cam_devices_events_list.go | 9 +++++++++ .../cmd/sora_cam_devices_events_list_for_device.go | 9 +++++++++ .../cmd/sora_cam_devices_images_list_exports.go | 9 +++++++++ ...ra_cam_devices_images_list_exports_for_device.go | 9 +++++++++ ...devices_recordings_and_events_list_for_device.go | 9 +++++++++ .../cmd/sora_cam_devices_videos_list_exports.go | 9 +++++++++ ...ra_cam_devices_videos_list_exports_for_device.go | 9 +++++++++ soracom/generated/cmd/soralets_get_logs.go | 9 +++++++++ soracom/generated/cmd/soralets_list.go | 9 +++++++++ soracom/generated/cmd/soralets_list_versions.go | 9 +++++++++ soracom/generated/cmd/subscribers_get_data.go | 9 +++++++++ soracom/generated/cmd/subscribers_list.go | 9 +++++++++ soracom/generated/cmd/subscribers_session_events.go | 9 +++++++++ soracom/generated/cmd/vpg_list.go | 9 +++++++++ .../cmd/vpg_list_ip_address_map_entries.go | 9 +++++++++ .../cmd/vpg_list_packet_capture_sessions.go | 9 +++++++++ 50 files changed, 449 insertions(+), 6 deletions(-) diff --git a/generators/cmd/src/gen_leaf_cmd.go b/generators/cmd/src/gen_leaf_cmd.go index d044b64c..73da31d4 100644 --- a/generators/cmd/src/gen_leaf_cmd.go +++ b/generators/cmd/src/gen_leaf_cmd.go @@ -701,13 +701,14 @@ func getXSoracomCliPagination(op *openapi3.Operation) *Pagination { return nil } - jr, ok := paginationRaw.(json.RawMessage) - if !ok { + b, err := json.Marshal(paginationRaw) + if err != nil { + lib.WarnfStderr("invalid x-soracom-cli-pagination: %v (%T)\n", paginationRaw, paginationRaw) return nil } var p Pagination - err := json.Unmarshal(jr, &p) + err = json.Unmarshal(b, &p) if err != nil { lib.WarnfStderr("expected pagination info is defined in `x-soracom-cli-pagination`, but it was not\n") return nil @@ -735,13 +736,13 @@ func getXSoracomAlternativeCli(op *openapi3.Operation) string { return "" } - jr, ok := altCLIRaw.(json.RawMessage) - if !ok { + b, err := json.Marshal(altCLIRaw) + if err != nil { return "" } var altCLI string - err := json.Unmarshal(jr, &altCLI) + err = json.Unmarshal(b, &altCLI) if err != nil { lib.WarnfStderr("expected string in `x-soracom-alternative-cli`, but it was not\n") return "" diff --git a/soracom/generated/cmd/audit_logs_api_get.go b/soracom/generated/cmd/audit_logs_api_get.go index 2934d230..5375e0f1 100644 --- a/soracom/generated/cmd/audit_logs_api_get.go +++ b/soracom/generated/cmd/audit_logs_api_get.go @@ -24,6 +24,9 @@ var AuditLogsApiGetCmdLimit int64 // AuditLogsApiGetCmdToEpochMs holds value of 'to_epoch_ms' option var AuditLogsApiGetCmdToEpochMs int64 +// AuditLogsApiGetCmdPaginate indicates to do pagination or not +var AuditLogsApiGetCmdPaginate bool + // AuditLogsApiGetCmdOutputJSONL indicates to output with jsonl format var AuditLogsApiGetCmdOutputJSONL bool @@ -38,6 +41,8 @@ func InitAuditLogsApiGetCmd() { AuditLogsApiGetCmd.Flags().Int64Var(&AuditLogsApiGetCmdToEpochMs, "to-epoch-ms", 0, TRAPI("End time for the log search range (unixtime milliseconds).")) + AuditLogsApiGetCmd.Flags().BoolVar(&AuditLogsApiGetCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + AuditLogsApiGetCmd.Flags().BoolVar(&AuditLogsApiGetCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) AuditLogsApiGetCmd.RunE = AuditLogsApiGetCmdRunE @@ -107,6 +112,10 @@ func collectAuditLogsApiGetCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForAuditLogsApiGetCmd("/audit_logs/api"), query: buildQueryForAuditLogsApiGetCmd(), + doPagination: AuditLogsApiGetCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/audit_logs_napter_get.go b/soracom/generated/cmd/audit_logs_napter_get.go index 7d8e62b8..ad17bb5c 100644 --- a/soracom/generated/cmd/audit_logs_napter_get.go +++ b/soracom/generated/cmd/audit_logs_napter_get.go @@ -27,6 +27,9 @@ var AuditLogsNapterGetCmdLimit int64 // AuditLogsNapterGetCmdTo holds value of 'to' option var AuditLogsNapterGetCmdTo int64 +// AuditLogsNapterGetCmdPaginate indicates to do pagination or not +var AuditLogsNapterGetCmdPaginate bool + // AuditLogsNapterGetCmdOutputJSONL indicates to output with jsonl format var AuditLogsNapterGetCmdOutputJSONL bool @@ -43,6 +46,8 @@ func InitAuditLogsNapterGetCmd() { AuditLogsNapterGetCmd.Flags().Int64Var(&AuditLogsNapterGetCmdTo, "to", 0, TRAPI("End time for the log search range (unixtime milliseconds).")) + AuditLogsNapterGetCmd.Flags().BoolVar(&AuditLogsNapterGetCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + AuditLogsNapterGetCmd.Flags().BoolVar(&AuditLogsNapterGetCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) AuditLogsNapterGetCmd.RunE = AuditLogsNapterGetCmdRunE @@ -112,6 +117,10 @@ func collectAuditLogsNapterGetCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForAuditLogsNapterGetCmd("/audit_logs/napter"), query: buildQueryForAuditLogsNapterGetCmd(), + doPagination: AuditLogsNapterGetCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/data_get.go b/soracom/generated/cmd/data_get.go index 4ff22cb6..f1463ffd 100644 --- a/soracom/generated/cmd/data_get.go +++ b/soracom/generated/cmd/data_get.go @@ -27,6 +27,9 @@ var DataGetCmdLimit int64 // DataGetCmdTo holds value of 'to' option var DataGetCmdTo int64 +// DataGetCmdPaginate indicates to do pagination or not +var DataGetCmdPaginate bool + // DataGetCmdOutputJSONL indicates to output with jsonl format var DataGetCmdOutputJSONL bool @@ -43,6 +46,8 @@ func InitDataGetCmd() { DataGetCmd.Flags().Int64Var(&DataGetCmdTo, "to", 0, TRAPI("End time for the data entries search range (UNIX time in milliseconds).")) + DataGetCmd.Flags().BoolVar(&DataGetCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + DataGetCmd.Flags().BoolVar(&DataGetCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) DataGetCmd.RunE = DataGetCmdRunE @@ -118,6 +123,10 @@ func collectDataGetCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForDataGetCmd("/subscribers/{imsi}/data"), query: buildQueryForDataGetCmd(), + doPagination: DataGetCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/data_get_entries.go b/soracom/generated/cmd/data_get_entries.go index 5ec27661..6bfed8fc 100644 --- a/soracom/generated/cmd/data_get_entries.go +++ b/soracom/generated/cmd/data_get_entries.go @@ -30,6 +30,9 @@ var DataGetEntriesCmdLimit int64 // DataGetEntriesCmdTo holds value of 'to' option var DataGetEntriesCmdTo int64 +// DataGetEntriesCmdPaginate indicates to do pagination or not +var DataGetEntriesCmdPaginate bool + // DataGetEntriesCmdOutputJSONL indicates to output with jsonl format var DataGetEntriesCmdOutputJSONL bool @@ -48,6 +51,8 @@ func InitDataGetEntriesCmd() { DataGetEntriesCmd.Flags().Int64Var(&DataGetEntriesCmdTo, "to", 0, TRAPI("End time for the data entries search range (UNIX time in milliseconds).")) + DataGetEntriesCmd.Flags().BoolVar(&DataGetEntriesCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + DataGetEntriesCmd.Flags().BoolVar(&DataGetEntriesCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) DataGetEntriesCmd.RunE = DataGetEntriesCmdRunE @@ -129,6 +134,10 @@ func collectDataGetEntriesCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForDataGetEntriesCmd("/data/{resource_type}/{resource_id}"), query: buildQueryForDataGetEntriesCmd(), + doPagination: DataGetEntriesCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/data_list_source_resources.go b/soracom/generated/cmd/data_list_source_resources.go index af397c7b..be458a55 100644 --- a/soracom/generated/cmd/data_list_source_resources.go +++ b/soracom/generated/cmd/data_list_source_resources.go @@ -18,6 +18,9 @@ var DataListSourceResourcesCmdResourceType string // DataListSourceResourcesCmdLimit holds value of 'limit' option var DataListSourceResourcesCmdLimit int64 +// DataListSourceResourcesCmdPaginate indicates to do pagination or not +var DataListSourceResourcesCmdPaginate bool + // DataListSourceResourcesCmdOutputJSONL indicates to output with jsonl format var DataListSourceResourcesCmdOutputJSONL bool @@ -28,6 +31,8 @@ func InitDataListSourceResourcesCmd() { DataListSourceResourcesCmd.Flags().Int64Var(&DataListSourceResourcesCmdLimit, "limit", 0, TRAPI("Maximum number of data entries to retrieve.")) + DataListSourceResourcesCmd.Flags().BoolVar(&DataListSourceResourcesCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + DataListSourceResourcesCmd.Flags().BoolVar(&DataListSourceResourcesCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) DataListSourceResourcesCmd.RunE = DataListSourceResourcesCmdRunE @@ -97,6 +102,10 @@ func collectDataListSourceResourcesCmdParams(ac *apiClient) (*apiParams, error) path: buildPathForDataListSourceResourcesCmd("/data/resources"), query: buildQueryForDataListSourceResourcesCmd(), + doPagination: DataListSourceResourcesCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/devices_get_data.go b/soracom/generated/cmd/devices_get_data.go index b57e9d00..503cdeb0 100644 --- a/soracom/generated/cmd/devices_get_data.go +++ b/soracom/generated/cmd/devices_get_data.go @@ -27,6 +27,9 @@ var DevicesGetDataCmdLimit int64 // DevicesGetDataCmdTo holds value of 'to' option var DevicesGetDataCmdTo int64 +// DevicesGetDataCmdPaginate indicates to do pagination or not +var DevicesGetDataCmdPaginate bool + // DevicesGetDataCmdOutputJSONL indicates to output with jsonl format var DevicesGetDataCmdOutputJSONL bool @@ -43,6 +46,8 @@ func InitDevicesGetDataCmd() { DevicesGetDataCmd.Flags().Int64Var(&DevicesGetDataCmdTo, "to", 0, TRAPI("End time of the target period (UNIX time in milliseconds).")) + DevicesGetDataCmd.Flags().BoolVar(&DevicesGetDataCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + DevicesGetDataCmd.Flags().BoolVar(&DevicesGetDataCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) DevicesGetDataCmd.RunE = DevicesGetDataCmdRunE @@ -118,6 +123,10 @@ func collectDevicesGetDataCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForDevicesGetDataCmd("/devices/{device_id}/data"), query: buildQueryForDevicesGetDataCmd(), + doPagination: DevicesGetDataCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/devices_list.go b/soracom/generated/cmd/devices_list.go index 69142173..94c951cc 100644 --- a/soracom/generated/cmd/devices_list.go +++ b/soracom/generated/cmd/devices_list.go @@ -24,6 +24,9 @@ var DevicesListCmdTagValueMatchMode string // DevicesListCmdLimit holds value of 'limit' option var DevicesListCmdLimit int64 +// DevicesListCmdPaginate indicates to do pagination or not +var DevicesListCmdPaginate bool + // DevicesListCmdOutputJSONL indicates to output with jsonl format var DevicesListCmdOutputJSONL bool @@ -38,6 +41,8 @@ func InitDevicesListCmd() { DevicesListCmd.Flags().Int64Var(&DevicesListCmdLimit, "limit", -1, TRAPI("Max number of Devices in a response")) + DevicesListCmd.Flags().BoolVar(&DevicesListCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + DevicesListCmd.Flags().BoolVar(&DevicesListCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) DevicesListCmd.RunE = DevicesListCmdRunE @@ -107,6 +112,10 @@ func collectDevicesListCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForDevicesListCmd("/devices"), query: buildQueryForDevicesListCmd(), + doPagination: DevicesListCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/devices_list_object_models.go b/soracom/generated/cmd/devices_list_object_models.go index bf3ad1ec..4e4801f4 100644 --- a/soracom/generated/cmd/devices_list_object_models.go +++ b/soracom/generated/cmd/devices_list_object_models.go @@ -15,6 +15,9 @@ var DevicesListObjectModelsCmdLastEvaluatedKey string // DevicesListObjectModelsCmdLimit holds value of 'limit' option var DevicesListObjectModelsCmdLimit int64 +// DevicesListObjectModelsCmdPaginate indicates to do pagination or not +var DevicesListObjectModelsCmdPaginate bool + // DevicesListObjectModelsCmdOutputJSONL indicates to output with jsonl format var DevicesListObjectModelsCmdOutputJSONL bool @@ -23,6 +26,8 @@ func InitDevicesListObjectModelsCmd() { DevicesListObjectModelsCmd.Flags().Int64Var(&DevicesListObjectModelsCmdLimit, "limit", -1, TRAPI("Max number of device object models in a response")) + DevicesListObjectModelsCmd.Flags().BoolVar(&DevicesListObjectModelsCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + DevicesListObjectModelsCmd.Flags().BoolVar(&DevicesListObjectModelsCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) DevicesListObjectModelsCmd.RunE = DevicesListObjectModelsCmdRunE @@ -92,6 +97,10 @@ func collectDevicesListObjectModelsCmdParams(ac *apiClient) (*apiParams, error) path: buildPathForDevicesListObjectModelsCmd("/device_object_models"), query: buildQueryForDevicesListObjectModelsCmd(), + doPagination: DevicesListObjectModelsCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/files_find.go b/soracom/generated/cmd/files_find.go index 93e5d09a..e589bf67 100644 --- a/soracom/generated/cmd/files_find.go +++ b/soracom/generated/cmd/files_find.go @@ -21,6 +21,9 @@ var FilesFindCmdScope string // FilesFindCmdLimit holds value of 'limit' option var FilesFindCmdLimit int64 +// FilesFindCmdPaginate indicates to do pagination or not +var FilesFindCmdPaginate bool + // FilesFindCmdOutputJSONL indicates to output with jsonl format var FilesFindCmdOutputJSONL bool @@ -33,6 +36,8 @@ func InitFilesFindCmd() { FilesFindCmd.Flags().Int64Var(&FilesFindCmdLimit, "limit", 10, TRAPI("Maximum number of file entries to be returned.")) + FilesFindCmd.Flags().BoolVar(&FilesFindCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + FilesFindCmd.Flags().BoolVar(&FilesFindCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) FilesFindCmd.RunE = FilesFindCmdRunE @@ -114,6 +119,10 @@ func collectFilesFindCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForFilesFindCmd("/files"), query: buildQueryForFilesFindCmd(), + doPagination: FilesFindCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/files_list.go b/soracom/generated/cmd/files_list.go index aef8de09..c444cec1 100644 --- a/soracom/generated/cmd/files_list.go +++ b/soracom/generated/cmd/files_list.go @@ -21,6 +21,9 @@ var FilesListCmdScope string // FilesListCmdLimit holds value of 'limit' option var FilesListCmdLimit int64 +// FilesListCmdPaginate indicates to do pagination or not +var FilesListCmdPaginate bool + // FilesListCmdOutputJSONL indicates to output with jsonl format var FilesListCmdOutputJSONL bool @@ -33,6 +36,8 @@ func InitFilesListCmd() { FilesListCmd.Flags().Int64Var(&FilesListCmdLimit, "limit", 10, TRAPI("Maximum number of file entries to be returned.")) + FilesListCmd.Flags().BoolVar(&FilesListCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + FilesListCmd.Flags().BoolVar(&FilesListCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) FilesListCmd.RunE = FilesListCmdRunE @@ -102,6 +107,10 @@ func collectFilesListCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForFilesListCmd("/files/{scope}/{path}/"), query: buildQueryForFilesListCmd(), + doPagination: FilesListCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/gadgets_list.go b/soracom/generated/cmd/gadgets_list.go index 2674d041..54bdffb7 100644 --- a/soracom/generated/cmd/gadgets_list.go +++ b/soracom/generated/cmd/gadgets_list.go @@ -27,6 +27,9 @@ var GadgetsListCmdTagValueMatchMode string // GadgetsListCmdLimit holds value of 'limit' option var GadgetsListCmdLimit int64 +// GadgetsListCmdPaginate indicates to do pagination or not +var GadgetsListCmdPaginate bool + // GadgetsListCmdOutputJSONL indicates to output with jsonl format var GadgetsListCmdOutputJSONL bool @@ -43,6 +46,8 @@ func InitGadgetsListCmd() { GadgetsListCmd.Flags().Int64Var(&GadgetsListCmdLimit, "limit", 0, TRAPI("Maximum number of Gadget API compatible devices data to retrieve.")) + GadgetsListCmd.Flags().BoolVar(&GadgetsListCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + GadgetsListCmd.Flags().BoolVar(&GadgetsListCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) GadgetsListCmd.RunE = GadgetsListCmdRunE @@ -112,6 +117,10 @@ func collectGadgetsListCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForGadgetsListCmd("/gadgets"), query: buildQueryForGadgetsListCmd(), + doPagination: GadgetsListCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/groups_list.go b/soracom/generated/cmd/groups_list.go index b175716c..0904e444 100644 --- a/soracom/generated/cmd/groups_list.go +++ b/soracom/generated/cmd/groups_list.go @@ -24,6 +24,9 @@ var GroupsListCmdTagValueMatchMode string // GroupsListCmdLimit holds value of 'limit' option var GroupsListCmdLimit int64 +// GroupsListCmdPaginate indicates to do pagination or not +var GroupsListCmdPaginate bool + // GroupsListCmdOutputJSONL indicates to output with jsonl format var GroupsListCmdOutputJSONL bool @@ -38,6 +41,8 @@ func InitGroupsListCmd() { GroupsListCmd.Flags().Int64Var(&GroupsListCmdLimit, "limit", 0, TRAPI("Maximum number of results per response page.")) + GroupsListCmd.Flags().BoolVar(&GroupsListCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + GroupsListCmd.Flags().BoolVar(&GroupsListCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) GroupsListCmd.RunE = GroupsListCmdRunE @@ -107,6 +112,10 @@ func collectGroupsListCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForGroupsListCmd("/groups"), query: buildQueryForGroupsListCmd(), + doPagination: GroupsListCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/groups_list_subscribers.go b/soracom/generated/cmd/groups_list_subscribers.go index afbafad3..98552426 100644 --- a/soracom/generated/cmd/groups_list_subscribers.go +++ b/soracom/generated/cmd/groups_list_subscribers.go @@ -18,6 +18,9 @@ var GroupsListSubscribersCmdLastEvaluatedKey string // GroupsListSubscribersCmdLimit holds value of 'limit' option var GroupsListSubscribersCmdLimit int64 +// GroupsListSubscribersCmdPaginate indicates to do pagination or not +var GroupsListSubscribersCmdPaginate bool + // GroupsListSubscribersCmdOutputJSONL indicates to output with jsonl format var GroupsListSubscribersCmdOutputJSONL bool @@ -28,6 +31,8 @@ func InitGroupsListSubscribersCmd() { GroupsListSubscribersCmd.Flags().Int64Var(&GroupsListSubscribersCmdLimit, "limit", 0, TRAPI("Maximum number of results per response page.")) + GroupsListSubscribersCmd.Flags().BoolVar(&GroupsListSubscribersCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + GroupsListSubscribersCmd.Flags().BoolVar(&GroupsListSubscribersCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) GroupsListSubscribersCmd.RunE = GroupsListSubscribersCmdRunE @@ -103,6 +108,10 @@ func collectGroupsListSubscribersCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForGroupsListSubscribersCmd("/groups/{group_id}/subscribers"), query: buildQueryForGroupsListSubscribersCmd(), + doPagination: GroupsListSubscribersCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/logs_get.go b/soracom/generated/cmd/logs_get.go index 0afad46b..51893401 100644 --- a/soracom/generated/cmd/logs_get.go +++ b/soracom/generated/cmd/logs_get.go @@ -30,6 +30,9 @@ var LogsGetCmdLimit int64 // LogsGetCmdTo holds value of 'to' option var LogsGetCmdTo int64 +// LogsGetCmdPaginate indicates to do pagination or not +var LogsGetCmdPaginate bool + // LogsGetCmdOutputJSONL indicates to output with jsonl format var LogsGetCmdOutputJSONL bool @@ -48,6 +51,8 @@ func InitLogsGetCmd() { LogsGetCmd.Flags().Int64Var(&LogsGetCmdTo, "to", 0, TRAPI("End time of the period for which to retrieve error logs (UNIX time in milliseconds).")) + LogsGetCmd.Flags().BoolVar(&LogsGetCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + LogsGetCmd.Flags().BoolVar(&LogsGetCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) LogsGetCmd.RunE = LogsGetCmdRunE @@ -117,6 +122,10 @@ func collectLogsGetCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForLogsGetCmd("/logs"), query: buildQueryForLogsGetCmd(), + doPagination: LogsGetCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/lora_devices_get_data.go b/soracom/generated/cmd/lora_devices_get_data.go index a8c470e5..a0687b92 100644 --- a/soracom/generated/cmd/lora_devices_get_data.go +++ b/soracom/generated/cmd/lora_devices_get_data.go @@ -27,6 +27,9 @@ var LoraDevicesGetDataCmdLimit int64 // LoraDevicesGetDataCmdTo holds value of 'to' option var LoraDevicesGetDataCmdTo int64 +// LoraDevicesGetDataCmdPaginate indicates to do pagination or not +var LoraDevicesGetDataCmdPaginate bool + // LoraDevicesGetDataCmdOutputJSONL indicates to output with jsonl format var LoraDevicesGetDataCmdOutputJSONL bool @@ -43,6 +46,8 @@ func InitLoraDevicesGetDataCmd() { LoraDevicesGetDataCmd.Flags().Int64Var(&LoraDevicesGetDataCmdTo, "to", 0, TRAPI("End time of the target period (UNIX time in milliseconds).")) + LoraDevicesGetDataCmd.Flags().BoolVar(&LoraDevicesGetDataCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + LoraDevicesGetDataCmd.Flags().BoolVar(&LoraDevicesGetDataCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) LoraDevicesGetDataCmd.RunE = LoraDevicesGetDataCmdRunE @@ -118,6 +123,10 @@ func collectLoraDevicesGetDataCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForLoraDevicesGetDataCmd("/lora_devices/{device_id}/data"), query: buildQueryForLoraDevicesGetDataCmd(), + doPagination: LoraDevicesGetDataCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/lora_devices_list.go b/soracom/generated/cmd/lora_devices_list.go index daf0d140..29edf5fe 100644 --- a/soracom/generated/cmd/lora_devices_list.go +++ b/soracom/generated/cmd/lora_devices_list.go @@ -24,6 +24,9 @@ var LoraDevicesListCmdTagValueMatchMode string // LoraDevicesListCmdLimit holds value of 'limit' option var LoraDevicesListCmdLimit int64 +// LoraDevicesListCmdPaginate indicates to do pagination or not +var LoraDevicesListCmdPaginate bool + // LoraDevicesListCmdOutputJSONL indicates to output with jsonl format var LoraDevicesListCmdOutputJSONL bool @@ -38,6 +41,8 @@ func InitLoraDevicesListCmd() { LoraDevicesListCmd.Flags().Int64Var(&LoraDevicesListCmdLimit, "limit", 0, TRAPI("Maximum number of LoRaWAN devices to retrieve.")) + LoraDevicesListCmd.Flags().BoolVar(&LoraDevicesListCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + LoraDevicesListCmd.Flags().BoolVar(&LoraDevicesListCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) LoraDevicesListCmd.RunE = LoraDevicesListCmdRunE @@ -107,6 +112,10 @@ func collectLoraDevicesListCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForLoraDevicesListCmd("/lora_devices"), query: buildQueryForLoraDevicesListCmd(), + doPagination: LoraDevicesListCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/lora_gateways_list.go b/soracom/generated/cmd/lora_gateways_list.go index aed96db1..4081a65f 100644 --- a/soracom/generated/cmd/lora_gateways_list.go +++ b/soracom/generated/cmd/lora_gateways_list.go @@ -24,6 +24,9 @@ var LoraGatewaysListCmdTagValueMatchMode string // LoraGatewaysListCmdLimit holds value of 'limit' option var LoraGatewaysListCmdLimit int64 +// LoraGatewaysListCmdPaginate indicates to do pagination or not +var LoraGatewaysListCmdPaginate bool + // LoraGatewaysListCmdOutputJSONL indicates to output with jsonl format var LoraGatewaysListCmdOutputJSONL bool @@ -38,6 +41,8 @@ func InitLoraGatewaysListCmd() { LoraGatewaysListCmd.Flags().Int64Var(&LoraGatewaysListCmdLimit, "limit", 0, TRAPI("Maximum number of LoRaWAN gateways to retrieve.")) + LoraGatewaysListCmd.Flags().BoolVar(&LoraGatewaysListCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + LoraGatewaysListCmd.Flags().BoolVar(&LoraGatewaysListCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) LoraGatewaysListCmd.RunE = LoraGatewaysListCmdRunE @@ -107,6 +112,10 @@ func collectLoraGatewaysListCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForLoraGatewaysListCmd("/lora_gateways"), query: buildQueryForLoraGatewaysListCmd(), + doPagination: LoraGatewaysListCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/lora_network_sets_list.go b/soracom/generated/cmd/lora_network_sets_list.go index 3bd0071d..3986561e 100644 --- a/soracom/generated/cmd/lora_network_sets_list.go +++ b/soracom/generated/cmd/lora_network_sets_list.go @@ -24,6 +24,9 @@ var LoraNetworkSetsListCmdTagValueMatchMode string // LoraNetworkSetsListCmdLimit holds value of 'limit' option var LoraNetworkSetsListCmdLimit int64 +// LoraNetworkSetsListCmdPaginate indicates to do pagination or not +var LoraNetworkSetsListCmdPaginate bool + // LoraNetworkSetsListCmdOutputJSONL indicates to output with jsonl format var LoraNetworkSetsListCmdOutputJSONL bool @@ -38,6 +41,8 @@ func InitLoraNetworkSetsListCmd() { LoraNetworkSetsListCmd.Flags().Int64Var(&LoraNetworkSetsListCmdLimit, "limit", 0, TRAPI("Maximum number of LoRaWAN network set to retrieve.")) + LoraNetworkSetsListCmd.Flags().BoolVar(&LoraNetworkSetsListCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + LoraNetworkSetsListCmd.Flags().BoolVar(&LoraNetworkSetsListCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) LoraNetworkSetsListCmd.RunE = LoraNetworkSetsListCmdRunE @@ -107,6 +112,10 @@ func collectLoraNetworkSetsListCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForLoraNetworkSetsListCmd("/lora_network_sets"), query: buildQueryForLoraNetworkSetsListCmd(), + doPagination: LoraNetworkSetsListCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/lora_network_sets_list_gateways.go b/soracom/generated/cmd/lora_network_sets_list_gateways.go index 87fba661..48ac827f 100644 --- a/soracom/generated/cmd/lora_network_sets_list_gateways.go +++ b/soracom/generated/cmd/lora_network_sets_list_gateways.go @@ -18,6 +18,9 @@ var LoraNetworkSetsListGatewaysCmdNsId string // LoraNetworkSetsListGatewaysCmdLimit holds value of 'limit' option var LoraNetworkSetsListGatewaysCmdLimit int64 +// LoraNetworkSetsListGatewaysCmdPaginate indicates to do pagination or not +var LoraNetworkSetsListGatewaysCmdPaginate bool + // LoraNetworkSetsListGatewaysCmdOutputJSONL indicates to output with jsonl format var LoraNetworkSetsListGatewaysCmdOutputJSONL bool @@ -28,6 +31,8 @@ func InitLoraNetworkSetsListGatewaysCmd() { LoraNetworkSetsListGatewaysCmd.Flags().Int64Var(&LoraNetworkSetsListGatewaysCmdLimit, "limit", 0, TRAPI("Maximum number of LoRaWAN gateways to retrieve.")) + LoraNetworkSetsListGatewaysCmd.Flags().BoolVar(&LoraNetworkSetsListGatewaysCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + LoraNetworkSetsListGatewaysCmd.Flags().BoolVar(&LoraNetworkSetsListGatewaysCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) LoraNetworkSetsListGatewaysCmd.RunE = LoraNetworkSetsListGatewaysCmdRunE @@ -104,6 +109,10 @@ func collectLoraNetworkSetsListGatewaysCmdParams(ac *apiClient) (*apiParams, err path: buildPathForLoraNetworkSetsListGatewaysCmd("/lora_network_sets/{ns_id}/gateways"), query: buildQueryForLoraNetworkSetsListGatewaysCmd(), + doPagination: LoraNetworkSetsListGatewaysCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/orders_list_subscribers.go b/soracom/generated/cmd/orders_list_subscribers.go index 4f93d685..04939755 100644 --- a/soracom/generated/cmd/orders_list_subscribers.go +++ b/soracom/generated/cmd/orders_list_subscribers.go @@ -18,6 +18,9 @@ var OrdersListSubscribersCmdOrderId string // OrdersListSubscribersCmdLimit holds value of 'limit' option var OrdersListSubscribersCmdLimit int64 +// OrdersListSubscribersCmdPaginate indicates to do pagination or not +var OrdersListSubscribersCmdPaginate bool + func InitOrdersListSubscribersCmd() { OrdersListSubscribersCmd.Flags().StringVar(&OrdersListSubscribersCmdLastEvaluatedKey, "last-evaluated-key", "", TRAPI("The value of the 'x-soracom-next-key' header returned when the previous page was retrieved. Specify if the next page is to be retrieved. For details, see [Handling Pagination](/en/docs/tools/api-reference/#handling-pagination).")) @@ -25,6 +28,8 @@ func InitOrdersListSubscribersCmd() { OrdersListSubscribersCmd.Flags().Int64Var(&OrdersListSubscribersCmdLimit, "limit", 0, TRAPI("Max number of subscribers in a response.")) + OrdersListSubscribersCmd.Flags().BoolVar(&OrdersListSubscribersCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + OrdersListSubscribersCmd.RunE = OrdersListSubscribersCmdRunE OrdersCmd.AddCommand(OrdersListSubscribersCmd) @@ -95,6 +100,10 @@ func collectOrdersListSubscribersCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForOrdersListSubscribersCmd("/orders/{order_id}/subscribers"), query: buildQueryForOrdersListSubscribersCmd(), + doPagination: OrdersListSubscribersCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/port_mappings_list.go b/soracom/generated/cmd/port_mappings_list.go index a941484a..575e3d06 100644 --- a/soracom/generated/cmd/port_mappings_list.go +++ b/soracom/generated/cmd/port_mappings_list.go @@ -15,6 +15,9 @@ var PortMappingsListCmdLastEvaluatedKey string // PortMappingsListCmdLimit holds value of 'limit' option var PortMappingsListCmdLimit int64 +// PortMappingsListCmdPaginate indicates to do pagination or not +var PortMappingsListCmdPaginate bool + // PortMappingsListCmdOutputJSONL indicates to output with jsonl format var PortMappingsListCmdOutputJSONL bool @@ -23,6 +26,8 @@ func InitPortMappingsListCmd() { PortMappingsListCmd.Flags().Int64Var(&PortMappingsListCmdLimit, "limit", 0, TRAPI("Maximum number of results per response page.")) + PortMappingsListCmd.Flags().BoolVar(&PortMappingsListCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + PortMappingsListCmd.Flags().BoolVar(&PortMappingsListCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) PortMappingsListCmd.RunE = PortMappingsListCmdRunE @@ -92,6 +97,10 @@ func collectPortMappingsListCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForPortMappingsListCmd("/port_mappings"), query: buildQueryForPortMappingsListCmd(), + doPagination: PortMappingsListCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/query_devices.go b/soracom/generated/cmd/query_devices.go index 4ade5a15..398e24b7 100644 --- a/soracom/generated/cmd/query_devices.go +++ b/soracom/generated/cmd/query_devices.go @@ -36,6 +36,9 @@ var QueryDevicesCmdTag []string // QueryDevicesCmdLimit holds value of 'limit' option var QueryDevicesCmdLimit int64 +// QueryDevicesCmdPaginate indicates to do pagination or not +var QueryDevicesCmdPaginate bool + // QueryDevicesCmdOutputJSONL indicates to output with jsonl format var QueryDevicesCmdOutputJSONL bool @@ -58,6 +61,8 @@ func InitQueryDevicesCmd() { QueryDevicesCmd.Flags().Int64Var(&QueryDevicesCmdLimit, "limit", 10, TRAPI("The maximum number of item to retrieve.")) + QueryDevicesCmd.Flags().BoolVar(&QueryDevicesCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + QueryDevicesCmd.Flags().BoolVar(&QueryDevicesCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) QueryDevicesCmd.RunE = QueryDevicesCmdRunE @@ -127,6 +132,10 @@ func collectQueryDevicesCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForQueryDevicesCmd("/query/devices"), query: buildQueryForQueryDevicesCmd(), + doPagination: QueryDevicesCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/query_sigfox_devices.go b/soracom/generated/cmd/query_sigfox_devices.go index cc07c968..f6d9f1b2 100644 --- a/soracom/generated/cmd/query_sigfox_devices.go +++ b/soracom/generated/cmd/query_sigfox_devices.go @@ -36,6 +36,9 @@ var QuerySigfoxDevicesCmdTag []string // QuerySigfoxDevicesCmdLimit holds value of 'limit' option var QuerySigfoxDevicesCmdLimit int64 +// QuerySigfoxDevicesCmdPaginate indicates to do pagination or not +var QuerySigfoxDevicesCmdPaginate bool + // QuerySigfoxDevicesCmdOutputJSONL indicates to output with jsonl format var QuerySigfoxDevicesCmdOutputJSONL bool @@ -58,6 +61,8 @@ func InitQuerySigfoxDevicesCmd() { QuerySigfoxDevicesCmd.Flags().Int64Var(&QuerySigfoxDevicesCmdLimit, "limit", 10, TRAPI("The maximum number of item to retrieve.")) + QuerySigfoxDevicesCmd.Flags().BoolVar(&QuerySigfoxDevicesCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + QuerySigfoxDevicesCmd.Flags().BoolVar(&QuerySigfoxDevicesCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) QuerySigfoxDevicesCmd.RunE = QuerySigfoxDevicesCmdRunE @@ -127,6 +132,10 @@ func collectQuerySigfoxDevicesCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForQuerySigfoxDevicesCmd("/query/sigfox_devices"), query: buildQueryForQuerySigfoxDevicesCmd(), + doPagination: QuerySigfoxDevicesCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/query_sims.go b/soracom/generated/cmd/query_sims.go index e75c38c9..87388e2e 100644 --- a/soracom/generated/cmd/query_sims.go +++ b/soracom/generated/cmd/query_sims.go @@ -57,6 +57,9 @@ var QuerySimsCmdTag []string // QuerySimsCmdLimit holds value of 'limit' option var QuerySimsCmdLimit int64 +// QuerySimsCmdPaginate indicates to do pagination or not +var QuerySimsCmdPaginate bool + // QuerySimsCmdOutputJSONL indicates to output with jsonl format var QuerySimsCmdOutputJSONL bool @@ -93,6 +96,8 @@ func InitQuerySimsCmd() { QuerySimsCmd.Flags().Int64Var(&QuerySimsCmdLimit, "limit", 10, TRAPI("The maximum number of item to retrieve.")) + QuerySimsCmd.Flags().BoolVar(&QuerySimsCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + QuerySimsCmd.Flags().BoolVar(&QuerySimsCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) QuerySimsCmd.RunE = QuerySimsCmdRunE @@ -162,6 +167,10 @@ func collectQuerySimsCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForQuerySimsCmd("/query/sims"), query: buildQueryForQuerySimsCmd(), + doPagination: QuerySimsCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/query_subscribers.go b/soracom/generated/cmd/query_subscribers.go index a25c31ef..d91be2c8 100644 --- a/soracom/generated/cmd/query_subscribers.go +++ b/soracom/generated/cmd/query_subscribers.go @@ -47,6 +47,9 @@ var QuerySubscribersCmdTag []string // QuerySubscribersCmdLimit holds value of 'limit' option var QuerySubscribersCmdLimit int64 +// QuerySubscribersCmdPaginate indicates to do pagination or not +var QuerySubscribersCmdPaginate bool + // QuerySubscribersCmdOutputJSONL indicates to output with jsonl format var QuerySubscribersCmdOutputJSONL bool @@ -75,6 +78,8 @@ func InitQuerySubscribersCmd() { QuerySubscribersCmd.Flags().Int64Var(&QuerySubscribersCmdLimit, "limit", 10, TRAPI("The maximum number of item to retrieve.")) + QuerySubscribersCmd.Flags().BoolVar(&QuerySubscribersCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + QuerySubscribersCmd.Flags().BoolVar(&QuerySubscribersCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) QuerySubscribersCmd.RunE = QuerySubscribersCmdRunE @@ -91,6 +96,7 @@ var QuerySubscribersCmd = &cobra.Command{ func QuerySubscribersCmdRunE(cmd *cobra.Command, args []string) error { lib.WarnfStderr(TRCLI("cli.deprecated-api") + "\n") + lib.WarnfStderr(TRCLI("cli.alternative-api-suggestion")+"\n", "query sims") if len(args) > 0 { return fmt.Errorf("unexpected arguments passed => %v", args) @@ -145,6 +151,10 @@ func collectQuerySubscribersCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForQuerySubscribersCmd("/query/subscribers"), query: buildQueryForQuerySubscribersCmd(), + doPagination: QuerySubscribersCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/sigfox_devices_get_data.go b/soracom/generated/cmd/sigfox_devices_get_data.go index cd4e57c0..8fc4ae49 100644 --- a/soracom/generated/cmd/sigfox_devices_get_data.go +++ b/soracom/generated/cmd/sigfox_devices_get_data.go @@ -27,6 +27,9 @@ var SigfoxDevicesGetDataCmdLimit int64 // SigfoxDevicesGetDataCmdTo holds value of 'to' option var SigfoxDevicesGetDataCmdTo int64 +// SigfoxDevicesGetDataCmdPaginate indicates to do pagination or not +var SigfoxDevicesGetDataCmdPaginate bool + // SigfoxDevicesGetDataCmdOutputJSONL indicates to output with jsonl format var SigfoxDevicesGetDataCmdOutputJSONL bool @@ -43,6 +46,8 @@ func InitSigfoxDevicesGetDataCmd() { SigfoxDevicesGetDataCmd.Flags().Int64Var(&SigfoxDevicesGetDataCmdTo, "to", 0, TRAPI("End time of the target period (UNIX time in milliseconds).")) + SigfoxDevicesGetDataCmd.Flags().BoolVar(&SigfoxDevicesGetDataCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + SigfoxDevicesGetDataCmd.Flags().BoolVar(&SigfoxDevicesGetDataCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) SigfoxDevicesGetDataCmd.RunE = SigfoxDevicesGetDataCmdRunE @@ -118,6 +123,10 @@ func collectSigfoxDevicesGetDataCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForSigfoxDevicesGetDataCmd("/sigfox_devices/{device_id}/data"), query: buildQueryForSigfoxDevicesGetDataCmd(), + doPagination: SigfoxDevicesGetDataCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/sigfox_devices_list.go b/soracom/generated/cmd/sigfox_devices_list.go index c11e486b..c832b7c8 100644 --- a/soracom/generated/cmd/sigfox_devices_list.go +++ b/soracom/generated/cmd/sigfox_devices_list.go @@ -24,6 +24,9 @@ var SigfoxDevicesListCmdTagValueMatchMode string // SigfoxDevicesListCmdLimit holds value of 'limit' option var SigfoxDevicesListCmdLimit int64 +// SigfoxDevicesListCmdPaginate indicates to do pagination or not +var SigfoxDevicesListCmdPaginate bool + // SigfoxDevicesListCmdOutputJSONL indicates to output with jsonl format var SigfoxDevicesListCmdOutputJSONL bool @@ -38,6 +41,8 @@ func InitSigfoxDevicesListCmd() { SigfoxDevicesListCmd.Flags().Int64Var(&SigfoxDevicesListCmdLimit, "limit", 0, TRAPI("Maximum number of Sigfox devices to retrieve.")) + SigfoxDevicesListCmd.Flags().BoolVar(&SigfoxDevicesListCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + SigfoxDevicesListCmd.Flags().BoolVar(&SigfoxDevicesListCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) SigfoxDevicesListCmd.RunE = SigfoxDevicesListCmdRunE @@ -107,6 +112,10 @@ func collectSigfoxDevicesListCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForSigfoxDevicesListCmd("/sigfox_devices"), query: buildQueryForSigfoxDevicesListCmd(), + doPagination: SigfoxDevicesListCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/sim_profile_orders_list.go b/soracom/generated/cmd/sim_profile_orders_list.go index 6c234b97..b3667526 100644 --- a/soracom/generated/cmd/sim_profile_orders_list.go +++ b/soracom/generated/cmd/sim_profile_orders_list.go @@ -15,6 +15,9 @@ var SimProfileOrdersListCmdLastEvaluatedKey string // SimProfileOrdersListCmdLimit holds value of 'limit' option var SimProfileOrdersListCmdLimit int64 +// SimProfileOrdersListCmdPaginate indicates to do pagination or not +var SimProfileOrdersListCmdPaginate bool + // SimProfileOrdersListCmdOutputJSONL indicates to output with jsonl format var SimProfileOrdersListCmdOutputJSONL bool @@ -23,6 +26,8 @@ func InitSimProfileOrdersListCmd() { SimProfileOrdersListCmd.Flags().Int64Var(&SimProfileOrdersListCmdLimit, "limit", 100, TRAPI("Maximum number of eSIM profile orders to retrieve. However, the number of eSIM profile orders returned may be less than the specified value.")) + SimProfileOrdersListCmd.Flags().BoolVar(&SimProfileOrdersListCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + SimProfileOrdersListCmd.Flags().BoolVar(&SimProfileOrdersListCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) SimProfileOrdersListCmd.RunE = SimProfileOrdersListCmdRunE @@ -92,6 +97,10 @@ func collectSimProfileOrdersListCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForSimProfileOrdersListCmd("/sim_profile_orders"), query: buildQueryForSimProfileOrdersListCmd(), + doPagination: SimProfileOrdersListCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/sims_get_data.go b/soracom/generated/cmd/sims_get_data.go index 0fe98ee3..5760be96 100644 --- a/soracom/generated/cmd/sims_get_data.go +++ b/soracom/generated/cmd/sims_get_data.go @@ -27,6 +27,9 @@ var SimsGetDataCmdLimit int64 // SimsGetDataCmdTo holds value of 'to' option var SimsGetDataCmdTo int64 +// SimsGetDataCmdPaginate indicates to do pagination or not +var SimsGetDataCmdPaginate bool + // SimsGetDataCmdOutputJSONL indicates to output with jsonl format var SimsGetDataCmdOutputJSONL bool @@ -43,6 +46,8 @@ func InitSimsGetDataCmd() { SimsGetDataCmd.Flags().Int64Var(&SimsGetDataCmdTo, "to", 0, TRAPI("End time for the data entries search range (UNIX time in milliseconds).")) + SimsGetDataCmd.Flags().BoolVar(&SimsGetDataCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + SimsGetDataCmd.Flags().BoolVar(&SimsGetDataCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) SimsGetDataCmd.RunE = SimsGetDataCmdRunE @@ -119,6 +124,10 @@ func collectSimsGetDataCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForSimsGetDataCmd("/sims/{sim_id}/data"), query: buildQueryForSimsGetDataCmd(), + doPagination: SimsGetDataCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/sims_list.go b/soracom/generated/cmd/sims_list.go index 0305c769..9d0509f1 100644 --- a/soracom/generated/cmd/sims_list.go +++ b/soracom/generated/cmd/sims_list.go @@ -15,6 +15,9 @@ var SimsListCmdLastEvaluatedKey string // SimsListCmdLimit holds value of 'limit' option var SimsListCmdLimit int64 +// SimsListCmdPaginate indicates to do pagination or not +var SimsListCmdPaginate bool + // SimsListCmdOutputJSONL indicates to output with jsonl format var SimsListCmdOutputJSONL bool @@ -23,6 +26,8 @@ func InitSimsListCmd() { SimsListCmd.Flags().Int64Var(&SimsListCmdLimit, "limit", 0, TRAPI("Maximum number of SIMs to retrieve. However, the number of SIMs returned may be less than the specified value.")) + SimsListCmd.Flags().BoolVar(&SimsListCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + SimsListCmd.Flags().BoolVar(&SimsListCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) SimsListCmd.RunE = SimsListCmdRunE @@ -92,6 +97,10 @@ func collectSimsListCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForSimsListCmd("/sims"), query: buildQueryForSimsListCmd(), + doPagination: SimsListCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/sims_list_packet_capture_sessions.go b/soracom/generated/cmd/sims_list_packet_capture_sessions.go index d7f98407..2a229d13 100644 --- a/soracom/generated/cmd/sims_list_packet_capture_sessions.go +++ b/soracom/generated/cmd/sims_list_packet_capture_sessions.go @@ -18,6 +18,9 @@ var SimsListPacketCaptureSessionsCmdSimId string // SimsListPacketCaptureSessionsCmdLimit holds value of 'limit' option var SimsListPacketCaptureSessionsCmdLimit int64 +// SimsListPacketCaptureSessionsCmdPaginate indicates to do pagination or not +var SimsListPacketCaptureSessionsCmdPaginate bool + // SimsListPacketCaptureSessionsCmdOutputJSONL indicates to output with jsonl format var SimsListPacketCaptureSessionsCmdOutputJSONL bool @@ -28,6 +31,8 @@ func InitSimsListPacketCaptureSessionsCmd() { SimsListPacketCaptureSessionsCmd.Flags().Int64Var(&SimsListPacketCaptureSessionsCmdLimit, "limit", 10, TRAPI("Max number of results in a response.")) + SimsListPacketCaptureSessionsCmd.Flags().BoolVar(&SimsListPacketCaptureSessionsCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + SimsListPacketCaptureSessionsCmd.Flags().BoolVar(&SimsListPacketCaptureSessionsCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) SimsListPacketCaptureSessionsCmd.RunE = SimsListPacketCaptureSessionsCmdRunE @@ -104,6 +109,10 @@ func collectSimsListPacketCaptureSessionsCmdParams(ac *apiClient) (*apiParams, e path: buildPathForSimsListPacketCaptureSessionsCmd("/sims/{sim_id}/packet_capture_sessions"), query: buildQueryForSimsListPacketCaptureSessionsCmd(), + doPagination: SimsListPacketCaptureSessionsCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/sims_list_status_history.go b/soracom/generated/cmd/sims_list_status_history.go index 211ef52c..7e96b069 100644 --- a/soracom/generated/cmd/sims_list_status_history.go +++ b/soracom/generated/cmd/sims_list_status_history.go @@ -27,6 +27,9 @@ var SimsListStatusHistoryCmdLimit int64 // SimsListStatusHistoryCmdTo holds value of 'to' option var SimsListStatusHistoryCmdTo int64 +// SimsListStatusHistoryCmdPaginate indicates to do pagination or not +var SimsListStatusHistoryCmdPaginate bool + // SimsListStatusHistoryCmdOutputJSONL indicates to output with jsonl format var SimsListStatusHistoryCmdOutputJSONL bool @@ -43,6 +46,8 @@ func InitSimsListStatusHistoryCmd() { SimsListStatusHistoryCmd.Flags().Int64Var(&SimsListStatusHistoryCmdTo, "to", 0, TRAPI("End time of the status operation history entry to be searched (UNIX time in milliseconds). If not specified, 'to' is set to the current time.")) + SimsListStatusHistoryCmd.Flags().BoolVar(&SimsListStatusHistoryCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + SimsListStatusHistoryCmd.Flags().BoolVar(&SimsListStatusHistoryCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) SimsListStatusHistoryCmd.RunE = SimsListStatusHistoryCmdRunE @@ -119,6 +124,10 @@ func collectSimsListStatusHistoryCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForSimsListStatusHistoryCmd("/sims/{sim_id}/statuses/history"), query: buildQueryForSimsListStatusHistoryCmd(), + doPagination: SimsListStatusHistoryCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/sims_session_events.go b/soracom/generated/cmd/sims_session_events.go index bab8f12a..edf95e11 100644 --- a/soracom/generated/cmd/sims_session_events.go +++ b/soracom/generated/cmd/sims_session_events.go @@ -24,6 +24,9 @@ var SimsSessionEventsCmdLimit int64 // SimsSessionEventsCmdTo holds value of 'to' option var SimsSessionEventsCmdTo int64 +// SimsSessionEventsCmdPaginate indicates to do pagination or not +var SimsSessionEventsCmdPaginate bool + // SimsSessionEventsCmdOutputJSONL indicates to output with jsonl format var SimsSessionEventsCmdOutputJSONL bool @@ -38,6 +41,8 @@ func InitSimsSessionEventsCmd() { SimsSessionEventsCmd.Flags().Int64Var(&SimsSessionEventsCmdTo, "to", 0, TRAPI("End time (UNIX time in milliseconds) of the period to retrieve the session event history.")) + SimsSessionEventsCmd.Flags().BoolVar(&SimsSessionEventsCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + SimsSessionEventsCmd.Flags().BoolVar(&SimsSessionEventsCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) SimsSessionEventsCmd.RunE = SimsSessionEventsCmdRunE @@ -114,6 +119,10 @@ func collectSimsSessionEventsCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForSimsSessionEventsCmd("/sims/{sim_id}/events/sessions"), query: buildQueryForSimsSessionEventsCmd(), + doPagination: SimsSessionEventsCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/sora_cam_devices_events_list.go b/soracom/generated/cmd/sora_cam_devices_events_list.go index d93b95c8..cf7fb637 100644 --- a/soracom/generated/cmd/sora_cam_devices_events_list.go +++ b/soracom/generated/cmd/sora_cam_devices_events_list.go @@ -27,6 +27,9 @@ var SoraCamDevicesEventsListCmdLimit int64 // SoraCamDevicesEventsListCmdTo holds value of 'to' option var SoraCamDevicesEventsListCmdTo int64 +// SoraCamDevicesEventsListCmdPaginate indicates to do pagination or not +var SoraCamDevicesEventsListCmdPaginate bool + // SoraCamDevicesEventsListCmdOutputJSONL indicates to output with jsonl format var SoraCamDevicesEventsListCmdOutputJSONL bool @@ -43,6 +46,8 @@ func InitSoraCamDevicesEventsListCmd() { SoraCamDevicesEventsListCmd.Flags().Int64Var(&SoraCamDevicesEventsListCmdTo, "to", 0, TRAPI("End time of the events to be searched (unix time in milliseconds). If not specified, 'to' is set to the current time.")) + SoraCamDevicesEventsListCmd.Flags().BoolVar(&SoraCamDevicesEventsListCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + SoraCamDevicesEventsListCmd.Flags().BoolVar(&SoraCamDevicesEventsListCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) SoraCamDevicesEventsListCmd.RunE = SoraCamDevicesEventsListCmdRunE @@ -112,6 +117,10 @@ func collectSoraCamDevicesEventsListCmdParams(ac *apiClient) (*apiParams, error) path: buildPathForSoraCamDevicesEventsListCmd("/sora_cam/devices/events"), query: buildQueryForSoraCamDevicesEventsListCmd(), + doPagination: SoraCamDevicesEventsListCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/sora_cam_devices_events_list_for_device.go b/soracom/generated/cmd/sora_cam_devices_events_list_for_device.go index 7ea6720c..106b3356 100644 --- a/soracom/generated/cmd/sora_cam_devices_events_list_for_device.go +++ b/soracom/generated/cmd/sora_cam_devices_events_list_for_device.go @@ -27,6 +27,9 @@ var SoraCamDevicesEventsListForDeviceCmdLimit int64 // SoraCamDevicesEventsListForDeviceCmdTo holds value of 'to' option var SoraCamDevicesEventsListForDeviceCmdTo int64 +// SoraCamDevicesEventsListForDeviceCmdPaginate indicates to do pagination or not +var SoraCamDevicesEventsListForDeviceCmdPaginate bool + // SoraCamDevicesEventsListForDeviceCmdOutputJSONL indicates to output with jsonl format var SoraCamDevicesEventsListForDeviceCmdOutputJSONL bool @@ -43,6 +46,8 @@ func InitSoraCamDevicesEventsListForDeviceCmd() { SoraCamDevicesEventsListForDeviceCmd.Flags().Int64Var(&SoraCamDevicesEventsListForDeviceCmdTo, "to", 0, TRAPI("End time of the events to be searched (unix time in milliseconds). If not specified, 'to' is set to the current time.")) + SoraCamDevicesEventsListForDeviceCmd.Flags().BoolVar(&SoraCamDevicesEventsListForDeviceCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + SoraCamDevicesEventsListForDeviceCmd.Flags().BoolVar(&SoraCamDevicesEventsListForDeviceCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) SoraCamDevicesEventsListForDeviceCmd.RunE = SoraCamDevicesEventsListForDeviceCmdRunE @@ -118,6 +123,10 @@ func collectSoraCamDevicesEventsListForDeviceCmdParams(ac *apiClient) (*apiParam path: buildPathForSoraCamDevicesEventsListForDeviceCmd("/sora_cam/devices/{device_id}/events"), query: buildQueryForSoraCamDevicesEventsListForDeviceCmd(), + doPagination: SoraCamDevicesEventsListForDeviceCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/sora_cam_devices_images_list_exports.go b/soracom/generated/cmd/sora_cam_devices_images_list_exports.go index 6655e49d..1bd57f94 100644 --- a/soracom/generated/cmd/sora_cam_devices_images_list_exports.go +++ b/soracom/generated/cmd/sora_cam_devices_images_list_exports.go @@ -21,6 +21,9 @@ var SoraCamDevicesImagesListExportsCmdSort string // SoraCamDevicesImagesListExportsCmdLimit holds value of 'limit' option var SoraCamDevicesImagesListExportsCmdLimit int64 +// SoraCamDevicesImagesListExportsCmdPaginate indicates to do pagination or not +var SoraCamDevicesImagesListExportsCmdPaginate bool + // SoraCamDevicesImagesListExportsCmdOutputJSONL indicates to output with jsonl format var SoraCamDevicesImagesListExportsCmdOutputJSONL bool @@ -33,6 +36,8 @@ func InitSoraCamDevicesImagesListExportsCmd() { SoraCamDevicesImagesListExportsCmd.Flags().Int64Var(&SoraCamDevicesImagesListExportsCmdLimit, "limit", 10, TRAPI("Maximum number of items to retrieve in one request. Note that the response may contain fewer items than the specified limit.")) + SoraCamDevicesImagesListExportsCmd.Flags().BoolVar(&SoraCamDevicesImagesListExportsCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + SoraCamDevicesImagesListExportsCmd.Flags().BoolVar(&SoraCamDevicesImagesListExportsCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) SoraCamDevicesImagesListExportsCmd.RunE = SoraCamDevicesImagesListExportsCmdRunE @@ -102,6 +107,10 @@ func collectSoraCamDevicesImagesListExportsCmdParams(ac *apiClient) (*apiParams, path: buildPathForSoraCamDevicesImagesListExportsCmd("/sora_cam/devices/images/exports"), query: buildQueryForSoraCamDevicesImagesListExportsCmd(), + doPagination: SoraCamDevicesImagesListExportsCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/sora_cam_devices_images_list_exports_for_device.go b/soracom/generated/cmd/sora_cam_devices_images_list_exports_for_device.go index 502ca165..f6655c73 100644 --- a/soracom/generated/cmd/sora_cam_devices_images_list_exports_for_device.go +++ b/soracom/generated/cmd/sora_cam_devices_images_list_exports_for_device.go @@ -21,6 +21,9 @@ var SoraCamDevicesImagesListExportsForDeviceCmdSort string // SoraCamDevicesImagesListExportsForDeviceCmdLimit holds value of 'limit' option var SoraCamDevicesImagesListExportsForDeviceCmdLimit int64 +// SoraCamDevicesImagesListExportsForDeviceCmdPaginate indicates to do pagination or not +var SoraCamDevicesImagesListExportsForDeviceCmdPaginate bool + // SoraCamDevicesImagesListExportsForDeviceCmdOutputJSONL indicates to output with jsonl format var SoraCamDevicesImagesListExportsForDeviceCmdOutputJSONL bool @@ -33,6 +36,8 @@ func InitSoraCamDevicesImagesListExportsForDeviceCmd() { SoraCamDevicesImagesListExportsForDeviceCmd.Flags().Int64Var(&SoraCamDevicesImagesListExportsForDeviceCmdLimit, "limit", 10, TRAPI("Maximum number of items to retrieve in one request. Note that the response may contain fewer items than the specified limit.")) + SoraCamDevicesImagesListExportsForDeviceCmd.Flags().BoolVar(&SoraCamDevicesImagesListExportsForDeviceCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + SoraCamDevicesImagesListExportsForDeviceCmd.Flags().BoolVar(&SoraCamDevicesImagesListExportsForDeviceCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) SoraCamDevicesImagesListExportsForDeviceCmd.RunE = SoraCamDevicesImagesListExportsForDeviceCmdRunE @@ -108,6 +113,10 @@ func collectSoraCamDevicesImagesListExportsForDeviceCmdParams(ac *apiClient) (*a path: buildPathForSoraCamDevicesImagesListExportsForDeviceCmd("/sora_cam/devices/{device_id}/images/exports"), query: buildQueryForSoraCamDevicesImagesListExportsForDeviceCmd(), + doPagination: SoraCamDevicesImagesListExportsForDeviceCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/sora_cam_devices_recordings_and_events_list_for_device.go b/soracom/generated/cmd/sora_cam_devices_recordings_and_events_list_for_device.go index 965c7ca9..322aa588 100644 --- a/soracom/generated/cmd/sora_cam_devices_recordings_and_events_list_for_device.go +++ b/soracom/generated/cmd/sora_cam_devices_recordings_and_events_list_for_device.go @@ -24,6 +24,9 @@ var SoraCamDevicesRecordingsAndEventsListForDeviceCmdFrom int64 // SoraCamDevicesRecordingsAndEventsListForDeviceCmdTo holds value of 'to' option var SoraCamDevicesRecordingsAndEventsListForDeviceCmdTo int64 +// SoraCamDevicesRecordingsAndEventsListForDeviceCmdPaginate indicates to do pagination or not +var SoraCamDevicesRecordingsAndEventsListForDeviceCmdPaginate bool + func InitSoraCamDevicesRecordingsAndEventsListForDeviceCmd() { SoraCamDevicesRecordingsAndEventsListForDeviceCmd.Flags().StringVar(&SoraCamDevicesRecordingsAndEventsListForDeviceCmdDeviceId, "device-id", "", TRAPI("Device ID of the compatible camera device.")) @@ -35,6 +38,8 @@ func InitSoraCamDevicesRecordingsAndEventsListForDeviceCmd() { SoraCamDevicesRecordingsAndEventsListForDeviceCmd.Flags().Int64Var(&SoraCamDevicesRecordingsAndEventsListForDeviceCmdTo, "to", 0, TRAPI("End time of the list to be searched (unix time in milliseconds). If not specified, 'to' is set to the current time.")) + SoraCamDevicesRecordingsAndEventsListForDeviceCmd.Flags().BoolVar(&SoraCamDevicesRecordingsAndEventsListForDeviceCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + SoraCamDevicesRecordingsAndEventsListForDeviceCmd.RunE = SoraCamDevicesRecordingsAndEventsListForDeviceCmdRunE SoraCamDevicesRecordingsAndEventsCmd.AddCommand(SoraCamDevicesRecordingsAndEventsListForDeviceCmd) @@ -104,6 +109,10 @@ func collectSoraCamDevicesRecordingsAndEventsListForDeviceCmdParams(ac *apiClien path: buildPathForSoraCamDevicesRecordingsAndEventsListForDeviceCmd("/sora_cam/devices/{device_id}/recordings_and_events"), query: buildQueryForSoraCamDevicesRecordingsAndEventsListForDeviceCmd(), + doPagination: SoraCamDevicesRecordingsAndEventsListForDeviceCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/sora_cam_devices_videos_list_exports.go b/soracom/generated/cmd/sora_cam_devices_videos_list_exports.go index 970a19bd..209f4f9b 100644 --- a/soracom/generated/cmd/sora_cam_devices_videos_list_exports.go +++ b/soracom/generated/cmd/sora_cam_devices_videos_list_exports.go @@ -21,6 +21,9 @@ var SoraCamDevicesVideosListExportsCmdSort string // SoraCamDevicesVideosListExportsCmdLimit holds value of 'limit' option var SoraCamDevicesVideosListExportsCmdLimit int64 +// SoraCamDevicesVideosListExportsCmdPaginate indicates to do pagination or not +var SoraCamDevicesVideosListExportsCmdPaginate bool + // SoraCamDevicesVideosListExportsCmdOutputJSONL indicates to output with jsonl format var SoraCamDevicesVideosListExportsCmdOutputJSONL bool @@ -33,6 +36,8 @@ func InitSoraCamDevicesVideosListExportsCmd() { SoraCamDevicesVideosListExportsCmd.Flags().Int64Var(&SoraCamDevicesVideosListExportsCmdLimit, "limit", 10, TRAPI("Maximum number of items to retrieve in one request. Note that the response may contain fewer items than the specified limit.")) + SoraCamDevicesVideosListExportsCmd.Flags().BoolVar(&SoraCamDevicesVideosListExportsCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + SoraCamDevicesVideosListExportsCmd.Flags().BoolVar(&SoraCamDevicesVideosListExportsCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) SoraCamDevicesVideosListExportsCmd.RunE = SoraCamDevicesVideosListExportsCmdRunE @@ -102,6 +107,10 @@ func collectSoraCamDevicesVideosListExportsCmdParams(ac *apiClient) (*apiParams, path: buildPathForSoraCamDevicesVideosListExportsCmd("/sora_cam/devices/videos/exports"), query: buildQueryForSoraCamDevicesVideosListExportsCmd(), + doPagination: SoraCamDevicesVideosListExportsCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/sora_cam_devices_videos_list_exports_for_device.go b/soracom/generated/cmd/sora_cam_devices_videos_list_exports_for_device.go index 2a072801..2cb99ffa 100644 --- a/soracom/generated/cmd/sora_cam_devices_videos_list_exports_for_device.go +++ b/soracom/generated/cmd/sora_cam_devices_videos_list_exports_for_device.go @@ -21,6 +21,9 @@ var SoraCamDevicesVideosListExportsForDeviceCmdSort string // SoraCamDevicesVideosListExportsForDeviceCmdLimit holds value of 'limit' option var SoraCamDevicesVideosListExportsForDeviceCmdLimit int64 +// SoraCamDevicesVideosListExportsForDeviceCmdPaginate indicates to do pagination or not +var SoraCamDevicesVideosListExportsForDeviceCmdPaginate bool + // SoraCamDevicesVideosListExportsForDeviceCmdOutputJSONL indicates to output with jsonl format var SoraCamDevicesVideosListExportsForDeviceCmdOutputJSONL bool @@ -33,6 +36,8 @@ func InitSoraCamDevicesVideosListExportsForDeviceCmd() { SoraCamDevicesVideosListExportsForDeviceCmd.Flags().Int64Var(&SoraCamDevicesVideosListExportsForDeviceCmdLimit, "limit", 10, TRAPI("Maximum number of items to retrieve in one request. Note that the response may contain fewer items than the specified limit.")) + SoraCamDevicesVideosListExportsForDeviceCmd.Flags().BoolVar(&SoraCamDevicesVideosListExportsForDeviceCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + SoraCamDevicesVideosListExportsForDeviceCmd.Flags().BoolVar(&SoraCamDevicesVideosListExportsForDeviceCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) SoraCamDevicesVideosListExportsForDeviceCmd.RunE = SoraCamDevicesVideosListExportsForDeviceCmdRunE @@ -108,6 +113,10 @@ func collectSoraCamDevicesVideosListExportsForDeviceCmdParams(ac *apiClient) (*a path: buildPathForSoraCamDevicesVideosListExportsForDeviceCmd("/sora_cam/devices/{device_id}/videos/exports"), query: buildQueryForSoraCamDevicesVideosListExportsForDeviceCmd(), + doPagination: SoraCamDevicesVideosListExportsForDeviceCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/soralets_get_logs.go b/soracom/generated/cmd/soralets_get_logs.go index deac0e0b..37494601 100644 --- a/soracom/generated/cmd/soralets_get_logs.go +++ b/soracom/generated/cmd/soralets_get_logs.go @@ -21,6 +21,9 @@ var SoraletsGetLogsCmdSort string // SoraletsGetLogsCmdLimit holds value of 'limit' option var SoraletsGetLogsCmdLimit int64 +// SoraletsGetLogsCmdPaginate indicates to do pagination or not +var SoraletsGetLogsCmdPaginate bool + // SoraletsGetLogsCmdOutputJSONL indicates to output with jsonl format var SoraletsGetLogsCmdOutputJSONL bool @@ -33,6 +36,8 @@ func InitSoraletsGetLogsCmd() { SoraletsGetLogsCmd.Flags().Int64Var(&SoraletsGetLogsCmdLimit, "limit", 0, TRAPI("The maximum number of items in a response.")) + SoraletsGetLogsCmd.Flags().BoolVar(&SoraletsGetLogsCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + SoraletsGetLogsCmd.Flags().BoolVar(&SoraletsGetLogsCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) SoraletsGetLogsCmd.RunE = SoraletsGetLogsCmdRunE @@ -109,6 +114,10 @@ func collectSoraletsGetLogsCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForSoraletsGetLogsCmd("/soralets/{soralet_id}/logs"), query: buildQueryForSoraletsGetLogsCmd(), + doPagination: SoraletsGetLogsCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/soralets_list.go b/soracom/generated/cmd/soralets_list.go index 2aa29808..2b6d96e9 100644 --- a/soracom/generated/cmd/soralets_list.go +++ b/soracom/generated/cmd/soralets_list.go @@ -18,6 +18,9 @@ var SoraletsListCmdSort string // SoraletsListCmdLimit holds value of 'limit' option var SoraletsListCmdLimit int64 +// SoraletsListCmdPaginate indicates to do pagination or not +var SoraletsListCmdPaginate bool + // SoraletsListCmdOutputJSONL indicates to output with jsonl format var SoraletsListCmdOutputJSONL bool @@ -28,6 +31,8 @@ func InitSoraletsListCmd() { SoraletsListCmd.Flags().Int64Var(&SoraletsListCmdLimit, "limit", 0, TRAPI("The maximum number of items in a response.")) + SoraletsListCmd.Flags().BoolVar(&SoraletsListCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + SoraletsListCmd.Flags().BoolVar(&SoraletsListCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) SoraletsListCmd.RunE = SoraletsListCmdRunE @@ -97,6 +102,10 @@ func collectSoraletsListCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForSoraletsListCmd("/soralets"), query: buildQueryForSoraletsListCmd(), + doPagination: SoraletsListCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/soralets_list_versions.go b/soracom/generated/cmd/soralets_list_versions.go index e045adb0..ca18eb2f 100644 --- a/soracom/generated/cmd/soralets_list_versions.go +++ b/soracom/generated/cmd/soralets_list_versions.go @@ -21,6 +21,9 @@ var SoraletsListVersionsCmdSort string // SoraletsListVersionsCmdLimit holds value of 'limit' option var SoraletsListVersionsCmdLimit int64 +// SoraletsListVersionsCmdPaginate indicates to do pagination or not +var SoraletsListVersionsCmdPaginate bool + // SoraletsListVersionsCmdOutputJSONL indicates to output with jsonl format var SoraletsListVersionsCmdOutputJSONL bool @@ -33,6 +36,8 @@ func InitSoraletsListVersionsCmd() { SoraletsListVersionsCmd.Flags().Int64Var(&SoraletsListVersionsCmdLimit, "limit", 0, TRAPI("The maximum number of items in a response.")) + SoraletsListVersionsCmd.Flags().BoolVar(&SoraletsListVersionsCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + SoraletsListVersionsCmd.Flags().BoolVar(&SoraletsListVersionsCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) SoraletsListVersionsCmd.RunE = SoraletsListVersionsCmdRunE @@ -109,6 +114,10 @@ func collectSoraletsListVersionsCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForSoraletsListVersionsCmd("/soralets/{soralet_id}/versions"), query: buildQueryForSoraletsListVersionsCmd(), + doPagination: SoraletsListVersionsCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/subscribers_get_data.go b/soracom/generated/cmd/subscribers_get_data.go index cfaace4f..2e408777 100644 --- a/soracom/generated/cmd/subscribers_get_data.go +++ b/soracom/generated/cmd/subscribers_get_data.go @@ -27,6 +27,9 @@ var SubscribersGetDataCmdLimit int64 // SubscribersGetDataCmdTo holds value of 'to' option var SubscribersGetDataCmdTo int64 +// SubscribersGetDataCmdPaginate indicates to do pagination or not +var SubscribersGetDataCmdPaginate bool + // SubscribersGetDataCmdOutputJSONL indicates to output with jsonl format var SubscribersGetDataCmdOutputJSONL bool @@ -43,6 +46,8 @@ func InitSubscribersGetDataCmd() { SubscribersGetDataCmd.Flags().Int64Var(&SubscribersGetDataCmdTo, "to", 0, TRAPI("End time for the data entries search range (UNIX time in milliseconds).")) + SubscribersGetDataCmd.Flags().BoolVar(&SubscribersGetDataCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + SubscribersGetDataCmd.Flags().BoolVar(&SubscribersGetDataCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) SubscribersGetDataCmd.RunE = SubscribersGetDataCmdRunE @@ -118,6 +123,10 @@ func collectSubscribersGetDataCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForSubscribersGetDataCmd("/subscribers/{imsi}/data"), query: buildQueryForSubscribersGetDataCmd(), + doPagination: SubscribersGetDataCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/subscribers_list.go b/soracom/generated/cmd/subscribers_list.go index 9ab85562..ff2fe6b2 100644 --- a/soracom/generated/cmd/subscribers_list.go +++ b/soracom/generated/cmd/subscribers_list.go @@ -33,6 +33,9 @@ var SubscribersListCmdTagValueMatchMode string // SubscribersListCmdLimit holds value of 'limit' option var SubscribersListCmdLimit int64 +// SubscribersListCmdPaginate indicates to do pagination or not +var SubscribersListCmdPaginate bool + // SubscribersListCmdOutputJSONL indicates to output with jsonl format var SubscribersListCmdOutputJSONL bool @@ -53,6 +56,8 @@ func InitSubscribersListCmd() { SubscribersListCmd.Flags().Int64Var(&SubscribersListCmdLimit, "limit", 0, TRAPI("Maximum number of subscribers to retrieve (value range is 1 to 100). However, the number of subscribers returned may be less than the specified value.")) + SubscribersListCmd.Flags().BoolVar(&SubscribersListCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + SubscribersListCmd.Flags().BoolVar(&SubscribersListCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) SubscribersListCmd.RunE = SubscribersListCmdRunE @@ -122,6 +127,10 @@ func collectSubscribersListCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForSubscribersListCmd("/subscribers"), query: buildQueryForSubscribersListCmd(), + doPagination: SubscribersListCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/subscribers_session_events.go b/soracom/generated/cmd/subscribers_session_events.go index bc76d955..7e11552c 100644 --- a/soracom/generated/cmd/subscribers_session_events.go +++ b/soracom/generated/cmd/subscribers_session_events.go @@ -24,6 +24,9 @@ var SubscribersSessionEventsCmdLimit int64 // SubscribersSessionEventsCmdTo holds value of 'to' option var SubscribersSessionEventsCmdTo int64 +// SubscribersSessionEventsCmdPaginate indicates to do pagination or not +var SubscribersSessionEventsCmdPaginate bool + // SubscribersSessionEventsCmdOutputJSONL indicates to output with jsonl format var SubscribersSessionEventsCmdOutputJSONL bool @@ -38,6 +41,8 @@ func InitSubscribersSessionEventsCmd() { SubscribersSessionEventsCmd.Flags().Int64Var(&SubscribersSessionEventsCmdTo, "to", 0, TRAPI("End time for the events search range (UNIX time in milliseconds).")) + SubscribersSessionEventsCmd.Flags().BoolVar(&SubscribersSessionEventsCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + SubscribersSessionEventsCmd.Flags().BoolVar(&SubscribersSessionEventsCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) SubscribersSessionEventsCmd.RunE = SubscribersSessionEventsCmdRunE @@ -113,6 +118,10 @@ func collectSubscribersSessionEventsCmdParams(ac *apiClient) (*apiParams, error) path: buildPathForSubscribersSessionEventsCmd("/subscribers/{imsi}/events/sessions"), query: buildQueryForSubscribersSessionEventsCmd(), + doPagination: SubscribersSessionEventsCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/vpg_list.go b/soracom/generated/cmd/vpg_list.go index 65174825..bdef0668 100644 --- a/soracom/generated/cmd/vpg_list.go +++ b/soracom/generated/cmd/vpg_list.go @@ -24,6 +24,9 @@ var VpgListCmdTagValueMatchMode string // VpgListCmdLimit holds value of 'limit' option var VpgListCmdLimit int64 +// VpgListCmdPaginate indicates to do pagination or not +var VpgListCmdPaginate bool + // VpgListCmdOutputJSONL indicates to output with jsonl format var VpgListCmdOutputJSONL bool @@ -38,6 +41,8 @@ func InitVpgListCmd() { VpgListCmd.Flags().Int64Var(&VpgListCmdLimit, "limit", 0, TRAPI("Maximum number of results per response page.")) + VpgListCmd.Flags().BoolVar(&VpgListCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + VpgListCmd.Flags().BoolVar(&VpgListCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) VpgListCmd.RunE = VpgListCmdRunE @@ -107,6 +112,10 @@ func collectVpgListCmdParams(ac *apiClient) (*apiParams, error) { path: buildPathForVpgListCmd("/virtual_private_gateways"), query: buildQueryForVpgListCmd(), + doPagination: VpgListCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/vpg_list_ip_address_map_entries.go b/soracom/generated/cmd/vpg_list_ip_address_map_entries.go index 1493780e..9c2d1d84 100644 --- a/soracom/generated/cmd/vpg_list_ip_address_map_entries.go +++ b/soracom/generated/cmd/vpg_list_ip_address_map_entries.go @@ -18,6 +18,9 @@ var VpgListIpAddressMapEntriesCmdVpgId string // VpgListIpAddressMapEntriesCmdLimit holds value of 'limit' option var VpgListIpAddressMapEntriesCmdLimit int64 +// VpgListIpAddressMapEntriesCmdPaginate indicates to do pagination or not +var VpgListIpAddressMapEntriesCmdPaginate bool + // VpgListIpAddressMapEntriesCmdOutputJSONL indicates to output with jsonl format var VpgListIpAddressMapEntriesCmdOutputJSONL bool @@ -28,6 +31,8 @@ func InitVpgListIpAddressMapEntriesCmd() { VpgListIpAddressMapEntriesCmd.Flags().Int64Var(&VpgListIpAddressMapEntriesCmdLimit, "limit", 0, TRAPI("The maximum number of IP Address Map entries to return.")) + VpgListIpAddressMapEntriesCmd.Flags().BoolVar(&VpgListIpAddressMapEntriesCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + VpgListIpAddressMapEntriesCmd.Flags().BoolVar(&VpgListIpAddressMapEntriesCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) VpgListIpAddressMapEntriesCmd.RunE = VpgListIpAddressMapEntriesCmdRunE @@ -104,6 +109,10 @@ func collectVpgListIpAddressMapEntriesCmdParams(ac *apiClient) (*apiParams, erro path: buildPathForVpgListIpAddressMapEntriesCmd("/virtual_private_gateways/{vpg_id}/ip_address_map"), query: buildQueryForVpgListIpAddressMapEntriesCmd(), + doPagination: VpgListIpAddressMapEntriesCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil } diff --git a/soracom/generated/cmd/vpg_list_packet_capture_sessions.go b/soracom/generated/cmd/vpg_list_packet_capture_sessions.go index aabdbf11..9053dfa4 100644 --- a/soracom/generated/cmd/vpg_list_packet_capture_sessions.go +++ b/soracom/generated/cmd/vpg_list_packet_capture_sessions.go @@ -18,6 +18,9 @@ var VpgListPacketCaptureSessionsCmdVpgId string // VpgListPacketCaptureSessionsCmdLimit holds value of 'limit' option var VpgListPacketCaptureSessionsCmdLimit int64 +// VpgListPacketCaptureSessionsCmdPaginate indicates to do pagination or not +var VpgListPacketCaptureSessionsCmdPaginate bool + // VpgListPacketCaptureSessionsCmdOutputJSONL indicates to output with jsonl format var VpgListPacketCaptureSessionsCmdOutputJSONL bool @@ -28,6 +31,8 @@ func InitVpgListPacketCaptureSessionsCmd() { VpgListPacketCaptureSessionsCmd.Flags().Int64Var(&VpgListPacketCaptureSessionsCmdLimit, "limit", 10, TRAPI("Max number of results in a response.")) + VpgListPacketCaptureSessionsCmd.Flags().BoolVar(&VpgListPacketCaptureSessionsCmdPaginate, "fetch-all", false, TRCLI("cli.common_params.paginate.short_help")) + VpgListPacketCaptureSessionsCmd.Flags().BoolVar(&VpgListPacketCaptureSessionsCmdOutputJSONL, "jsonl", false, TRCLI("cli.common_params.jsonl.short_help")) VpgListPacketCaptureSessionsCmd.RunE = VpgListPacketCaptureSessionsCmdRunE @@ -104,6 +109,10 @@ func collectVpgListPacketCaptureSessionsCmdParams(ac *apiClient) (*apiParams, er path: buildPathForVpgListPacketCaptureSessionsCmd("/virtual_private_gateways/{vpg_id}/packet_capture_sessions"), query: buildQueryForVpgListPacketCaptureSessionsCmd(), + doPagination: VpgListPacketCaptureSessionsCmdPaginate, + paginationKeyHeaderInResponse: "x-soracom-next-key", + paginationRequestParameterInQuery: "last_evaluated_key", + noRetryOnError: noRetryOnError, }, nil }