From d8544cf93c501d33af2f2d7263e300d485f6b68e Mon Sep 17 00:00:00 2001 From: Chris Lee Date: Fri, 20 Dec 2024 14:57:12 -0800 Subject: [PATCH 1/4] fix: check v.Errors length to avoid panic --- service/cip/api_access_key_CreateAccessKey.go | 17 ++++++----- service/cip/api_access_key_DeleteAccessKey.go | 14 ++++++---- service/cip/api_access_key_ListAccessKeys.go | 14 ++++++---- .../api_access_key_ListPersonalAccessKeys.go | 13 +++++---- service/cip/api_access_key_UpdateAccessKey.go | 14 ++++++---- service/cip/api_account_CreateSubdomain.go | 14 ++++++---- service/cip/api_account_DeleteSubdomain.go | 13 +++++---- service/cip/api_account_GetAccountOwner.go | 13 +++++---- service/cip/api_account_GetStatus.go | 13 +++++---- service/cip/api_account_GetSubdomain.go | 13 +++++---- service/cip/api_account_RecoverSubdomain.go | 14 ++++++---- service/cip/api_account_UpdateSubdomain.go | 14 ++++++---- service/cip/api_app_GetApp.go | 14 ++++++---- service/cip/api_app_GetAsyncInstallStatus.go | 14 ++++++---- service/cip/api_app_InstallApp.go | 14 ++++++---- service/cip/api_app_ListApps.go | 13 +++++---- service/cip/api_archive_CreateArchiveJob.go | 14 ++++++---- service/cip/api_archive_DeleteArchiveJob.go | 14 ++++++---- .../api_archive_ListArchiveJobsBySourceId.go | 14 ++++++---- ...i_archive_ListArchiveJobsCountPerSource.go | 13 +++++---- service/cip/api_collectors_CreateCollector.go | 1 + .../cip/api_collectors_DeleteCollectorById.go | 1 + .../api_collectors_DeleteOfflineCollectors.go | 5 ++-- .../cip/api_collectors_GetCollectorById.go | 1 + .../cip/api_collectors_GetCollectorByName.go | 1 + .../api_collectors_GetUpgradableCollectors.go | 1 + ...lectors_GetUpgradeOrDowngradeTaskStatus.go | 1 + service/cip/api_collectors_ListCollectors.go | 1 + .../api_collectors_ListOfflineCollectors.go | 1 + .../api_collectors_UpdateHostedCollector.go | 1 + ...api_collectors_UpdateInstalledCollector.go | 1 + ...i_connection_CreateServiceNowConnection.go | 14 ++++++---- .../api_connection_CreateWebhookConnection.go | 14 ++++++---- .../cip/api_connection_DeleteConnection.go | 14 ++++++---- service/cip/api_connection_GetConnection.go | 14 ++++++---- service/cip/api_connection_ListConnections.go | 14 ++++++---- ...api_connection_TestServiceNowConnection.go | 14 ++++++---- .../api_connection_TestWebhookConnection.go | 14 ++++++---- ...i_connection_UpdateServiceNowConnection.go | 14 ++++++---- .../api_connection_UpdateWebhookConnection.go | 14 ++++++---- service/cip/api_content_AsyncCopyStatus.go | 14 ++++++---- service/cip/api_content_BeginAsyncCopy.go | 14 ++++++---- service/cip/api_content_BeginAsyncDelete.go | 14 ++++++---- service/cip/api_content_BeginAsyncExport.go | 14 ++++++---- .../api_content_BeginDashboardAsyncImport.go | 14 ++++++---- .../cip/api_content_BeginFolderAsyncImport.go | 14 ++++++---- .../api_content_BeginLookTableAsyncImport.go | 14 ++++++---- ...tent_BeginMetricsSavedSearchAsyncImport.go | 14 ++++++---- ...i_content_BeginMetricsSearchAsyncImport.go | 14 ++++++---- .../api_content_BeginMewboardAsyncImport.go | 14 ++++++---- ...api_content_BeginSavedSearchAsyncImport.go | 14 ++++++---- .../cip/api_content_GetAsyncDeleteStatus.go | 14 ++++++---- .../cip/api_content_GetAsyncExportResult.go | 14 ++++++---- .../cip/api_content_GetAsyncExportStatus.go | 14 ++++++---- .../cip/api_content_GetAsyncImportStatus.go | 14 ++++++---- ...i_content_GetDashboardAsyncExportResult.go | 14 ++++++---- .../api_content_GetFolderAsyncExportResult.go | 14 ++++++---- service/cip/api_content_GetItemByPath.go | 14 ++++++---- ...content_GetLookupTableAsyncExportResult.go | 14 ++++++---- ..._GetMetricsSavedSearchAsyncExportResult.go | 14 ++++++---- ...ntent_GetMetricsSearchAsyncExportResult.go | 14 ++++++---- ...pi_content_GetMewboardAsyncExportResult.go | 14 ++++++---- service/cip/api_content_GetPathById.go | 14 ++++++---- ...content_GetSavedSearchAsyncExportResult.go | 14 ++++++---- service/cip/api_content_MoveItem.go | 14 ++++++---- ...ntent_permissions_AddContentPermissions.go | 14 ++++++---- ...ntent_permissions_GetContentPermissions.go | 14 ++++++---- ...nt_permissions_RemoveContentPermissions.go | 14 ++++++---- service/cip/api_dashboard_CreateDashboard.go | 14 ++++++---- service/cip/api_dashboard_DeleteDashboard.go | 14 ++++++---- service/cip/api_dashboard_GetDashboard.go | 14 ++++++---- service/cip/api_dashboard_UpdateDashboard.go | 14 ++++++---- ...ynamic_parsing_CreateDynamicParsingRule.go | 14 ++++++---- ...ynamic_parsing_DeleteDynamicParsingRule.go | 14 ++++++---- ...i_dynamic_parsing_GetDynamicParsingRule.go | 14 ++++++---- ...dynamic_parsing_ListDynamicParsingRules.go | 14 ++++++---- ...ynamic_parsing_UpdateDynamicParsingRule.go | 14 ++++++---- ...pi_extraction_rule_CreateExtractionRule.go | 14 ++++++---- ...pi_extraction_rule_DeleteExtractionRule.go | 14 ++++++---- .../api_extraction_rule_GetExtractionRule.go | 14 ++++++---- .../api_extraction_rule_ListExtractionRule.go | 20 +++++++------ ...pi_extraction_rule_UpdateExtractionRule.go | 18 +++++++----- .../cip/api_field_management_CreateField.go | 14 ++++++---- .../cip/api_field_management_DeleteField.go | 14 ++++++---- .../cip/api_field_management_DisableField.go | 14 ++++++---- .../cip/api_field_management_EnableField.go | 14 ++++++---- .../api_field_management_GetBuiltInField.go | 14 ++++++---- .../api_field_management_GetCustomField.go | 14 ++++++---- .../cip/api_field_management_GetFieldQuota.go | 13 +++++---- .../api_field_management_ListBuiltInFields.go | 13 +++++---- .../api_field_management_ListCustomFields.go | 13 +++++---- .../api_field_management_ListDroppedFields.go | 13 +++++---- service/cip/api_folder_CreateFolder.go | 14 ++++++---- ...i_folder_GetAdminRecommendedFolderAsync.go | 14 ++++++---- ..._folder_GetAdminRecommendedFolderResult.go | 14 ++++++---- ..._folder_GetAdminRecommendedFolderStatus.go | 14 ++++++---- service/cip/api_folder_GetFolder.go | 14 ++++++---- .../cip/api_folder_GetGlobalFolderAsync.go | 14 ++++++---- .../api_folder_GetGlobalFolderAsyncResult.go | 14 ++++++---- .../api_folder_GetGlobalFolderAsyncStatus.go | 14 ++++++---- service/cip/api_folder_GetPersonalFolder.go | 13 +++++---- service/cip/api_folder_UpdateFolder.go | 14 ++++++---- service/cip/api_general_SendMessage.go | 1 + .../api_health_events_ListAllHealthEvents.go | 20 +++++++------ ..._events_ListAllHealthEventsForResources.go | 22 +++++++++------ ...ngest_budget_v1_AssignCollectorToBudget.go | 14 ++++++---- ...api_ingest_budget_v1_CreateIngestBudget.go | 14 ++++++---- ...api_ingest_budget_v1_DeleteIngestBudget.go | 14 ++++++---- ..._ingest_budget_v1_GetAssignedCollectors.go | 22 +++++++++------ .../api_ingest_budget_v1_GetIngestBudget.go | 14 ++++++---- .../api_ingest_budget_v1_ListIngestBudgets.go | 20 +++++++------ ...est_budget_v1_RemoveCollectorFromBudget.go | 14 ++++++---- .../cip/api_ingest_budget_v1_ResetUsage.go | 14 ++++++---- ...api_ingest_budget_v1_UpdateIngestBudget.go | 14 ++++++---- ...api_ingest_budget_v2_CreateIngestBudget.go | 14 ++++++---- ...api_ingest_budget_v2_DeleteIngestBudget.go | 14 ++++++---- .../api_ingest_budget_v2_GetIngestBudget.go | 14 ++++++---- .../api_ingest_budget_v2_ListIngestBudgets.go | 20 +++++++------ .../cip/api_ingest_budget_v2_ResetUsage.go | 14 ++++++---- ...api_ingest_budget_v2_UpdateIngestBudget.go | 14 ++++++---- ...imated_usage_GetLogSearchEstimatedUsage.go | 14 ++++++---- ..._usage_GetLogSearchEstimatedUsageByTier.go | 14 ++++++---- service/cip/api_lookup_CreateTable.go | 14 ++++++---- service/cip/api_lookup_DeleteTable.go | 14 ++++++---- service/cip/api_lookup_DeleteTableRow.go | 14 ++++++---- service/cip/api_lookup_LookupTableById.go | 14 ++++++---- service/cip/api_lookup_RequestJobStatus.go | 14 ++++++---- service/cip/api_lookup_TruncateTable.go | 14 ++++++---- service/cip/api_lookup_UpdateTable.go | 14 ++++++---- service/cip/api_lookup_UpdateTableRow.go | 14 ++++++---- service/cip/api_lookup_UploadFile.go | 14 ++++++---- .../api_metrics_query_RunMetricsQueries.go | 14 ++++++---- ...pi_metrics_searches_CreateMetricsSearch.go | 14 ++++++---- ...pi_metrics_searches_DeleteMetricsSearch.go | 14 ++++++---- .../api_metrics_searches_GetMetricsSearch.go | 14 ++++++---- ...pi_metrics_searches_UpdateMetricsSearch.go | 14 ++++++---- service/cip/api_monitors_CopyMonitors.go | 14 ++++++---- service/cip/api_monitors_CreateMonitors.go | 13 +++++---- .../cip/api_monitors_DeleteMonitorsById.go | 14 ++++++---- .../cip/api_monitors_DeleteMonitorsByIds.go | 14 ++++++---- .../cip/api_monitors_ExportMonitorsItem.go | 14 ++++++---- .../cip/api_monitors_GetMonitorUsageInfo.go | 13 +++++---- service/cip/api_monitors_GetMonitorsById.go | 14 ++++++---- service/cip/api_monitors_GetMonitorsByIds.go | 14 ++++++---- service/cip/api_monitors_GetMonitorsByPath.go | 15 ++++++---- .../cip/api_monitors_GetMonitorsFullPath.go | 14 ++++++---- .../api_monitors_GetMonitorsLibraryRoot.go | 13 +++++---- .../cip/api_monitors_ImportMonitorsItem.go | 14 ++++++---- service/cip/api_monitors_MoveMonitors.go | 14 ++++++---- service/cip/api_monitors_SearchMonitors.go | 14 ++++++---- .../cip/api_monitors_UpdateMonitorsById.go | 14 ++++++---- .../api_monitors_ValidateMonitorQueries.go | 14 ++++++---- .../api_organizations_CreateOrganization.go | 14 ++++++---- ...ganizations_CreateOrganizationAccessKey.go | 14 ++++++---- .../api_organizations_DeleteOrganization.go | 14 ++++++---- .../cip/api_organizations_GetDeployments.go | 14 ++++++---- .../cip/api_organizations_GetOrganization.go | 14 ++++++---- .../api_organizations_GetOrganizationUsage.go | 17 ++++++----- ...api_organizations_GetOrganizationUsages.go | 15 ++++++---- ...anizations_GetParentOrganizationDetails.go | 14 ++++++---- ...organizations_GetParentOrganizationInfo.go | 14 ++++++---- .../api_organizations_GetSubdomainLoginUrl.go | 14 ++++++---- .../api_organizations_ListOrganizations.go | 14 ++++++---- .../api_organizations_UpdateOrganization.go | 14 ++++++---- .../api_partition_CancelRetentionUpdate.go | 14 ++++++---- service/cip/api_partition_CreatePartition.go | 18 +++++++----- .../api_partition_DecommissionPartition.go | 14 ++++++---- service/cip/api_partition_GetPartition.go | 14 ++++++---- service/cip/api_partition_ListPartitions.go | 28 +++++++++++-------- service/cip/api_partition_UpdatePartition.go | 14 ++++++---- .../api_password_policy_GetPasswordPolicy.go | 13 +++++---- .../api_password_policy_SetPasswordPolicy.go | 14 ++++++---- service/cip/api_policies_GetAuditPolicy.go | 13 +++++---- .../api_policies_GetDataAccessLevelPolicy.go | 13 +++++---- ...policies_GetMaxUserSessionTimeoutPolicy.go | 13 +++++---- .../cip/api_policies_GetSearchAuditPolicy.go | 13 +++++---- ...hareDashboardsOutsideOrganizationPolicy.go | 13 +++++---- ...es_GetUserConcurrentSessionsLimitPolicy.go | 13 +++++---- service/cip/api_policies_SetAuditPolicy.go | 14 ++++++---- .../api_policies_SetDataAccessLevelPolicy.go | 14 ++++++---- ...policies_SetMaxUserSessionTimeoutPolicy.go | 14 ++++++---- .../cip/api_policies_SetSearchAuditPolicy.go | 14 ++++++---- ...hareDashboardsOutsideOrganizationPolicy.go | 14 ++++++---- ...es_SetUserConcurrentSessionsLimitPolicy.go | 14 ++++++---- service/cip/api_role_AssignRoleToUser.go | 14 ++++++---- service/cip/api_role_CreateRole.go | 14 ++++++---- service/cip/api_role_DeleteRole.go | 14 ++++++---- service/cip/api_role_GetRole.go | 14 ++++++---- service/cip/api_role_ListRoles.go | 14 ++++++---- service/cip/api_role_RemoveRoleFromUser.go | 14 ++++++---- service/cip/api_role_UpdateRole.go | 14 ++++++---- ...aml_configuration_CreateAllowlistedUser.go | 14 ++++++---- ...ml_configuration_CreateIdentityProvider.go | 14 ++++++---- ...aml_configuration_DeleteAllowlistedUser.go | 14 ++++++---- ...ml_configuration_DeleteIdentityProvider.go | 14 ++++++---- ..._saml_configuration_DisableSamlLockdown.go | 13 +++++---- ...i_saml_configuration_EnableSamlLockdown.go | 13 +++++---- ..._saml_configuration_GetAllowlistedUsers.go | 13 +++++---- ...saml_configuration_GetIdentityProviders.go | 13 +++++---- ...ml_configuration_UpdateIdentityProvider.go | 14 ++++++---- .../api_scheduled_view_CreateScheduledView.go | 14 ++++++---- ...api_scheduled_view_DisableScheduledView.go | 14 ++++++---- .../api_scheduled_view_GetScheduledView.go | 14 ++++++---- .../api_scheduled_view_ListScheduledViews.go | 14 ++++++---- .../api_scheduled_view_PauseScheduledView.go | 14 ++++++---- .../api_scheduled_view_StartScheduledView.go | 14 ++++++---- .../api_scheduled_view_UpdateScheduledView.go | 14 ++++++---- ...i_service_allowlist_AddAllowlistedCidrs.go | 14 ++++++---- ...ervice_allowlist_DeleteAllowlistedCidrs.go | 14 ++++++---- ...i_service_allowlist_DisableAllowlisting.go | 14 ++++++---- ...pi_service_allowlist_EnableAllowlisting.go | 14 ++++++---- ...service_allowlist_GetAllowlistingStatus.go | 13 +++++---- ..._service_allowlist_ListAllowlistedCidrs.go | 13 +++++---- .../api_sources_CreateAWSS3ArchiveSource.go | 1 + .../cip/api_sources_CreateEventHubSource.go | 1 + service/cip/api_sources_DeleteSource.go | 1 + .../cip/api_sources_GetAWSS3ArchiveSource.go | 1 + service/cip/api_sources_GetEventHubSource.go | 1 + .../cip/api_sources_UpdateEventHubSource.go | 1 + service/cip/api_tokens_CreateToken.go | 14 ++++++---- service/cip/api_tokens_DeleteToken.go | 14 ++++++---- service/cip/api_tokens_GetToken.go | 14 ++++++---- service/cip/api_tokens_ListTokens.go | 13 +++++---- service/cip/api_tokens_UpdateToken.go | 14 ++++++---- ...formation_rule_CreateTransformationRule.go | 14 ++++++---- ...formation_rule_DeleteTransformationRule.go | 14 ++++++---- ...ansformation_rule_GetTransformationRule.go | 14 ++++++---- ...sformation_rule_ListTransformationRules.go | 20 +++++++------ ...formation_rule_UpdateTransformationRule.go | 14 ++++++---- service/cip/api_user_CreateUser.go | 14 ++++++---- service/cip/api_user_DeleteUser.go | 14 ++++++---- service/cip/api_user_DisableMfa.go | 14 ++++++---- service/cip/api_user_GetUser.go | 14 ++++++---- service/cip/api_user_ListUsers.go | 14 ++++++---- service/cip/api_user_RequestChangeEmail.go | 14 ++++++---- service/cip/api_user_ResetPassword.go | 14 ++++++---- service/cip/api_user_UnlockUser.go | 14 ++++++---- service/cip/api_user_UpdateUser.go | 15 ++++++---- 238 files changed, 2008 insertions(+), 1142 deletions(-) diff --git a/service/cip/api_access_key_CreateAccessKey.go b/service/cip/api_access_key_CreateAccessKey.go index 1fe4766..421e0ec 100644 --- a/service/cip/api_access_key_CreateAccessKey.go +++ b/service/cip/api_access_key_CreateAccessKey.go @@ -1,11 +1,12 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -13,8 +14,8 @@ CreateAccessKey Creates a new access ID and key pair. The new access key can be used from the domains specified in corsHeaders field. Whether Sumo Logic accepts or rejects an API request depends on whether it contains an ORIGIN header and the entries in the allowlist. Sumo Logic will reject: - 1. Requests with an ORIGIN header but the allowlist is empty. - 2. Requests with an ORIGIN header that don't match any entry in the allowlist. + 1. Requests with an ORIGIN header but the allowlist is empty. + 2. Requests with an ORIGIN header that don't match any entry in the allowlist. */ func (a *APIClient) CreateAccessKey(body types.AccessKeyCreateRequest) (types.AccessKey, *http.Response, error) { var ( @@ -94,10 +95,12 @@ func (a *APIClient) CreateAccessKey(body types.AccessKeyCreateRequest) (types.Ac newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_access_key_DeleteAccessKey.go b/service/cip/api_access_key_DeleteAccessKey.go index 03faac2..ac8b720 100644 --- a/service/cip/api_access_key_DeleteAccessKey.go +++ b/service/cip/api_access_key_DeleteAccessKey.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteAccessKey Deletes the access key with the given accessId. + id - The accessId of the access key to delete. */ func (a *APIClient) DeleteAccessKey(id string) (*http.Response, error) { @@ -75,10 +77,12 @@ func (a *APIClient) DeleteAccessKey(id string) (*http.Response, error) { newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_access_key_ListAccessKeys.go b/service/cip/api_access_key_ListAccessKeys.go index ee0330c..799352b 100644 --- a/service/cip/api_access_key_ListAccessKeys.go +++ b/service/cip/api_access_key_ListAccessKeys.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ListAccessKeys List all access keys in your account. + optional - nil or *types.AccessKeyOpts - Optional Parameters: Limit (optional.Int32) - Limit the number of access keys returned in the response. The number of access keys returned may be less than the limit. Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. token is set to null when no more pages are left. @@ -97,10 +99,12 @@ func (a *APIClient) ListAccessKeys(localVarOptionals *types.AccessKeyOpts) (type newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_access_key_ListPersonalAccessKeys.go b/service/cip/api_access_key_ListPersonalAccessKeys.go index 12e160b..2a03182 100644 --- a/service/cip/api_access_key_ListPersonalAccessKeys.go +++ b/service/cip/api_access_key_ListPersonalAccessKeys.go @@ -1,11 +1,12 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -88,10 +89,12 @@ func (a *APIClient) ListPersonalAccessKeys() (types.ListAccessKeysResult, *http. newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_access_key_UpdateAccessKey.go b/service/cip/api_access_key_UpdateAccessKey.go index 72257c2..3a65a03 100644 --- a/service/cip/api_access_key_UpdateAccessKey.go +++ b/service/cip/api_access_key_UpdateAccessKey.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateAccessKey Updates the properties of existing accessKey by accessId. It can be used to enable or disable the access key and to update the corsHeaders list. + body - Information to update about the access key id - The accessId of the access key to update. */ @@ -94,10 +96,12 @@ func (a *APIClient) UpdateAccessKey(body types.AccessKeyUpdateRequest, id string newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_account_CreateSubdomain.go b/service/cip/api_account_CreateSubdomain.go index 8e4a6d1..caedcce 100644 --- a/service/cip/api_account_CreateSubdomain.go +++ b/service/cip/api_account_CreateSubdomain.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateSubdomain Create a subdomain. Only the Account Owner can create a subdomain. + body - The new subdomain. */ func (a *APIClient) CreateSubdomain(body types.ConfigureSubdomainRequest) (types.SubdomainDefinitionResponse, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) CreateSubdomain(body types.ConfigureSubdomainRequest) (types newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_account_DeleteSubdomain.go b/service/cip/api_account_DeleteSubdomain.go index 20e043d..af2a4a7 100644 --- a/service/cip/api_account_DeleteSubdomain.go +++ b/service/cip/api_account_DeleteSubdomain.go @@ -1,11 +1,12 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -72,10 +73,12 @@ func (a *APIClient) DeleteSubdomain() (*http.Response, error) { newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_account_GetAccountOwner.go b/service/cip/api_account_GetAccountOwner.go index ffecbb7..ed91330 100644 --- a/service/cip/api_account_GetAccountOwner.go +++ b/service/cip/api_account_GetAccountOwner.go @@ -1,11 +1,12 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -88,10 +89,12 @@ func (a *APIClient) GetAccountOwner() (string, *http.Response, error) { newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_account_GetStatus.go b/service/cip/api_account_GetStatus.go index 7accff6..d5d7f22 100644 --- a/service/cip/api_account_GetStatus.go +++ b/service/cip/api_account_GetStatus.go @@ -1,11 +1,12 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -88,10 +89,12 @@ func (a *APIClient) GetStatus() (types.AccountStatusResponse, *http.Response, er newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_account_GetSubdomain.go b/service/cip/api_account_GetSubdomain.go index 9e6c15e..eadfdd3 100644 --- a/service/cip/api_account_GetSubdomain.go +++ b/service/cip/api_account_GetSubdomain.go @@ -1,11 +1,12 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -88,10 +89,12 @@ func (a *APIClient) GetSubdomain() (types.SubdomainDefinitionResponse, *http.Res newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_account_RecoverSubdomain.go b/service/cip/api_account_RecoverSubdomain.go index 7cbf0ea..4215078 100644 --- a/service/cip/api_account_RecoverSubdomain.go +++ b/service/cip/api_account_RecoverSubdomain.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* RecoverSubdomains Send an email with the subdomain information for a user with the given email address. + email - Email address of the user to get subdomain information. */ func (a *APIClient) RecoverSubdomains(email string) (*http.Response, error) { @@ -74,10 +76,12 @@ func (a *APIClient) RecoverSubdomains(email string) (*http.Response, error) { newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_account_UpdateSubdomain.go b/service/cip/api_account_UpdateSubdomain.go index fe86273..a61d2aa 100644 --- a/service/cip/api_account_UpdateSubdomain.go +++ b/service/cip/api_account_UpdateSubdomain.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateSubdomain Update a subdomain. Only the Account Owner can update the subdomain. + body - The new subdomain. */ func (a *APIClient) UpdateSubdomain(body types.ConfigureSubdomainRequest) (types.SubdomainDefinitionResponse, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) UpdateSubdomain(body types.ConfigureSubdomainRequest) (types newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_app_GetApp.go b/service/cip/api_app_GetApp.go index 3dfb786..4fcad61 100644 --- a/service/cip/api_app_GetApp.go +++ b/service/cip/api_app_GetApp.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetApp Gets the app with the given universally unique identifier (UUID). + uuid - The identifier of the app to retrieve. */ func (a *APIClient) GetApp(uuid string) (types.App, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) GetApp(uuid string) (types.App, *http.Response, error) { newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_app_GetAsyncInstallStatus.go b/service/cip/api_app_GetAsyncInstallStatus.go index 44b25f4..c25b9a7 100644 --- a/service/cip/api_app_GetAsyncInstallStatus.go +++ b/service/cip/api_app_GetAsyncInstallStatus.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetAsyncInstallStatus Get the status of an asynchronous app install request for the given job identifier. + jobId - The identifier of the asynchronous install job. */ func (a *APIClient) GetAsyncInstallStatus(jobId string) (types.AsyncJobStatus, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) GetAsyncInstallStatus(jobId string) (types.AsyncJobStatus, * newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_app_InstallApp.go b/service/cip/api_app_InstallApp.go index a75cfc9..2744e32 100644 --- a/service/cip/api_app_InstallApp.go +++ b/service/cip/api_app_InstallApp.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* InstallApp Installs the app with given UUID in the folder specified using destinationFolderId. + body - Information for the new app uuid - UUID of the app to install. */ @@ -94,10 +96,12 @@ func (a *APIClient) InstallApp(body types.AppInstallRequest, uuid string) (types newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_app_ListApps.go b/service/cip/api_app_ListApps.go index a2e7f64..322f729 100644 --- a/service/cip/api_app_ListApps.go +++ b/service/cip/api_app_ListApps.go @@ -1,11 +1,12 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -88,10 +89,12 @@ func (a *APIClient) ListApps() (types.ListAppsResult, *http.Response, error) { newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_archive_CreateArchiveJob.go b/service/cip/api_archive_CreateArchiveJob.go index cc690b3..f5da750 100644 --- a/service/cip/api_archive_CreateArchiveJob.go +++ b/service/cip/api_archive_CreateArchiveJob.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateArchiveJob Create an ingestion job to pull data from your S3 bucket. + body - The definition of the ingestion job to create. sourceId - The identifier of the Archive Source for which the job is to be added. */ @@ -94,10 +96,12 @@ func (a *APIClient) CreateArchiveJob(body types.CreateArchiveJobRequest, sourceI newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_archive_DeleteArchiveJob.go b/service/cip/api_archive_DeleteArchiveJob.go index 1d3b991..df537d1 100644 --- a/service/cip/api_archive_DeleteArchiveJob.go +++ b/service/cip/api_archive_DeleteArchiveJob.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteArchiveJob Delete an ingestion job with the given identifier from the organization. The delete operation is only possible for jobs with a Succeeded or Failed status. + sourceId - The identifier of the Archive Source. id - The identifier of the ingestion job to delete. */ @@ -77,10 +79,12 @@ func (a *APIClient) DeleteArchiveJob(sourceId string, id string) (*http.Response newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_archive_ListArchiveJobsBySourceId.go b/service/cip/api_archive_ListArchiveJobsBySourceId.go index 1b50d37..b160673 100644 --- a/service/cip/api_archive_ListArchiveJobsBySourceId.go +++ b/service/cip/api_archive_ListArchiveJobsBySourceId.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ListArchiveJobsBySourceId Get a list of all the ingestion jobs created on an Archive Source. The response is paginated with a default limit of 10 jobs per page. + sourceId - The identifier of an Archive Source. optional - nil or *types.ArchiveOpts - Optional Parameters: Limit (optional.Int32) - Limit the number of jobs returned in the response. The number of jobs returned may be less than the limit. @@ -100,10 +102,12 @@ func (a *APIClient) ListArchiveJobsBySourceId(sourceId string, localVarOptionals newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_archive_ListArchiveJobsCountPerSource.go b/service/cip/api_archive_ListArchiveJobsCountPerSource.go index 739c344..6eb1da8 100644 --- a/service/cip/api_archive_ListArchiveJobsCountPerSource.go +++ b/service/cip/api_archive_ListArchiveJobsCountPerSource.go @@ -1,11 +1,12 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -88,10 +89,12 @@ func (a *APIClient) ListArchiveJobsCountPerSource() (types.ListArchiveJobsCount, newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_collectors_CreateCollector.go b/service/cip/api_collectors_CreateCollector.go index fe30abe..a16705a 100644 --- a/service/cip/api_collectors_CreateCollector.go +++ b/service/cip/api_collectors_CreateCollector.go @@ -11,6 +11,7 @@ import ( /* CreateCollector Create a new hosted collector in the organization. + body - Information about the new collector */ func (a *APIClient) CreateCollector(body types.CreateCollectorRequest) (types.CollectorModel, *http.Response, error) { diff --git a/service/cip/api_collectors_DeleteCollectorById.go b/service/cip/api_collectors_DeleteCollectorById.go index cb2abda..0014a3f 100644 --- a/service/cip/api_collectors_DeleteCollectorById.go +++ b/service/cip/api_collectors_DeleteCollectorById.go @@ -12,6 +12,7 @@ import ( /* DeleteCollectorById Delete a collector with the given identifier from the organization. + id - Identifier of the collector to delete. */ func (a *APIClient) DeleteCollectorById(id string) (*http.Response, error) { diff --git a/service/cip/api_collectors_DeleteOfflineCollectors.go b/service/cip/api_collectors_DeleteOfflineCollectors.go index 064f23b..9816267 100644 --- a/service/cip/api_collectors_DeleteOfflineCollectors.go +++ b/service/cip/api_collectors_DeleteOfflineCollectors.go @@ -11,8 +11,9 @@ import ( /* DeleteOfflineCollectors Deletes offline collectors from the organization. - optional - nil or *types.DeleteOfflineCollectorsOpts - Optional Parameters: - AliveBeforeDays (optional.Int32) - Minimum number of days the Collectors have been offline. + + optional - nil or *types.DeleteOfflineCollectorsOpts - Optional Parameters: + AliveBeforeDays (optional.Int32) - Minimum number of days the Collectors have been offline. */ func (a *APIClient) DeleteOfflineCollectors(localVarOptionals *types.DeleteOfflineCollectorsOpts) (*http.Response, error) { var ( diff --git a/service/cip/api_collectors_GetCollectorById.go b/service/cip/api_collectors_GetCollectorById.go index cf9a34d..5776a47 100644 --- a/service/cip/api_collectors_GetCollectorById.go +++ b/service/cip/api_collectors_GetCollectorById.go @@ -12,6 +12,7 @@ import ( /* GetCollectorById Gets information about a collector by its identifier. + id - The identifier of the collector */ func (a *APIClient) GetCollectorById(id string) (types.CollectorModel, *http.Response, error) { diff --git a/service/cip/api_collectors_GetCollectorByName.go b/service/cip/api_collectors_GetCollectorByName.go index a550f79..d10bc19 100644 --- a/service/cip/api_collectors_GetCollectorByName.go +++ b/service/cip/api_collectors_GetCollectorByName.go @@ -12,6 +12,7 @@ import ( /* GetCollectorByName Gets information about a collector by its name. + name - The name of the collector */ func (a *APIClient) GetCollectorByName(name string) (types.CollectorModel, *http.Response, error) { diff --git a/service/cip/api_collectors_GetUpgradableCollectors.go b/service/cip/api_collectors_GetUpgradableCollectors.go index f7335a0..5075034 100644 --- a/service/cip/api_collectors_GetUpgradableCollectors.go +++ b/service/cip/api_collectors_GetUpgradableCollectors.go @@ -11,6 +11,7 @@ import ( /* GetUpgradableCollectors Gets a list of installed collectors that can be upgraded. + optional - nil or *types.GetUpgradableCollectorsOpts - Optional Parameters: Limit (optional.Int32) - Limit the number of collectors returned in the response. The number of collectors returned may be less than the limit. Offset (optional.Int32) - Offset into the list of Collectors. diff --git a/service/cip/api_collectors_GetUpgradeOrDowngradeTaskStatus.go b/service/cip/api_collectors_GetUpgradeOrDowngradeTaskStatus.go index a8bb46c..03c38f9 100644 --- a/service/cip/api_collectors_GetUpgradeOrDowngradeTaskStatus.go +++ b/service/cip/api_collectors_GetUpgradeOrDowngradeTaskStatus.go @@ -12,6 +12,7 @@ import ( /* GetUpgradeOrDowngradeTaskStatus Gets the status of a collector upgrade or downgrade task. + id - Job id of the task. */ func (a *APIClient) GetUpgradeOrDowngradeTaskStatus(id string) (types.UpgradeOrDowngradeTaskStatusModel, *http.Response, error) { diff --git a/service/cip/api_collectors_ListCollectors.go b/service/cip/api_collectors_ListCollectors.go index d847d44..d01ab17 100644 --- a/service/cip/api_collectors_ListCollectors.go +++ b/service/cip/api_collectors_ListCollectors.go @@ -11,6 +11,7 @@ import ( /* ListCollectors Get a list of collectors in the organization. The response has a default limit of 1000 collectors. + optional - nil or *types.ListCollectorsOpts - Optional Parameters: Filter (optional.String) - Filter the Collectors returned using one of the available filter types: installed, hosted, dead or alive. Limit (optional.Int32) - Limit the number of collectors return in the response. The number of collectors returned may be less than the limit. diff --git a/service/cip/api_collectors_ListOfflineCollectors.go b/service/cip/api_collectors_ListOfflineCollectors.go index 4439f04..5cba38b 100644 --- a/service/cip/api_collectors_ListOfflineCollectors.go +++ b/service/cip/api_collectors_ListOfflineCollectors.go @@ -11,6 +11,7 @@ import ( /* ListOfflineCollectors Get a list of offline collectors in the organization. The response has a default limit of 1000 collectors. + optional - nil or *types.ListCollectorsOpts - Optional Parameters: AliveBeforeDays (optional.Int32) - Minimum number of days the Collectors have been offline. Limit (optional.Int32) - Limit the number of collectors returned in the response. The number of collectors returned may be less than the limit. diff --git a/service/cip/api_collectors_UpdateHostedCollector.go b/service/cip/api_collectors_UpdateHostedCollector.go index 19df269..1da3868 100644 --- a/service/cip/api_collectors_UpdateHostedCollector.go +++ b/service/cip/api_collectors_UpdateHostedCollector.go @@ -13,6 +13,7 @@ import ( /* UpdateHostedCollector Updates a hosted collector in the organization. + body - Information to update about the collector. id - Identifier of the hosted collector to update. */ diff --git a/service/cip/api_collectors_UpdateInstalledCollector.go b/service/cip/api_collectors_UpdateInstalledCollector.go index ff97193..cb23599 100644 --- a/service/cip/api_collectors_UpdateInstalledCollector.go +++ b/service/cip/api_collectors_UpdateInstalledCollector.go @@ -13,6 +13,7 @@ import ( /* UpdateInstalledCollector Update an installed collector in the organization. + body - Information to update about the collector. id - Identifier of the installed collector to update. */ diff --git a/service/cip/api_connection_CreateServiceNowConnection.go b/service/cip/api_connection_CreateServiceNowConnection.go index d7f56d3..0546d6b 100644 --- a/service/cip/api_connection_CreateServiceNowConnection.go +++ b/service/cip/api_connection_CreateServiceNowConnection.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateServiceNowConnection Create a new ServiceNow connection in the organization. + body - Information about the new ServiceNow connection. */ func (a *APIClient) CreateServiceNowConnection(body types.ServiceNowDefinition) (types.ServiceNowConnection, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) CreateServiceNowConnection(body types.ServiceNowDefinition) newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_connection_CreateWebhookConnection.go b/service/cip/api_connection_CreateWebhookConnection.go index 55dc7d2..1baf0da 100644 --- a/service/cip/api_connection_CreateWebhookConnection.go +++ b/service/cip/api_connection_CreateWebhookConnection.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateWebhookConnection Create a new webhook connection in the organization. + body - Information about the new webhook connection. */ func (a *APIClient) CreateWebhookConnection(body types.WebhookDefinition) (types.WebhookConnection, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) CreateWebhookConnection(body types.WebhookDefinition) (types newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_connection_DeleteConnection.go b/service/cip/api_connection_DeleteConnection.go index 02fdc09..02f1a93 100644 --- a/service/cip/api_connection_DeleteConnection.go +++ b/service/cip/api_connection_DeleteConnection.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteConnection Delete a connection with the given identifier. + id - Identifier of the connection to delete. type_ - Type of connection to delete. Valid values are WebhookConnection, ServiceNowConnection. */ @@ -77,10 +79,12 @@ func (a *APIClient) DeleteConnection(id string, type_ string) (*http.Response, e newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_connection_GetConnection.go b/service/cip/api_connection_GetConnection.go index 4813c1d..98e9afe 100644 --- a/service/cip/api_connection_GetConnection.go +++ b/service/cip/api_connection_GetConnection.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetConnection Get a connection with the given identifier. + id - Identifier of connection to return. type_ - Type of connection to return. Valid values are WebhookConnection, ServiceNowConnections. */ @@ -93,10 +95,12 @@ func (a *APIClient) GetConnection(id string, type_ string) (types.Connection, *h newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_connection_ListConnections.go b/service/cip/api_connection_ListConnections.go index 02ef2c0..ecfc865 100644 --- a/service/cip/api_connection_ListConnections.go +++ b/service/cip/api_connection_ListConnections.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ListConnections Get a list of all connections in the organization. The response is paginated with a default limit of 100 connections per page. + optional - nil or *types.ConnectionOpts - Optional Parameters: Limit (optional.Int32) - Limit the number of connections returned in the response. The number of connections returned may be less than the limit. Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. token is set to null when no more pages are left. @@ -97,10 +99,12 @@ func (a *APIClient) ListConnections(localVarOptionals *types.ConnectionsOpts) (t newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_connection_TestServiceNowConnection.go b/service/cip/api_connection_TestServiceNowConnection.go index 967219d..d1c075c 100644 --- a/service/cip/api_connection_TestServiceNowConnection.go +++ b/service/cip/api_connection_TestServiceNowConnection.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* TestServiceNowConnection Test a new webhook connection url is valid and can connect. + body - Information about the new webhook connection. */ func (a *APIClient) TestServiceNowConnection(body types.ServiceNowDefinition) (types.TestConnectionResponse, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) TestServiceNowConnection(body types.ServiceNowDefinition) (t newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_connection_TestWebhookConnection.go b/service/cip/api_connection_TestWebhookConnection.go index eec79f0..9983c9f 100644 --- a/service/cip/api_connection_TestWebhookConnection.go +++ b/service/cip/api_connection_TestWebhookConnection.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* TestWebhookConnection Test a new webhook connection url is valid and can connect. + body - Information about the new webhook connection. */ func (a *APIClient) TestWebhookConnection(body types.WebhookDefinition) (types.TestConnectionResponse, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) TestWebhookConnection(body types.WebhookDefinition) (types.T newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_connection_UpdateServiceNowConnection.go b/service/cip/api_connection_UpdateServiceNowConnection.go index 721679e..72327f4 100644 --- a/service/cip/api_connection_UpdateServiceNowConnection.go +++ b/service/cip/api_connection_UpdateServiceNowConnection.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateServiceNowConnection Update an existing ServiceNow connection. + body - Information to update about the ServiceNow connection. id - Identifier of the connection to update */ @@ -94,10 +96,12 @@ func (a *APIClient) UpdateServiceNowConnection(body types.ServiceNowDefinition, newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_connection_UpdateWebhookConnection.go b/service/cip/api_connection_UpdateWebhookConnection.go index b03a4f7..bca5d9b 100644 --- a/service/cip/api_connection_UpdateWebhookConnection.go +++ b/service/cip/api_connection_UpdateWebhookConnection.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateWebhookConnection Update an existing webhook connection. + body - Information to update about the webhook connection. id - Identifier of the connection to update */ @@ -94,10 +96,12 @@ func (a *APIClient) UpdateWebhookConnection(body types.WebhookDefinition, id str newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_content_AsyncCopyStatus.go b/service/cip/api_content_AsyncCopyStatus.go index ecc3ba8..be4caa4 100644 --- a/service/cip/api_content_AsyncCopyStatus.go +++ b/service/cip/api_content_AsyncCopyStatus.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* AsyncCopyStatus Gets the status of a copy request with the given jobId. + id - The identifier of the content that was copied. jobId - The identifier of the asynchronous copy request job. optional - nil or *types.ContentOpts - Optional Parameters: @@ -98,10 +100,12 @@ func (a *APIClient) AsyncCopyStatus(id string, jobId string, localVarOptionals * newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_content_BeginAsyncCopy.go b/service/cip/api_content_BeginAsyncCopy.go index ab27ac0..bfc5f21 100644 --- a/service/cip/api_content_BeginAsyncCopy.go +++ b/service/cip/api_content_BeginAsyncCopy.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* BeginAsyncCopy Start an asynchronous content copy job with the given identifier to the destination folder. If the content item is a folder, everything under the folder is copied recursively. + id - The identifier of the content item to copy. Identifiers from the Library in the Sumo user interface are provided in decimal format which is incompatible with this API. The identifier needs to be in hexadecimal format. destinationFolder - The identifier of the destination folder. optional - nil or *types.ContentOpts - Optional Parameters: @@ -98,10 +100,12 @@ func (a *APIClient) BeginAsyncCopy(id string, destinationFolder string, localVar newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_content_BeginAsyncDelete.go b/service/cip/api_content_BeginAsyncDelete.go index 038b033..b90a8a4 100644 --- a/service/cip/api_content_BeginAsyncDelete.go +++ b/service/cip/api_content_BeginAsyncDelete.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* BeginAsyncDelete Start an asynchronous content deletion job with the given identifier. + id - Identifier of the content to delete. Identifiers from the Library in the Sumo user interface are provided in decimal format which is incompatible with this API. The identifier needs to be in hexadecimal format. optional - nil or *types.ContentOpts - Optional Parameters: IsAdminMode (optional.String) - Set this to true if you want to perform the request as a Content Administrator. @@ -96,10 +98,12 @@ func (a *APIClient) BeginAsyncDelete(id string, localVarOptionals *types.Content newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_content_BeginAsyncExport.go b/service/cip/api_content_BeginAsyncExport.go index e7dd7a8..38c9a53 100644 --- a/service/cip/api_content_BeginAsyncExport.go +++ b/service/cip/api_content_BeginAsyncExport.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* BeginAsyncExport Schedule an asynchronous export of content with the given identifier. You will get back an asynchronous job identifier on success. Use the GetAsyncExportStatus function and the job identifier you got back in the response to track the status of an asynchronous export job. If the content item is a folder, everything under the folder is exported recursively. Keep in mind when exporting large folders that there is a limit of 1000 content objects that can be exported at once. If you want to import more than 1000 content objects, then be sure to split the import into batches of 1000 objects or less. The results from the export are compatible with the Library import feature in the Sumo Logic user interface as well as the API content import job. + id - The identifier of the content item to export. Identifiers from the Library in the Sumo user interface are provided in decimal format which is incompatible with this API. The identifier needs to be in hexadecimal format. optional - nil or *types.ContentOpts - Optional Parameters: IsAdminMode (optional.String) - Set this to true if you want to perform the request as a Content Administrator. @@ -96,10 +98,12 @@ func (a *APIClient) BeginAsyncExport(id string, localVarOptionals *types.Content newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_content_BeginDashboardAsyncImport.go b/service/cip/api_content_BeginDashboardAsyncImport.go index b18bde5..d23d218 100644 --- a/service/cip/api_content_BeginDashboardAsyncImport.go +++ b/service/cip/api_content_BeginDashboardAsyncImport.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* BeginDashboardAsyncImport Schedule an asynchronous import of dashboard content inside an existing folder with the given identifier. Import requests can be used to create or update content within a folder. Content items need to have a unique name within their folder. If there is already a content item with the same name in the folder, you can set the `overwrite` parameter to `true` to overwrite existing content items. By default, the overwrite parameter is set to false, where the import will fail if a content item with the same name already exist. Keep in mind when importing large folders that there is a limit of 1000 content objects that can be imported at once. If you want to import more than 1000 content objects, then be sure to split the import into batches of 1000 objects or less. + body - The content to import. folderId - The identifier of the folder to import into. Identifiers from the Library in the Sumo user interface are provided in decimal format which is incompatible with this API. The identifier needs to be in hexadecimal format. optional - nil or *types.ContentImportOpts - Optional Parameters: @@ -103,10 +105,12 @@ func (a *APIClient) BeginDashboardAsyncImport(body types.DashboardSyncDefinition newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_content_BeginFolderAsyncImport.go b/service/cip/api_content_BeginFolderAsyncImport.go index 733bde7..951c603 100644 --- a/service/cip/api_content_BeginFolderAsyncImport.go +++ b/service/cip/api_content_BeginFolderAsyncImport.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* BeginFolderAsyncImport Schedule an asynchronous import of folder content inside an existing folder with the given identifier. Import requests can be used to create or update content within a folder. Content items need to have a unique name within their folder. If there is already a content item with the same name in the folder, you can set the `overwrite` parameter to `true` to overwrite existing content items. By default, the overwrite parameter is set to false, where the import will fail if a content item with the same name already exist. Keep in mind when importing large folders that there is a limit of 1000 content objects that can be imported at once. If you want to import more than 1000 content objects, then be sure to split the import into batches of 1000 objects or less. + body - The content to import. folderId - The identifier of the folder to import into. Identifiers from the Library in the Sumo user interface are provided in decimal format which is incompatible with this API. The identifier needs to be in hexadecimal format. optional - nil or *types.ContentImportOpts - Optional Parameters: @@ -103,10 +105,12 @@ func (a *APIClient) BeginFolderAsyncImport(body types.FolderSyncDefinition, fold newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_content_BeginLookTableAsyncImport.go b/service/cip/api_content_BeginLookTableAsyncImport.go index dd0e929..8729fc2 100644 --- a/service/cip/api_content_BeginLookTableAsyncImport.go +++ b/service/cip/api_content_BeginLookTableAsyncImport.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* BeginLookupTableAsyncImport Schedule an asynchronous import of lookup table content inside an existing folder with the given identifier. Import requests can be used to create or update content within a folder. Content items need to have a unique name within their folder. If there is already a content item with the same name in the folder, you can set the `overwrite` parameter to `true` to overwrite existing content items. By default, the overwrite parameter is set to false, where the import will fail if a content item with the same name already exist. Keep in mind when importing large folders that there is a limit of 1000 content objects that can be imported at once. If you want to import more than 1000 content objects, then be sure to split the import into batches of 1000 objects or less. + body - The content to import. folderId - The identifier of the folder to import into. Identifiers from the Library in the Sumo user interface are provided in decimal format which is incompatible with this API. The identifier needs to be in hexadecimal format. optional - nil or *types.ContentImportOpts - Optional Parameters: @@ -103,10 +105,12 @@ func (a *APIClient) BeginLookupTableAsyncImport(body types.LookupTableSyncDefini newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_content_BeginMetricsSavedSearchAsyncImport.go b/service/cip/api_content_BeginMetricsSavedSearchAsyncImport.go index 05425c0..53afa02 100644 --- a/service/cip/api_content_BeginMetricsSavedSearchAsyncImport.go +++ b/service/cip/api_content_BeginMetricsSavedSearchAsyncImport.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* BeginMetricsSavedSearchAsyncImport Schedule an asynchronous import of metric saved searches content inside an existing folder with the given identifier. Import requests can be used to create or update content within a folder. Content items need to have a unique name within their folder. If there is already a content item with the same name in the folder, you can set the `overwrite` parameter to `true` to overwrite existing content items. By default, the overwrite parameter is set to false, where the import will fail if a content item with the same name already exist. Keep in mind when importing large folders that there is a limit of 1000 content objects that can be imported at once. If you want to import more than 1000 content objects, then be sure to split the import into batches of 1000 objects or less. + body - The content to import. folderId - The identifier of the folder to import into. Identifiers from the Library in the Sumo user interface are provided in decimal format which is incompatible with this API. The identifier needs to be in hexadecimal format. optional - nil or *types.ContentImportOpts - Optional Parameters: @@ -103,10 +105,12 @@ func (a *APIClient) BeginMetricsSavedSearchAsyncImport(body types.MetricsSavedSe newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_content_BeginMetricsSearchAsyncImport.go b/service/cip/api_content_BeginMetricsSearchAsyncImport.go index 699268f..083c2f3 100644 --- a/service/cip/api_content_BeginMetricsSearchAsyncImport.go +++ b/service/cip/api_content_BeginMetricsSearchAsyncImport.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* BeginMetricsSearchAsyncImport Schedule an asynchronous import of metric searches content inside an existing folder with the given identifier. Import requests can be used to create or update content within a folder. Content items need to have a unique name within their folder. If there is already a content item with the same name in the folder, you can set the `overwrite` parameter to `true` to overwrite existing content items. By default, the overwrite parameter is set to false, where the import will fail if a content item with the same name already exist. Keep in mind when importing large folders that there is a limit of 1000 content objects that can be imported at once. If you want to import more than 1000 content objects, then be sure to split the import into batches of 1000 objects or less. + body - The content to import. folderId - The identifier of the folder to import into. Identifiers from the Library in the Sumo user interface are provided in decimal format which is incompatible with this API. The identifier needs to be in hexadecimal format. optional - nil or *types.ContentImportOpts - Optional Parameters: @@ -103,10 +105,12 @@ func (a *APIClient) BeginMetricsSearchAsyncImport(body types.MetricsSearchSyncDe newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_content_BeginMewboardAsyncImport.go b/service/cip/api_content_BeginMewboardAsyncImport.go index de71a2e..b945480 100644 --- a/service/cip/api_content_BeginMewboardAsyncImport.go +++ b/service/cip/api_content_BeginMewboardAsyncImport.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* BeginMewboardAsyncImport Schedule an asynchronous import of mewboard content inside an existing folder with the given identifier. Import requests can be used to create or update content within a folder. Content items need to have a unique name within their folder. If there is already a content item with the same name in the folder, you can set the `overwrite` parameter to `true` to overwrite existing content items. By default, the overwrite parameter is set to false, where the import will fail if a content item with the same name already exist. Keep in mind when importing large folders that there is a limit of 1000 content objects that can be imported at once. If you want to import more than 1000 content objects, then be sure to split the import into batches of 1000 objects or less. + body - The content to import. folderId - The identifier of the folder to import into. Identifiers from the Library in the Sumo user interface are provided in decimal format which is incompatible with this API. The identifier needs to be in hexadecimal format. optional - nil or *types.ContentImportOpts - Optional Parameters: @@ -103,10 +105,12 @@ func (a *APIClient) BeginMewboardAsyncImport(body types.MewboardSyncDefinition, newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_content_BeginSavedSearchAsyncImport.go b/service/cip/api_content_BeginSavedSearchAsyncImport.go index 29b2112..b157de0 100644 --- a/service/cip/api_content_BeginSavedSearchAsyncImport.go +++ b/service/cip/api_content_BeginSavedSearchAsyncImport.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* BeginSavedSearchAsyncImport Schedule an asynchronous import of saved search content inside an existing folder with the given identifier. Import requests can be used to create or update content within a folder. Content items need to have a unique name within their folder. If there is already a content item with the same name in the folder, you can set the `overwrite` parameter to `true` to overwrite existing content items. By default, the overwrite parameter is set to false, where the import will fail if a content item with the same name already exist. Keep in mind when importing large folders that there is a limit of 1000 content objects that can be imported at once. If you want to import more than 1000 content objects, then be sure to split the import into batches of 1000 objects or less. + body - The content to import. folderId - The identifier of the folder to import into. Identifiers from the Library in the Sumo user interface are provided in decimal format which is incompatible with this API. The identifier needs to be in hexadecimal format. optional - nil or *types.ContentImportOpts - Optional Parameters: @@ -103,10 +105,12 @@ func (a *APIClient) BeginSavedSearchAsyncImport(body types.SavedSearchWithSchedu newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_content_GetAsyncDeleteStatus.go b/service/cip/api_content_GetAsyncDeleteStatus.go index 589456b..a52b152 100644 --- a/service/cip/api_content_GetAsyncDeleteStatus.go +++ b/service/cip/api_content_GetAsyncDeleteStatus.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetAsyncDeleteStatus Get the status of an asynchronous content deletion job request for the given job identifier. + id - Identifier of the content to delete. jobId - The identifier of the asynchronous job. optional - nil or *types.ContentOpts - Optional Parameters: @@ -98,10 +100,12 @@ func (a *APIClient) GetAsyncDeleteStatus(id string, jobId string, localVarOption newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_content_GetAsyncExportResult.go b/service/cip/api_content_GetAsyncExportResult.go index 79c18ca..03a8192 100644 --- a/service/cip/api_content_GetAsyncExportResult.go +++ b/service/cip/api_content_GetAsyncExportResult.go @@ -2,11 +2,12 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -14,6 +15,7 @@ GetAsyncExportResult Get results from content export job for the given job identifier. The results from this export are incompatible with the Library import feature in the Sumo user interface. You can use this function to find out type of content was exported and use one of the following functions to return the appropriate data for the content type: GetFolderAsyncExportResult, GetDashboardAsyncExportResult, GetMewboardAsyncExportResult, GetSavedSearchAsyncExportResult, GetMetricsSavedSearchAsyncExportResult, GetMetricsSearchAsyncExportResult, GetLookupTableAsyncExportResult. + contentId - The identifier of the exported content item. jobId - The identifier of the asynchronous job. optional - nil or *types.ContentOpts - Optional Parameters: @@ -100,10 +102,12 @@ func (a *APIClient) GetAsyncExportResult(contentId string, jobId string, localVa newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_content_GetAsyncExportStatus.go b/service/cip/api_content_GetAsyncExportStatus.go index 724d625..005f7d0 100644 --- a/service/cip/api_content_GetAsyncExportStatus.go +++ b/service/cip/api_content_GetAsyncExportStatus.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetAsyncExportStatus Get the status of an asynchronous content export request for the given job identifier. On success, use the [getExportResult](#operation/getAsyncExportResult) endpoint to get the result of the export job. + contentId - The identifier of the exported content item. jobId - The identifier of the asynchronous export job. optional - nil or *types.ContentManagementApiGetAsyncExportStatusOpts - Optional Parameters: @@ -98,10 +100,12 @@ func (a *APIClient) GetAsyncExportStatus(contentId string, jobId string, localVa newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_content_GetAsyncImportStatus.go b/service/cip/api_content_GetAsyncImportStatus.go index b21bb95..eef3491 100644 --- a/service/cip/api_content_GetAsyncImportStatus.go +++ b/service/cip/api_content_GetAsyncImportStatus.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetAsyncImportStatus Get the status of a content import job for the given job identifier. + folderId - The identifier of the folder to import into. jobId - The identifier of the import request. optional - nil or *types.ContentOpts - Optional Parameters: @@ -98,10 +100,12 @@ func (a *APIClient) GetAsyncImportStatus(folderId string, jobId string, localVar newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_content_GetDashboardAsyncExportResult.go b/service/cip/api_content_GetDashboardAsyncExportResult.go index a748e15..1880bb4 100644 --- a/service/cip/api_content_GetDashboardAsyncExportResult.go +++ b/service/cip/api_content_GetDashboardAsyncExportResult.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetDashboardAsyncExportResult Get dashboard results from content export job for the given job identifier. The results from this export are incompatible with the Library import feature in the Sumo user interface. + contentId - The identifier of the exported content item. jobId - The identifier of the asynchronous job. optional - nil or *types.ContentManagementApiGetAsyncExportResultOpts - Optional Parameters: @@ -98,10 +100,12 @@ func (a *APIClient) GetDashboardAsyncExportResult(contentId string, jobId string newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_content_GetFolderAsyncExportResult.go b/service/cip/api_content_GetFolderAsyncExportResult.go index 5fffe6e..e26093a 100644 --- a/service/cip/api_content_GetFolderAsyncExportResult.go +++ b/service/cip/api_content_GetFolderAsyncExportResult.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetFolderAsyncExportResult Get folder results from content export job for the given job identifier. The results from this export are incompatible with the Library import feature in the Sumo user interface. + contentId - The identifier of the exported content item. jobId - The identifier of the asynchronous job. optional - nil or *types.ContentManagementApiGetAsyncExportResultOpts - Optional Parameters: @@ -98,10 +100,12 @@ func (a *APIClient) GetFolderAsyncExportResult(contentId string, jobId string, l newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_content_GetItemByPath.go b/service/cip/api_content_GetItemByPath.go index f29ab7d..371ea82 100644 --- a/service/cip/api_content_GetItemByPath.go +++ b/service/cip/api_content_GetItemByPath.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetItemByPath Get a content item corresponding to the given path. The absolute path to a content item should be specified to get the item. The content library has Library folder at the root level. For items in Personal folder, the base path is /Library/Users/user@sumo.com where user@sumo.com is the email address of the user. For example if a user with email address wile@acme.com has Rockets folder inside Personal folder, the path of Rockets folder will be /Library/Users/wile@acme.com/Rockets. For items in Admin Recommended folder, the base path is /Library/Admin Recommended. For example, given a folder Acme in Admin Recommended folder, the path will be /Library/Admin Recommended/Acme. + path - Path of the content item to retrieve. */ func (a *APIClient) GetItemByPath(path string) (types.Content, *http.Response, error) { @@ -90,10 +92,12 @@ func (a *APIClient) GetItemByPath(path string) (types.Content, *http.Response, e newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_content_GetLookupTableAsyncExportResult.go b/service/cip/api_content_GetLookupTableAsyncExportResult.go index 9b7e448..b0b0eac 100644 --- a/service/cip/api_content_GetLookupTableAsyncExportResult.go +++ b/service/cip/api_content_GetLookupTableAsyncExportResult.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetLookupTableAsyncExportResult Get lookup table results from content export job for the given job identifier. The results from this export are incompatible with the Library import feature in the Sumo user interface. + contentId - The identifier of the exported content item. jobId - The identifier of the asynchronous job. optional - nil or *types.ContentOpts - Optional Parameters: @@ -98,10 +100,12 @@ func (a *APIClient) GetLookupTableAsyncExportResult(contentId string, jobId stri newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_content_GetMetricsSavedSearchAsyncExportResult.go b/service/cip/api_content_GetMetricsSavedSearchAsyncExportResult.go index fe132ec..f5b1e10 100644 --- a/service/cip/api_content_GetMetricsSavedSearchAsyncExportResult.go +++ b/service/cip/api_content_GetMetricsSavedSearchAsyncExportResult.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetMetricsSavedSearchAsyncExportResult Get metrics saved search results from content export job for the given job identifier. The results from this export are incompatible with the Library import feature in the Sumo user interface. + contentId - The identifier of the exported content item. jobId - The identifier of the asynchronous job. optional - nil or *types.ContentOpts - Optional Parameters: @@ -98,10 +100,12 @@ func (a *APIClient) GetMetricsSavedSearchAsyncExportResult(contentId string, job newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_content_GetMetricsSearchAsyncExportResult.go b/service/cip/api_content_GetMetricsSearchAsyncExportResult.go index ad72c8e..decd579 100644 --- a/service/cip/api_content_GetMetricsSearchAsyncExportResult.go +++ b/service/cip/api_content_GetMetricsSearchAsyncExportResult.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetMetricsSearchAsyncExportResult Get metrics search results from content export job for the given job identifier. The results from this export are incompatible with the Library import feature in the Sumo user interface. + contentId - The identifier of the exported content item. jobId - The identifier of the asynchronous job. optional - nil or *types.ContentOpts - Optional Parameters: @@ -98,10 +100,12 @@ func (a *APIClient) GetMetricsSearchAsyncExportResult(contentId string, jobId st newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_content_GetMewboardAsyncExportResult.go b/service/cip/api_content_GetMewboardAsyncExportResult.go index fe1f345..23ddec8 100644 --- a/service/cip/api_content_GetMewboardAsyncExportResult.go +++ b/service/cip/api_content_GetMewboardAsyncExportResult.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetMewboardAsyncExportResult Get mewboard results from content export job for the given job identifier. The results from this export are incompatible with the Library import feature in the Sumo user interface. + contentId - The identifier of the exported content item. jobId - The identifier of the asynchronous job. optional - nil or *types.ContentOpts - Optional Parameters: @@ -98,10 +100,12 @@ func (a *APIClient) GetMewboardAsyncExportResult(contentId string, jobId string, newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_content_GetPathById.go b/service/cip/api_content_GetPathById.go index cb1c9bf..af45669 100644 --- a/service/cip/api_content_GetPathById.go +++ b/service/cip/api_content_GetPathById.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetPathById Get full path of a content item with the given identifier. + contentId - Identifier of the content item to get the path. */ func (a *APIClient) GetPathById(contentId string) (types.ContentPath, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) GetPathById(contentId string) (types.ContentPath, *http.Resp newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_content_GetSavedSearchAsyncExportResult.go b/service/cip/api_content_GetSavedSearchAsyncExportResult.go index 0527ab2..a9665f2 100644 --- a/service/cip/api_content_GetSavedSearchAsyncExportResult.go +++ b/service/cip/api_content_GetSavedSearchAsyncExportResult.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetSavedSearchAsyncExportResult Get saved search results from content export job for the given job identifier. The results from this export are incompatible with the Library import feature in the Sumo user interface. + contentId - The identifier of the exported content item. jobId - The identifier of the asynchronous job. optional - nil or *types.ContentOpts - Optional Parameters: @@ -98,10 +100,12 @@ func (a *APIClient) GetSavedSearchAsyncExportResult(contentId string, jobId stri newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_content_MoveItem.go b/service/cip/api_content_MoveItem.go index 23124ea..79bdba5 100644 --- a/service/cip/api_content_MoveItem.go +++ b/service/cip/api_content_MoveItem.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* MoveItem Moves an item from its current location to another folder. + destinationFolderId - Identifier of the destination folder. id - Identifier of the item the user wants to move. optional - nil or *types.ContentOpts - Optional Parameters: @@ -82,10 +84,12 @@ func (a *APIClient) MoveItem(destinationFolderId string, id string, localVarOpti newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_content_permissions_AddContentPermissions.go b/service/cip/api_content_permissions_AddContentPermissions.go index 602c9f2..171b359 100644 --- a/service/cip/api_content_permissions_AddContentPermissions.go +++ b/service/cip/api_content_permissions_AddContentPermissions.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* AddContentPermissions Add permissions to a content item with the given identifier. + body - New permissions to add to the content item with the given identifier. id - The identifier of the content item. optional - nil or *types.ContentPermissionsOpts - Optional Parameters: @@ -99,10 +101,12 @@ func (a *APIClient) AddContentPermissions(body types.ContentPermissionUpdateRequ newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_content_permissions_GetContentPermissions.go b/service/cip/api_content_permissions_GetContentPermissions.go index f369917..d38ca6d 100644 --- a/service/cip/api_content_permissions_GetContentPermissions.go +++ b/service/cip/api_content_permissions_GetContentPermissions.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetContentPermissions Returns content permissions of a content item with the given identifier. + id - The identifier of the content item. optional - nil or *types.GetContentPermissionsOpts - Optional Parameters: ExplicitOnly (optional.Bool) - There are two permission types: explicit and implicit. Permissions specifically assigned to the content item are explicit. Permissions derived from a parent content item, like a folder are implicit. To return only explicit permissions set this to true. @@ -100,10 +102,12 @@ func (a *APIClient) GetContentPermissions(id string, localVarOptionals *types.Ge newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_content_permissions_RemoveContentPermissions.go b/service/cip/api_content_permissions_RemoveContentPermissions.go index ea9dfda..de11a98 100644 --- a/service/cip/api_content_permissions_RemoveContentPermissions.go +++ b/service/cip/api_content_permissions_RemoveContentPermissions.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* RemoveContentPermissions Remove permissions from a content item with the given identifier. + body - Permissions to remove from a content item with the given identifier. id - The identifier of the content item. optional - nil or *types.ContentPermissionsOpts - Optional Parameters: @@ -99,10 +101,12 @@ func (a *APIClient) RemoveContentPermissions(body types.ContentPermissionUpdateR newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_dashboard_CreateDashboard.go b/service/cip/api_dashboard_CreateDashboard.go index 38a6562..9bdd60c 100644 --- a/service/cip/api_dashboard_CreateDashboard.go +++ b/service/cip/api_dashboard_CreateDashboard.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateDashboard Creates a new dashboard. + body - Information to create the new dashboard. */ func (a *APIClient) CreateDashboard(body types.DashboardRequest) (types.Dashboard, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) CreateDashboard(body types.DashboardRequest) (types.Dashboar newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_dashboard_DeleteDashboard.go b/service/cip/api_dashboard_DeleteDashboard.go index 6e3b4e4..24d04e1 100644 --- a/service/cip/api_dashboard_DeleteDashboard.go +++ b/service/cip/api_dashboard_DeleteDashboard.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteDashboard Delete a dashboard by the given identifier. + id - Identifier of the dashboard to delete. */ func (a *APIClient) DeleteDashboard(id string) (*http.Response, error) { @@ -75,10 +77,12 @@ func (a *APIClient) DeleteDashboard(id string) (*http.Response, error) { newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_dashboard_GetDashboard.go b/service/cip/api_dashboard_GetDashboard.go index 7d0ab1d..a447a59 100644 --- a/service/cip/api_dashboard_GetDashboard.go +++ b/service/cip/api_dashboard_GetDashboard.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetDashboard Get a dashboard by the given identifier. + id - UUID of the dashboard to return. */ func (a *APIClient) GetDashboard(id string) (types.Dashboard, *http.Response, error) { @@ -99,10 +101,12 @@ func (a *APIClient) GetDashboard(id string) (types.Dashboard, *http.Response, er newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_dashboard_UpdateDashboard.go b/service/cip/api_dashboard_UpdateDashboard.go index 693edb7..16ddfad 100644 --- a/service/cip/api_dashboard_UpdateDashboard.go +++ b/service/cip/api_dashboard_UpdateDashboard.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateDashboard Update a dashboard by the given identifier. + body - Information to update on the dashboard. id - Identifier of the dashboard to update. */ @@ -94,10 +96,12 @@ func (a *APIClient) UpdateDashboard(body types.DashboardRequest, id string) (typ newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_dynamic_parsing_CreateDynamicParsingRule.go b/service/cip/api_dynamic_parsing_CreateDynamicParsingRule.go index 72fdab2..58be372 100644 --- a/service/cip/api_dynamic_parsing_CreateDynamicParsingRule.go +++ b/service/cip/api_dynamic_parsing_CreateDynamicParsingRule.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateDynamicParsingRule Create a new dynamic parsing rule. + body - Information about the new dynamic parsing rule. */ func (a *APIClient) CreateDynamicParsingRule(body types.DynamicRuleDefinition) (types.DynamicRule, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) CreateDynamicParsingRule(body types.DynamicRuleDefinition) ( newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_dynamic_parsing_DeleteDynamicParsingRule.go b/service/cip/api_dynamic_parsing_DeleteDynamicParsingRule.go index 2021103..c851cca 100644 --- a/service/cip/api_dynamic_parsing_DeleteDynamicParsingRule.go +++ b/service/cip/api_dynamic_parsing_DeleteDynamicParsingRule.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteDynamicParsingRule Delete a dynamic parsing rule with the given identifier. + id - Identifier of the dynamic parsing rule to delete. */ func (a *APIClient) DeleteDynamicParsingRule(id string) (*http.Response, error) { @@ -75,10 +77,12 @@ func (a *APIClient) DeleteDynamicParsingRule(id string) (*http.Response, error) newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_dynamic_parsing_GetDynamicParsingRule.go b/service/cip/api_dynamic_parsing_GetDynamicParsingRule.go index 3372b4b..53e2d2c 100644 --- a/service/cip/api_dynamic_parsing_GetDynamicParsingRule.go +++ b/service/cip/api_dynamic_parsing_GetDynamicParsingRule.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetDynamicParsingRule Get a dynamic parsing rule with the given identifier. + id - Identifier of dynamic parsing rule to return. */ func (a *APIClient) GetDynamicParsingRule(id string) (types.DynamicRule, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) GetDynamicParsingRule(id string) (types.DynamicRule, *http.R newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_dynamic_parsing_ListDynamicParsingRules.go b/service/cip/api_dynamic_parsing_ListDynamicParsingRules.go index 8648756..da99f88 100644 --- a/service/cip/api_dynamic_parsing_ListDynamicParsingRules.go +++ b/service/cip/api_dynamic_parsing_ListDynamicParsingRules.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ListDynamicParsingRules Get a list of all dynamic parsing rules. The response is paginated with a default limit of 100 dynamic parsing rules per page. + optional - nil or *types.DynamicParsingRuleOpts - Optional Parameters: Limit (optional.Int32) - Limit the number of dynamic parsing rules returned in the response. The number of dynamic parsing rules returned may be less than the limit. Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. @@ -97,10 +99,12 @@ func (a *APIClient) ListDynamicParsingRules(localVarOptionals *types.DynamicPars newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_dynamic_parsing_UpdateDynamicParsingRule.go b/service/cip/api_dynamic_parsing_UpdateDynamicParsingRule.go index 6c1c684..5ee82a7 100644 --- a/service/cip/api_dynamic_parsing_UpdateDynamicParsingRule.go +++ b/service/cip/api_dynamic_parsing_UpdateDynamicParsingRule.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateDynamicParsingRule Update an existing dynamic parsing rule. All properties specified in the request are replaced. Missing properties are set to their default values. + body - Information to update about the dynamic parsing rule. id - Identifier of the dynamic parsing rule to update. */ @@ -94,10 +96,12 @@ func (a *APIClient) UpdateDynamicParsingRule(body types.DynamicRuleDefinition, i newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_extraction_rule_CreateExtractionRule.go b/service/cip/api_extraction_rule_CreateExtractionRule.go index 341bef6..f90e0f8 100644 --- a/service/cip/api_extraction_rule_CreateExtractionRule.go +++ b/service/cip/api_extraction_rule_CreateExtractionRule.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateExtractionRule Create a new field extraction rule. + body - Information about the new field extraction rule. */ func (a *APIClient) CreateExtractionRule(body types.ExtractionRuleDefinition) (types.ExtractionRule, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) CreateExtractionRule(body types.ExtractionRuleDefinition) (t newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_extraction_rule_DeleteExtractionRule.go b/service/cip/api_extraction_rule_DeleteExtractionRule.go index 1ea32dd..e803a3a 100644 --- a/service/cip/api_extraction_rule_DeleteExtractionRule.go +++ b/service/cip/api_extraction_rule_DeleteExtractionRule.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteExtractionRule Delete a field extraction rule with the given identifier. + id - Identifier of the field extraction rule to delete. */ func (a *APIClient) DeleteExtractionRule(id string) (*http.Response, error) { @@ -75,10 +77,12 @@ func (a *APIClient) DeleteExtractionRule(id string) (*http.Response, error) { newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_extraction_rule_GetExtractionRule.go b/service/cip/api_extraction_rule_GetExtractionRule.go index 8e44d08..41a37bd 100644 --- a/service/cip/api_extraction_rule_GetExtractionRule.go +++ b/service/cip/api_extraction_rule_GetExtractionRule.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetExtractionRule Get a field extraction rule with the given identifier. + id - Identifier of field extraction rule to return. */ func (a *APIClient) GetExtractionRule(id string) (types.ExtractionRule, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) GetExtractionRule(id string) (types.ExtractionRule, *http.Re newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_extraction_rule_ListExtractionRule.go b/service/cip/api_extraction_rule_ListExtractionRule.go index df9c58e..06d517b 100644 --- a/service/cip/api_extraction_rule_ListExtractionRule.go +++ b/service/cip/api_extraction_rule_ListExtractionRule.go @@ -1,19 +1,21 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ListExtractionRules Get a list of all field extraction rules. The response is paginated with a default limit of 100 field extraction rules per page. - optional - nil or *types.ExtractionRuleOpts - Optional Parameters: - Limit (optional.Int32) - Limit the number of field extraction rules returned in the response. The number of field extraction rules returned may be less than the limit. - Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. + + optional - nil or *types.ExtractionRuleOpts - Optional Parameters: + Limit (optional.Int32) - Limit the number of field extraction rules returned in the response. The number of field extraction rules returned may be less than the limit. + Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. */ func (a *APIClient) ListExtractionRules(localVarOptionals *types.ExtractionRuleOpts) (types.ListExtractionRulesResponse, *http.Response, error) { var ( @@ -97,10 +99,12 @@ func (a *APIClient) ListExtractionRules(localVarOptionals *types.ExtractionRuleO newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_extraction_rule_UpdateExtractionRule.go b/service/cip/api_extraction_rule_UpdateExtractionRule.go index a63708d..88b2009 100644 --- a/service/cip/api_extraction_rule_UpdateExtractionRule.go +++ b/service/cip/api_extraction_rule_UpdateExtractionRule.go @@ -2,18 +2,20 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateExtractionRule Update an existing field extraction rule. All properties specified in the request are replaced. Missing properties are set to their default values. - body - Information to update about the field extraction rule. - id - Identifier of the field extraction rule to update. + + body - Information to update about the field extraction rule. + id - Identifier of the field extraction rule to update. */ func (a *APIClient) UpdateExtractionRule(body types.UpdateExtractionRuleDefinition, id string) (types.ExtractionRule, *http.Response, error) { var ( @@ -94,10 +96,12 @@ func (a *APIClient) UpdateExtractionRule(body types.UpdateExtractionRuleDefiniti newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_field_management_CreateField.go b/service/cip/api_field_management_CreateField.go index a82cb5e..8790886 100644 --- a/service/cip/api_field_management_CreateField.go +++ b/service/cip/api_field_management_CreateField.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateField Adding a field will define it in the Fields schema allowing it to be assigned as metadata to your logs. + body - Name of a field to add. The name is used as the key in the key-value pair. */ func (a *APIClient) CreateField(body types.FieldName) (types.CustomField, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) CreateField(body types.FieldName) (types.CustomField, *http. newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_field_management_DeleteField.go b/service/cip/api_field_management_DeleteField.go index 668ad00..1286fc4 100644 --- a/service/cip/api_field_management_DeleteField.go +++ b/service/cip/api_field_management_DeleteField.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteField Deleting a field does not delete historical data assigned with that field. If you delete a field by mistake and one or more of those dependencies break, you can re-add the field to get things working properly again. You should always disable a field and ensure things are behaving as expected before deleting a field. + id - Identifier of a field to delete. */ func (a *APIClient) DeleteField(id string) (*http.Response, error) { @@ -75,10 +77,12 @@ func (a *APIClient) DeleteField(id string) (*http.Response, error) { newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_field_management_DisableField.go b/service/cip/api_field_management_DisableField.go index 4cd2673..6165587 100644 --- a/service/cip/api_field_management_DisableField.go +++ b/service/cip/api_field_management_DisableField.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DisableField After disabling a field Sumo Logic will start dropping its incoming values at ingest. As a result, they won't be searchable or usable. Historical values are not removed and remain searchable. + id - Identifier of a field to disable. */ func (a *APIClient) DisableField(id string) (*http.Response, error) { @@ -75,10 +77,12 @@ func (a *APIClient) DisableField(id string) (*http.Response, error) { newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_field_management_EnableField.go b/service/cip/api_field_management_EnableField.go index 5553b51..bd6ac34 100644 --- a/service/cip/api_field_management_EnableField.go +++ b/service/cip/api_field_management_EnableField.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* EnableField Fields have to be enabled to be assigned to your data. This operation ensures that a specified field is enabled and Sumo Logic will treat it as safe to process. All manually created custom fields are enabled by default. + id - Identifier of a field to enable. */ func (a *APIClient) EnableField(id string) (*http.Response, error) { @@ -75,10 +77,12 @@ func (a *APIClient) EnableField(id string) (*http.Response, error) { newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_field_management_GetBuiltInField.go b/service/cip/api_field_management_GetBuiltInField.go index 9a26e49..6caf288 100644 --- a/service/cip/api_field_management_GetBuiltInField.go +++ b/service/cip/api_field_management_GetBuiltInField.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetBuiltInField Get the details of a built-in field. + id - Identifier of a built-in field. */ func (a *APIClient) GetBuiltInField(id string) (types.BuiltinField, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) GetBuiltInField(id string) (types.BuiltinField, *http.Respon newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_field_management_GetCustomField.go b/service/cip/api_field_management_GetCustomField.go index 8f75131..4811665 100644 --- a/service/cip/api_field_management_GetCustomField.go +++ b/service/cip/api_field_management_GetCustomField.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetCustomField Get the details of a custom field. + id - Identifier of a field. */ func (a *APIClient) GetCustomField(id string) (types.CustomField, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) GetCustomField(id string) (types.CustomField, *http.Response newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_field_management_GetFieldQuota.go b/service/cip/api_field_management_GetFieldQuota.go index 118f199..47ad342 100644 --- a/service/cip/api_field_management_GetFieldQuota.go +++ b/service/cip/api_field_management_GetFieldQuota.go @@ -1,11 +1,12 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -88,10 +89,12 @@ func (a *APIClient) GetFieldQuota() (types.FieldQuotaUsage, *http.Response, erro newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_field_management_ListBuiltInFields.go b/service/cip/api_field_management_ListBuiltInFields.go index adf3471..58688d1 100644 --- a/service/cip/api_field_management_ListBuiltInFields.go +++ b/service/cip/api_field_management_ListBuiltInFields.go @@ -1,11 +1,12 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -88,10 +89,12 @@ func (a *APIClient) ListBuiltInFields() (types.ListBuiltinFieldsResponse, *http. newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_field_management_ListCustomFields.go b/service/cip/api_field_management_ListCustomFields.go index c63e452..aa82497 100644 --- a/service/cip/api_field_management_ListCustomFields.go +++ b/service/cip/api_field_management_ListCustomFields.go @@ -1,11 +1,12 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -88,10 +89,12 @@ func (a *APIClient) ListCustomFields() (types.ListCustomFieldsResponse, *http.Re newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_field_management_ListDroppedFields.go b/service/cip/api_field_management_ListDroppedFields.go index 812a5ab..d98ff54 100644 --- a/service/cip/api_field_management_ListDroppedFields.go +++ b/service/cip/api_field_management_ListDroppedFields.go @@ -1,11 +1,12 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -88,10 +89,12 @@ func (a *APIClient) ListDroppedFields() (types.ListDroppedFieldsResponse, *http. newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_folder_CreateFolder.go b/service/cip/api_folder_CreateFolder.go index 3d02998..05f78d2 100644 --- a/service/cip/api_folder_CreateFolder.go +++ b/service/cip/api_folder_CreateFolder.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateFolder Creates a new folder under the given parent folder. + body - Information about the new folder. optional - nil or *types.FolderOpts - Optional Parameters: IsAdminMode (optional.String) - Set this to true if you want to perform the request as a Content Administrator. @@ -96,10 +98,12 @@ func (a *APIClient) CreateFolder(body types.FolderDefinition, localVarOptionals newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_folder_GetAdminRecommendedFolderAsync.go b/service/cip/api_folder_GetAdminRecommendedFolderAsync.go index aea095d..a1b175c 100644 --- a/service/cip/api_folder_GetAdminRecommendedFolderAsync.go +++ b/service/cip/api_folder_GetAdminRecommendedFolderAsync.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetAdminRecommendedFolderAsync Schedule an asynchronous job to get the top-level Admin Recommended content items. + optional - nil or *types.FolderOpts - Optional Parameters: IsAdminMode (optional.String) - Set this to true if you want to perform the request as a Content Administrator. */ @@ -93,10 +95,12 @@ func (a *APIClient) GetAdminRecommendedFolderAsync(localVarOptionals *types.Fold newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_folder_GetAdminRecommendedFolderResult.go b/service/cip/api_folder_GetAdminRecommendedFolderResult.go index 0a9d3dd..808385c 100644 --- a/service/cip/api_folder_GetAdminRecommendedFolderResult.go +++ b/service/cip/api_folder_GetAdminRecommendedFolderResult.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetAdminRecommendedFolderAsyncResult Get results from Admin Recommended job for the given job identifier. + jobId - The identifier of the asynchronous Admin Recommended folder job. */ func (a *APIClient) GetAdminRecommendedFolderAsyncResult(jobId string) (types.Folder, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) GetAdminRecommendedFolderAsyncResult(jobId string) (types.Fo newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_folder_GetAdminRecommendedFolderStatus.go b/service/cip/api_folder_GetAdminRecommendedFolderStatus.go index 50846a0..e655380 100644 --- a/service/cip/api_folder_GetAdminRecommendedFolderStatus.go +++ b/service/cip/api_folder_GetAdminRecommendedFolderStatus.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetAdminRecommendedFolderAsyncStatus Get the status of an asynchronous Admin Recommended folder job for the given job identifier. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + jobId - The identifier of the asynchronous Admin Recommended folder job. */ func (a *APIClient) GetAdminRecommendedFolderAsyncStatus(jobId string) (types.AsyncJobStatus, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) GetAdminRecommendedFolderAsyncStatus(jobId string) (types.As newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_folder_GetFolder.go b/service/cip/api_folder_GetFolder.go index b2be1f3..c87f7a1 100644 --- a/service/cip/api_folder_GetFolder.go +++ b/service/cip/api_folder_GetFolder.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetFolder Get a folder with the given identifier. + id - Identifier of the folder to fetch. optional - nil or *types.FolderOpts - Optional Parameters: IsAdminMode (optional.String) - Set this to true if you want to perform the request as a Content Administrator. @@ -96,10 +98,12 @@ func (a *APIClient) GetFolder(id string, localVarOptionals *types.FolderOpts) (t newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_folder_GetGlobalFolderAsync.go b/service/cip/api_folder_GetGlobalFolderAsync.go index 7601677..1a6e6e1 100644 --- a/service/cip/api_folder_GetGlobalFolderAsync.go +++ b/service/cip/api_folder_GetGlobalFolderAsync.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetGlobalFolderAsync Schedule an asynchronous job to get global folder. Global folder contains all content items that a user has permissions to view in the organization. + optional - nil or *types.FolderOpts - Optional Parameters: IsAdminMode (optional.String) - Set this to true if you want to perform the request as a Content Administrator. */ @@ -93,10 +95,12 @@ func (a *APIClient) GetGlobalFolderAsync(localVarOptionals *types.FolderOpts) (t newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_folder_GetGlobalFolderAsyncResult.go b/service/cip/api_folder_GetGlobalFolderAsyncResult.go index c1c449d..3e57283 100644 --- a/service/cip/api_folder_GetGlobalFolderAsyncResult.go +++ b/service/cip/api_folder_GetGlobalFolderAsyncResult.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetGlobalFolderAsyncResult Get results from global folder job for the given job identifier. + jobId - The identifier of the asynchronous global folder job. */ func (a *APIClient) GetGlobalFolderAsyncResult(jobId string) (types.ContentList, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) GetGlobalFolderAsyncResult(jobId string) (types.ContentList, newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_folder_GetGlobalFolderAsyncStatus.go b/service/cip/api_folder_GetGlobalFolderAsyncStatus.go index 444a852..2c3eaab 100644 --- a/service/cip/api_folder_GetGlobalFolderAsyncStatus.go +++ b/service/cip/api_folder_GetGlobalFolderAsyncStatus.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetGlobalFolderAsyncStatus Get the status of an asynchronous global folder job for the given job identifier. + jobId - The identifier of the asynchronous global folder job. */ func (a *APIClient) GetGlobalFolderAsyncStatus(jobId string) (types.AsyncJobStatus, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) GetGlobalFolderAsyncStatus(jobId string) (types.AsyncJobStat newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_folder_GetPersonalFolder.go b/service/cip/api_folder_GetPersonalFolder.go index a75adbd..94b05a3 100644 --- a/service/cip/api_folder_GetPersonalFolder.go +++ b/service/cip/api_folder_GetPersonalFolder.go @@ -1,11 +1,12 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -88,10 +89,12 @@ func (a *APIClient) GetPersonalFolder() (types.Folder, *http.Response, error) { newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_folder_UpdateFolder.go b/service/cip/api_folder_UpdateFolder.go index 4aad3fa..6f4e7f3 100644 --- a/service/cip/api_folder_UpdateFolder.go +++ b/service/cip/api_folder_UpdateFolder.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateFolder Update an existing folder with the given identifier. + body - Information to update about the folder. id - Identifier of the folder to update. optional - nil or *types.FolderOpts - Optional Parameters: @@ -99,10 +101,12 @@ func (a *APIClient) UpdateFolder(body types.UpdateFolderRequest, id string, loca newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_general_SendMessage.go b/service/cip/api_general_SendMessage.go index 2a800a9..732d36b 100644 --- a/service/cip/api_general_SendMessage.go +++ b/service/cip/api_general_SendMessage.go @@ -13,6 +13,7 @@ import ( SendMessage Allows you to send data to a Sumo Logic HTTP source endpoint. If sending the data to the endpoint fails it will retry every 10 seconds based on the value of maxRetries. + maxRetries - determines how many times the message will attempt to be sent if there is an error sending. message - data to send to the Sumo Logic source. */ diff --git a/service/cip/api_health_events_ListAllHealthEvents.go b/service/cip/api_health_events_ListAllHealthEvents.go index 2c5781a..f4be9dd 100644 --- a/service/cip/api_health_events_ListAllHealthEvents.go +++ b/service/cip/api_health_events_ListAllHealthEvents.go @@ -1,19 +1,21 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ListAllHealthEvents Get a list of all the unresolved health events in your account. - optional - nil or *types.HealthEventsOpts - Optional Parameters: - Limit (optional.Int32) - Limit the number of health events returned in the response. The number of health events returned may be less than the limit. - Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. token is set to null when no more pages are left. + + optional - nil or *types.HealthEventsOpts - Optional Parameters: + Limit (optional.Int32) - Limit the number of health events returned in the response. The number of health events returned may be less than the limit. + Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. token is set to null when no more pages are left. */ func (a *APIClient) ListAllHealthEvents(localVarOptionals *types.HealthEventsOpts) (types.ListHealthEventResponse, *http.Response, error) { var ( @@ -97,10 +99,12 @@ func (a *APIClient) ListAllHealthEvents(localVarOptionals *types.HealthEventsOpt newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_health_events_ListAllHealthEventsForResources.go b/service/cip/api_health_events_ListAllHealthEventsForResources.go index 27d8ddd..64defed 100644 --- a/service/cip/api_health_events_ListAllHealthEventsForResources.go +++ b/service/cip/api_health_events_ListAllHealthEventsForResources.go @@ -1,21 +1,23 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ListAllHealthEventsForResources Get a list of all the unresolved events in your account that belong to the supplied resource identifiers. If you want to retrieve health events for a Source or Ingest Budget use the following functions: ListSourceHealthEvents or ListIngestBudgetHealthEvents - body - Resource identifiers to request health events from. - optional - nil or *types.HealthEventsOpts - Optional Parameters: - Limit (optional.Int32) - Limit the number of health events returned in the response. The number of health events returned may be less than the limit. - Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. token is set to null when no more pages are left. + + body - Resource identifiers to request health events from. + optional - nil or *types.HealthEventsOpts - Optional Parameters: + Limit (optional.Int32) - Limit the number of health events returned in the response. The number of health events returned may be less than the limit. + Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. token is set to null when no more pages are left. */ func (a *APIClient) ListAllHealthEventsForResources(body types.ResourceIdentities, localVarOptionals *types.HealthEventsOpts) (types.ListHealthEventResponse, *http.Response, error) { var ( @@ -101,10 +103,12 @@ func (a *APIClient) ListAllHealthEventsForResources(body types.ResourceIdentitie newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_ingest_budget_v1_AssignCollectorToBudget.go b/service/cip/api_ingest_budget_v1_AssignCollectorToBudget.go index 09ef852..95d1769 100644 --- a/service/cip/api_ingest_budget_v1_AssignCollectorToBudget.go +++ b/service/cip/api_ingest_budget_v1_AssignCollectorToBudget.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* AssignCollectorToBudget Assign a Collector to a budget. + id - Identifier of the ingest budget to assign to the Collector. collectorId - Identifier of the Collector to assign. */ @@ -93,10 +95,12 @@ func (a *APIClient) AssignCollectorToBudget(id string, collectorId string) (type newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_ingest_budget_v1_CreateIngestBudget.go b/service/cip/api_ingest_budget_v1_CreateIngestBudget.go index b10e6bf..bbf8a29 100644 --- a/service/cip/api_ingest_budget_v1_CreateIngestBudget.go +++ b/service/cip/api_ingest_budget_v1_CreateIngestBudget.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateIngestBudget Create a new ingest budget. + body - Information about the new ingest budget. */ func (a *APIClient) CreateIngestBudget(body types.IngestBudgetDefinition) (types.IngestBudget, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) CreateIngestBudget(body types.IngestBudgetDefinition) (types newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_ingest_budget_v1_DeleteIngestBudget.go b/service/cip/api_ingest_budget_v1_DeleteIngestBudget.go index 5c4ff3d..1f579e8 100644 --- a/service/cip/api_ingest_budget_v1_DeleteIngestBudget.go +++ b/service/cip/api_ingest_budget_v1_DeleteIngestBudget.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteIngestBudget Delete an ingest budget with the given identifier. + id - Identifier of the ingest budget to delete. */ func (a *APIClient) DeleteIngestBudget(id string) (*http.Response, error) { @@ -75,10 +77,12 @@ func (a *APIClient) DeleteIngestBudget(id string) (*http.Response, error) { newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_ingest_budget_v1_GetAssignedCollectors.go b/service/cip/api_ingest_budget_v1_GetAssignedCollectors.go index de5efb7..c602f50 100644 --- a/service/cip/api_ingest_budget_v1_GetAssignedCollectors.go +++ b/service/cip/api_ingest_budget_v1_GetAssignedCollectors.go @@ -2,20 +2,22 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetAssignedCollectors Get a list of Collectors assigned to an ingest budget. The response is paginated with a default limit of 100 Collectors per page. - id - Identifier of ingest budget to which Collectors are assigned. - optional - nil or *types.listIngestBudgetV1Opts - Optional Parameters: - Limit (optional.Int32) - Limit the number of Collectors returned in the response. The number of Collectors returned may be less than the limit. - Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. + + id - Identifier of ingest budget to which Collectors are assigned. + optional - nil or *types.listIngestBudgetV1Opts - Optional Parameters: + Limit (optional.Int32) - Limit the number of Collectors returned in the response. The number of Collectors returned may be less than the limit. + Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. */ func (a *APIClient) GetAssignedCollectors(id string, localVarOptionals *types.ListIngestBudgetV1Opts) (types.ListCollectorIdentitiesResponse, *http.Response, error) { var ( @@ -100,10 +102,12 @@ func (a *APIClient) GetAssignedCollectors(id string, localVarOptionals *types.Li newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_ingest_budget_v1_GetIngestBudget.go b/service/cip/api_ingest_budget_v1_GetIngestBudget.go index 47c6835..80abefd 100644 --- a/service/cip/api_ingest_budget_v1_GetIngestBudget.go +++ b/service/cip/api_ingest_budget_v1_GetIngestBudget.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetIngestBudget Get an ingest budget by the given identifier. + id - Identifier of ingest budget to return. */ func (a *APIClient) GetIngestBudget(id string) (types.IngestBudget, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) GetIngestBudget(id string) (types.IngestBudget, *http.Respon newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_ingest_budget_v1_ListIngestBudgets.go b/service/cip/api_ingest_budget_v1_ListIngestBudgets.go index c1aa856..2101087 100644 --- a/service/cip/api_ingest_budget_v1_ListIngestBudgets.go +++ b/service/cip/api_ingest_budget_v1_ListIngestBudgets.go @@ -1,19 +1,21 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ListIngestBudgets Get a list of all ingest budgets. The response is paginated with a default limit of 100 budgets per page. - optional - nil or *types.ListIngestBudgetV1Opts - Optional Parameters: - Limit (optional.Int32) - Limit the number of budgets returned in the response. The number of budgets returned may be less than the limit. - Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. + + optional - nil or *types.ListIngestBudgetV1Opts - Optional Parameters: + Limit (optional.Int32) - Limit the number of budgets returned in the response. The number of budgets returned may be less than the limit. + Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. */ func (a *APIClient) ListIngestBudgets(localVarOptionals *types.ListIngestBudgetV1Opts) (types.ListIngestBudgetsResponse, *http.Response, error) { var ( @@ -97,10 +99,12 @@ func (a *APIClient) ListIngestBudgets(localVarOptionals *types.ListIngestBudgetV newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_ingest_budget_v1_RemoveCollectorFromBudget.go b/service/cip/api_ingest_budget_v1_RemoveCollectorFromBudget.go index 97c2bfa..adf5272 100644 --- a/service/cip/api_ingest_budget_v1_RemoveCollectorFromBudget.go +++ b/service/cip/api_ingest_budget_v1_RemoveCollectorFromBudget.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* RemoveCollectorFromBudget Remove Collector from a budget. + id - Identifier of the ingest budget to unassign from the Collector. collectorId - Identifier of the Collector to unassign. */ @@ -93,10 +95,12 @@ func (a *APIClient) RemoveCollectorFromBudget(id string, collectorId string) (ty newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_ingest_budget_v1_ResetUsage.go b/service/cip/api_ingest_budget_v1_ResetUsage.go index 9101057..6cb4a6e 100644 --- a/service/cip/api_ingest_budget_v1_ResetUsage.go +++ b/service/cip/api_ingest_budget_v1_ResetUsage.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ResetUsage Reset ingest budget's current usage to 0 before the scheduled reset time. + id - Identifier of the ingest budget to reset usage. */ func (a *APIClient) ResetUsage(id string) (*http.Response, error) { @@ -75,10 +77,12 @@ func (a *APIClient) ResetUsage(id string) (*http.Response, error) { newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_ingest_budget_v1_UpdateIngestBudget.go b/service/cip/api_ingest_budget_v1_UpdateIngestBudget.go index f3ac180..6a81a44 100644 --- a/service/cip/api_ingest_budget_v1_UpdateIngestBudget.go +++ b/service/cip/api_ingest_budget_v1_UpdateIngestBudget.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateIngestBudget Update an existing ingest budget. All properties specified in the request are required. + body - Information to update about the ingest budget. id - Identifier of the ingest budget to update. */ @@ -94,10 +96,12 @@ func (a *APIClient) UpdateIngestBudget(body types.IngestBudgetDefinition, id str newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_ingest_budget_v2_CreateIngestBudget.go b/service/cip/api_ingest_budget_v2_CreateIngestBudget.go index 26093ac..d5bb484 100644 --- a/service/cip/api_ingest_budget_v2_CreateIngestBudget.go +++ b/service/cip/api_ingest_budget_v2_CreateIngestBudget.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateIngestBudgetV2 Create a new ingest budget. + body - Information about the new ingest budget. */ func (a *APIClient) CreateIngestBudgetV2(body types.IngestBudgetDefinitionV2) (types.IngestBudgetV2, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) CreateIngestBudgetV2(body types.IngestBudgetDefinitionV2) (t newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_ingest_budget_v2_DeleteIngestBudget.go b/service/cip/api_ingest_budget_v2_DeleteIngestBudget.go index b90f710..59e6fa3 100644 --- a/service/cip/api_ingest_budget_v2_DeleteIngestBudget.go +++ b/service/cip/api_ingest_budget_v2_DeleteIngestBudget.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteIngestBudgetV2 Delete an ingest budget with the given identifier. + id - Identifier of the ingest budget to delete. */ func (a *APIClient) DeleteIngestBudgetV2(id string) (*http.Response, error) { @@ -75,10 +77,12 @@ func (a *APIClient) DeleteIngestBudgetV2(id string) (*http.Response, error) { newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_ingest_budget_v2_GetIngestBudget.go b/service/cip/api_ingest_budget_v2_GetIngestBudget.go index bda550c..9767ef1 100644 --- a/service/cip/api_ingest_budget_v2_GetIngestBudget.go +++ b/service/cip/api_ingest_budget_v2_GetIngestBudget.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetIngestBudgetV2 Get an ingest budget by the given identifier. + id - Identifier of ingest budget to return. */ func (a *APIClient) GetIngestBudgetV2(id string) (types.IngestBudgetV2, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) GetIngestBudgetV2(id string) (types.IngestBudgetV2, *http.Re newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_ingest_budget_v2_ListIngestBudgets.go b/service/cip/api_ingest_budget_v2_ListIngestBudgets.go index 5dd1508..e69ffdf 100644 --- a/service/cip/api_ingest_budget_v2_ListIngestBudgets.go +++ b/service/cip/api_ingest_budget_v2_ListIngestBudgets.go @@ -1,19 +1,21 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ListIngestBudgetsV2 Get a list of all ingest budgets. The response is paginated with a default limit of 100 budgets per page. - optional - nil or *types.ListIngestBudgetV2Opts - Optional Parameters: - Limit (optional.Int32) - Limit the number of budgets returned in the response. The number of budgets returned may be less than the limit. - Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. + + optional - nil or *types.ListIngestBudgetV2Opts - Optional Parameters: + Limit (optional.Int32) - Limit the number of budgets returned in the response. The number of budgets returned may be less than the limit. + Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. */ func (a *APIClient) ListIngestBudgetsV2(localVarOptionals *types.ListIngestBudgetV2Opts) (types.ListIngestBudgetsResponseV2, *http.Response, error) { var ( @@ -97,10 +99,12 @@ func (a *APIClient) ListIngestBudgetsV2(localVarOptionals *types.ListIngestBudge newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_ingest_budget_v2_ResetUsage.go b/service/cip/api_ingest_budget_v2_ResetUsage.go index d1d415b..05dbc06 100644 --- a/service/cip/api_ingest_budget_v2_ResetUsage.go +++ b/service/cip/api_ingest_budget_v2_ResetUsage.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ResetUsageV2 Reset ingest budget's current usage to 0 before the scheduled reset time. + id - Identifier of the ingest budget to reset usage. */ func (a *APIClient) ResetUsageV2(id string) (*http.Response, error) { @@ -75,10 +77,12 @@ func (a *APIClient) ResetUsageV2(id string) (*http.Response, error) { newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_ingest_budget_v2_UpdateIngestBudget.go b/service/cip/api_ingest_budget_v2_UpdateIngestBudget.go index 9a410d9..0fb2da1 100644 --- a/service/cip/api_ingest_budget_v2_UpdateIngestBudget.go +++ b/service/cip/api_ingest_budget_v2_UpdateIngestBudget.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateIngestBudgetV2 Update an existing ingest budget. All properties specified in the request are required. + body - Information to update about the ingest budget. id - Identifier of the ingest budget to update. */ @@ -94,10 +96,12 @@ func (a *APIClient) UpdateIngestBudgetV2(body types.IngestBudgetDefinitionV2, id newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_log_searches_estimated_usage_GetLogSearchEstimatedUsage.go b/service/cip/api_log_searches_estimated_usage_GetLogSearchEstimatedUsage.go index f853638..0d86ce7 100644 --- a/service/cip/api_log_searches_estimated_usage_GetLogSearchEstimatedUsage.go +++ b/service/cip/api_log_searches_estimated_usage_GetLogSearchEstimatedUsage.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetLogSearchEstimatedUsage Gets the estimated volume of data that would be scanned for a given log search in the Infrequent data tier. + body - The definition of the log search estimated usage. */ func (a *APIClient) GetLogSearchEstimatedUsage(body types.LogSearchEstimatedUsageRequest) (types.LogSearchEstimatedUsageDefinition, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) GetLogSearchEstimatedUsage(body types.LogSearchEstimatedUsag newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_log_searches_estimated_usage_GetLogSearchEstimatedUsageByTier.go b/service/cip/api_log_searches_estimated_usage_GetLogSearchEstimatedUsageByTier.go index 2b67f71..99f8a44 100644 --- a/service/cip/api_log_searches_estimated_usage_GetLogSearchEstimatedUsageByTier.go +++ b/service/cip/api_log_searches_estimated_usage_GetLogSearchEstimatedUsageByTier.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetLogSearchEstimatedUsageByTier Gets the estimated volume of data that would be scanned for a given log search per data tier. + body - The definition of the log search estimated usage. */ func (a *APIClient) GetLogSearchEstimatedUsageByTier(body types.LogSearchEstimatedUsageRequestV2) (types.LogSearchEstimatedUsageByTierDefinition, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) GetLogSearchEstimatedUsageByTier(body types.LogSearchEstimat newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_lookup_CreateTable.go b/service/cip/api_lookup_CreateTable.go index 9ec499d..c192137 100644 --- a/service/cip/api_lookup_CreateTable.go +++ b/service/cip/api_lookup_CreateTable.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateTable Create a new lookup table by providing a schema and specifying its configuration. Providing parentFolderId is mandatory. + body - The schema and configuration for the lookup table. */ func (a *APIClient) CreateTable(body types.LookupTableDefinition) (types.LookupTable, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) CreateTable(body types.LookupTableDefinition) (types.LookupT newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_lookup_DeleteTable.go b/service/cip/api_lookup_DeleteTable.go index 8476074..762065d 100644 --- a/service/cip/api_lookup_DeleteTable.go +++ b/service/cip/api_lookup_DeleteTable.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteTable Delete a lookup table completely. + id - Identifier of the lookup table. */ func (a *APIClient) DeleteTable(id string) (*http.Response, error) { @@ -75,10 +77,12 @@ func (a *APIClient) DeleteTable(id string) (*http.Response, error) { newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_lookup_DeleteTableRow.go b/service/cip/api_lookup_DeleteTableRow.go index a867612..cb821be 100644 --- a/service/cip/api_lookup_DeleteTableRow.go +++ b/service/cip/api_lookup_DeleteTableRow.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteTableRow Delete a row from lookup table by giving primary key. The complete set of primary key fields of the lookup table should be provided. + body - Lookup table row delete definition. id - Identifier of the lookup table. */ @@ -78,10 +80,12 @@ func (a *APIClient) DeleteTableRow(body types.RowDeleteDefinition, id string) (* newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_lookup_LookupTableById.go b/service/cip/api_lookup_LookupTableById.go index 4f98bfc..47f2cbd 100644 --- a/service/cip/api_lookup_LookupTableById.go +++ b/service/cip/api_lookup_LookupTableById.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* LookupTableById Get a lookup table for the given identifier. + id - Identifier of the lookup table. */ func (a *APIClient) LookupTableById(id string) (types.LookupTable, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) LookupTableById(id string) (types.LookupTable, *http.Respons newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_lookup_RequestJobStatus.go b/service/cip/api_lookup_RequestJobStatus.go index 39f1076..4645250 100644 --- a/service/cip/api_lookup_RequestJobStatus.go +++ b/service/cip/api_lookup_RequestJobStatus.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* RequestJobStatus Retrieve the status of a previously made request. If the request was successful, the status of the response object will be Success. + jobId - An identifier returned in response to an asynchronous request. */ func (a *APIClient) RequestJobStatus(jobId string) (types.LookupAsyncJobStatus, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) RequestJobStatus(jobId string) (types.LookupAsyncJobStatus, newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_lookup_TruncateTable.go b/service/cip/api_lookup_TruncateTable.go index 380a1cc..702ec4e 100644 --- a/service/cip/api_lookup_TruncateTable.go +++ b/service/cip/api_lookup_TruncateTable.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* TruncateTable Delete all data from a lookup table. + id - Identifier of the table to clear. */ func (a *APIClient) TruncateTable(id string) (types.LookupRequestToken, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) TruncateTable(id string) (types.LookupRequestToken, *http.Re newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_lookup_UpdateTable.go b/service/cip/api_lookup_UpdateTable.go index 54c9b3b..08fa527 100644 --- a/service/cip/api_lookup_UpdateTable.go +++ b/service/cip/api_lookup_UpdateTable.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateTable Edit the lookup table data. All the fields are mandatory in the request. + body - The configuration changes for the lookup table. id - Identifier of the lookup table. */ @@ -94,10 +96,12 @@ func (a *APIClient) UpdateTable(body types.LookupUpdateDefinition, id string) (t newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_lookup_UpdateTableRow.go b/service/cip/api_lookup_UpdateTableRow.go index a41b9ec..7e37499 100644 --- a/service/cip/api_lookup_UpdateTableRow.go +++ b/service/cip/api_lookup_UpdateTableRow.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateTableRow Insert or update a row of a lookup table with the given identifier. A new row is inserted if the primary key does not exist already, otherwise the existing row with the specified primary key is updated. All the fields of the lookup table are required and will be updated to the given values. In case a field is not specified then it will be assumed to be set to null. If the table size exceeds the maximum limit of 100MB then based on the size limit action of the table the update will be processed or discarded. + body - Lookup table row update definition. id - Identifier of the lookup table. */ @@ -78,10 +80,12 @@ func (a *APIClient) UpdateTableRow(body types.RowUpdateDefinition, id string) (* newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_lookup_UploadFile.go b/service/cip/api_lookup_UploadFile.go index 14ed1fb..038231f 100644 --- a/service/cip/api_lookup_UploadFile.go +++ b/service/cip/api_lookup_UploadFile.go @@ -2,18 +2,20 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io" "io/ioutil" "net/http" "net/url" "os" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UploadFile Create a request to populate a lookup table with a CSV file. + file - A CSV file id - Identifier of the lookup table to populate. optional - nil or *types.LookupTableUploadFileOpts - Optional Parameters: @@ -113,10 +115,12 @@ func (a *APIClient) UploadFile(file *os.File, id string, localVarOptionals *type newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_metrics_query_RunMetricsQueries.go b/service/cip/api_metrics_query_RunMetricsQueries.go index b1cd4b7..0d9f48a 100644 --- a/service/cip/api_metrics_query_RunMetricsQueries.go +++ b/service/cip/api_metrics_query_RunMetricsQueries.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* RunMetricsQueries Execute up to six metrics queries. If you specify multiple queries, each is returned as a separate set of time series. + body - The parameters for the metrics query. */ func (a *APIClient) RunMetricsQueries(body types.MetricsQueryRequest) (types.MetricsQueryResponse, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) RunMetricsQueries(body types.MetricsQueryRequest) (types.Met newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_metrics_searches_CreateMetricsSearch.go b/service/cip/api_metrics_searches_CreateMetricsSearch.go index 183455d..d5b4de6 100644 --- a/service/cip/api_metrics_searches_CreateMetricsSearch.go +++ b/service/cip/api_metrics_searches_CreateMetricsSearch.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateMetricsSearch Saves a metrics search in the content library. Metrics search consists of one or more queries, a time range, a quantization period and a set of chart properties like line width. + body - The definition of the metrics search. */ func (a *APIClient) CreateMetricsSearch(body types.SaveMetricsSearchRequest) (types.MetricsSearchInstance, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) CreateMetricsSearch(body types.SaveMetricsSearchRequest) (ty newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_metrics_searches_DeleteMetricsSearch.go b/service/cip/api_metrics_searches_DeleteMetricsSearch.go index cacb11b..004063a 100644 --- a/service/cip/api_metrics_searches_DeleteMetricsSearch.go +++ b/service/cip/api_metrics_searches_DeleteMetricsSearch.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteMetricsSearch Deletes a metrics search from the content library. + id - Identifier of the metrics search. */ func (a *APIClient) DeleteMetricsSearch(id string) (*http.Response, error) { @@ -75,10 +77,12 @@ func (a *APIClient) DeleteMetricsSearch(id string) (*http.Response, error) { newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_metrics_searches_GetMetricsSearch.go b/service/cip/api_metrics_searches_GetMetricsSearch.go index c31170b..9f20ec8 100644 --- a/service/cip/api_metrics_searches_GetMetricsSearch.go +++ b/service/cip/api_metrics_searches_GetMetricsSearch.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetMetricsSearch Returns a metrics search with the specified identifier. + id - Identifier of the metrics search. */ func (a *APIClient) GetMetricsSearch(id string) (types.MetricsSearchInstance, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) GetMetricsSearch(id string) (types.MetricsSearchInstance, *h newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_metrics_searches_UpdateMetricsSearch.go b/service/cip/api_metrics_searches_UpdateMetricsSearch.go index 7a7111d..3691a74 100644 --- a/service/cip/api_metrics_searches_UpdateMetricsSearch.go +++ b/service/cip/api_metrics_searches_UpdateMetricsSearch.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateMetricsSearch Updates a metrics search with the specified identifier. Partial updates are not supported, you must provide values for all fields. + body - An updated metrics search definition. id - Identifier of the metrics search. */ @@ -94,10 +96,12 @@ func (a *APIClient) UpdateMetricsSearch(body types.MetricsSearchV1, id string) ( newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_monitors_CopyMonitors.go b/service/cip/api_monitors_CopyMonitors.go index c068436..8809516 100644 --- a/service/cip/api_monitors_CopyMonitors.go +++ b/service/cip/api_monitors_CopyMonitors.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CopyMonitors Copy a monitor or folder in the monitors library. + body - Details of the content to copy. id - Identifier of the monitor or folder to copy. */ @@ -94,10 +96,12 @@ func (a *APIClient) CopyMonitors(body types.ContentCopyParams, id string) (types newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_monitors_CreateMonitors.go b/service/cip/api_monitors_CreateMonitors.go index 63ee1ce..e704144 100644 --- a/service/cip/api_monitors_CreateMonitors.go +++ b/service/cip/api_monitors_CreateMonitors.go @@ -1,11 +1,12 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) func (a *APIClient) CreateMonitors(body types.MonitorsLibraryBase, parentId string) (types.MonitorsLibraryBaseResponse, *http.Response, error) { @@ -87,10 +88,12 @@ func (a *APIClient) CreateMonitors(body types.MonitorsLibraryBase, parentId stri newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_monitors_DeleteMonitorsById.go b/service/cip/api_monitors_DeleteMonitorsById.go index ee06af0..80d5613 100644 --- a/service/cip/api_monitors_DeleteMonitorsById.go +++ b/service/cip/api_monitors_DeleteMonitorsById.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteMonitorsById Delete a monitor or folder from the monitors library. + id - Identifier of the monitor or folder to delete. */ func (a *APIClient) DeleteMonitorsById(id string) (*http.Response, error) { @@ -75,10 +77,12 @@ func (a *APIClient) DeleteMonitorsById(id string) (*http.Response, error) { newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_monitors_DeleteMonitorsByIds.go b/service/cip/api_monitors_DeleteMonitorsByIds.go index b319e85..5b2ecc4 100644 --- a/service/cip/api_monitors_DeleteMonitorsByIds.go +++ b/service/cip/api_monitors_DeleteMonitorsByIds.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteMonitorsByIds Bulk delete a monitor or folder by the given identifiers in the monitors library. + ids - A comma-separated list of identifiers. */ func (a *APIClient) DeleteMonitorsByIds(ids []string) (map[string]types.MonitorsLibraryBaseResponse, *http.Response, error) { @@ -90,10 +92,12 @@ func (a *APIClient) DeleteMonitorsByIds(ids []string) (map[string]types.Monitors newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_monitors_ExportMonitorsItem.go b/service/cip/api_monitors_ExportMonitorsItem.go index 2ec2fde..d841073 100644 --- a/service/cip/api_monitors_ExportMonitorsItem.go +++ b/service/cip/api_monitors_ExportMonitorsItem.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ExportMonitorsItem Export a monitor or folder. If the given identifier is a folder, everything under the folder is exported recursively with folder as the root. + id - Identifier of the monitor or folder to export. */ func (a *APIClient) ExportMonitorsItem(id string) (types.MonitorsLibraryBaseExport, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) ExportMonitorsItem(id string) (types.MonitorsLibraryBaseExpo newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_monitors_GetMonitorUsageInfo.go b/service/cip/api_monitors_GetMonitorUsageInfo.go index 9b6e701..b301c71 100644 --- a/service/cip/api_monitors_GetMonitorUsageInfo.go +++ b/service/cip/api_monitors_GetMonitorUsageInfo.go @@ -1,11 +1,12 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -88,10 +89,12 @@ func (a *APIClient) GetMonitorUsageInfo() ([]types.MonitorUsage, *http.Response, newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_monitors_GetMonitorsById.go b/service/cip/api_monitors_GetMonitorsById.go index a45124e..54af382 100644 --- a/service/cip/api_monitors_GetMonitorsById.go +++ b/service/cip/api_monitors_GetMonitorsById.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetMonitorsById Get a monitor or folder from the monitors library. + id - Identifier of the monitor or folder to read. */ func (a *APIClient) GetMonitorsById(id string) (types.MonitorsLibraryBaseResponse, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) GetMonitorsById(id string) (types.MonitorsLibraryBaseRespons newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_monitors_GetMonitorsByIds.go b/service/cip/api_monitors_GetMonitorsByIds.go index 3a0903d..a8b2b4d 100644 --- a/service/cip/api_monitors_GetMonitorsByIds.go +++ b/service/cip/api_monitors_GetMonitorsByIds.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetMonitorsByIds Bulk read a monitor or folder by the given identifiers from the monitors library. + ids - A comma-separated list of identifiers. */ func (a *APIClient) GetMonitorsByIds(ids []string) (map[string]types.MonitorsLibraryBaseResponse, *http.Response, error) { @@ -90,10 +92,12 @@ func (a *APIClient) GetMonitorsByIds(ids []string) (map[string]types.MonitorsLib newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_monitors_GetMonitorsByPath.go b/service/cip/api_monitors_GetMonitorsByPath.go index dac97cd..1cd28e7 100644 --- a/service/cip/api_monitors_GetMonitorsByPath.go +++ b/service/cip/api_monitors_GetMonitorsByPath.go @@ -1,17 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetMonitorsByPath Read a monitor or folder by its path in the monitors library structure. - * @param path The path of the monitor or folder. + - @param path The path of the monitor or folder. */ func (a *APIClient) GetMonitorsByPath(path string) (types.MonitorsLibraryBaseResponse, *http.Response, error) { var ( @@ -90,10 +91,12 @@ func (a *APIClient) GetMonitorsByPath(path string) (types.MonitorsLibraryBaseRes newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_monitors_GetMonitorsFullPath.go b/service/cip/api_monitors_GetMonitorsFullPath.go index 2c351d1..6ca36c3 100644 --- a/service/cip/api_monitors_GetMonitorsFullPath.go +++ b/service/cip/api_monitors_GetMonitorsFullPath.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetMonitorsFullPath Get the full path of the monitor or folder in the monitors library. + id - Identifier of the monitor or folder. */ func (a *APIClient) GetMonitorsFullPath(id string) (types.Path, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) GetMonitorsFullPath(id string) (types.Path, *http.Response, newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_monitors_GetMonitorsLibraryRoot.go b/service/cip/api_monitors_GetMonitorsLibraryRoot.go index 55cccad..2d9e9a4 100644 --- a/service/cip/api_monitors_GetMonitorsLibraryRoot.go +++ b/service/cip/api_monitors_GetMonitorsLibraryRoot.go @@ -1,11 +1,12 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -88,10 +89,12 @@ func (a *APIClient) GetMonitorsLibraryRoot() (types.MonitorsLibraryFolderRespons newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_monitors_ImportMonitorsItem.go b/service/cip/api_monitors_ImportMonitorsItem.go index 4c366be..9f6da39 100644 --- a/service/cip/api_monitors_ImportMonitorsItem.go +++ b/service/cip/api_monitors_ImportMonitorsItem.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ImportMonitorsItem Import a monitor or folder. + body - The monitor or folder to be imported. parentId - Identifier of the parent folder in which to import the monitor or folder. */ @@ -94,10 +96,12 @@ func (a *APIClient) ImportMonitorsItem(body types.MonitorsLibraryBaseExport, par newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_monitors_MoveMonitors.go b/service/cip/api_monitors_MoveMonitors.go index aa4f58f..810f011 100644 --- a/service/cip/api_monitors_MoveMonitors.go +++ b/service/cip/api_monitors_MoveMonitors.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* MoveMonitors Move a monitor or folder to a different location in the monitors library. + id - Identifier of the monitor or folder to move. parentId - Identifier of the parent folder to move the monitor or folder to. */ @@ -93,10 +95,12 @@ func (a *APIClient) MoveMonitors(id string, parentId string) (types.MonitorsLibr newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_monitors_SearchMonitors.go b/service/cip/api_monitors_SearchMonitors.go index 6e8a780..33dc291 100644 --- a/service/cip/api_monitors_SearchMonitors.go +++ b/service/cip/api_monitors_SearchMonitors.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* SearchMonitors Search for a monitor or folder in the monitors library structure. + query - The search query to find monitor or folder. The following is a list of different filters: **createdBy**: Filter by the user's identifier who created the content (createdBy:000000000000968B). **createdBefore**: Filter by the content objects created before the given timestamp(in milliseconds) (createdBefore:1457997222). @@ -107,10 +109,12 @@ func (a *APIClient) SearchMonitors(query string, localVarOptionals *types.Monito newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_monitors_UpdateMonitorsById.go b/service/cip/api_monitors_UpdateMonitorsById.go index 406b1cf..fc8a65d 100644 --- a/service/cip/api_monitors_UpdateMonitorsById.go +++ b/service/cip/api_monitors_UpdateMonitorsById.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateMonitorsById Update a monitor or folder in the monitors library. + body - The monitor or folder to update. The content version must match its latest version number in the monitors library. If the version does not match it will not be updated. id - Identifier of the monitor or folder to update. */ @@ -94,10 +96,12 @@ func (a *APIClient) UpdateMonitorsById(body types.MonitorsLibraryBaseUpdate, id newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_monitors_ValidateMonitorQueries.go b/service/cip/api_monitors_ValidateMonitorQueries.go index c7254a0..522bf79 100644 --- a/service/cip/api_monitors_ValidateMonitorQueries.go +++ b/service/cip/api_monitors_ValidateMonitorQueries.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ValidateMonitorQueries Validate the query strings to make sure they are valid monitor queries. + body - The queries that will be validated. */ func (a *APIClient) ValidateMonitorQueries(body types.MonitorQueries) (types.MonitorQueriesValidationResult, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) ValidateMonitorQueries(body types.MonitorQueries) (types.Mon newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_organizations_CreateOrganization.go b/service/cip/api_organizations_CreateOrganization.go index afbdd2c..48e55dd 100644 --- a/service/cip/api_organizations_CreateOrganization.go +++ b/service/cip/api_organizations_CreateOrganization.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateOrganization Create a new child organization. + body - Details about the organization to create. parentDeploymentId - Deployment on which the calling organization resides. */ @@ -93,10 +95,12 @@ func (a *APIClient) CreateOrganization(body types.OrganizationWithSubscriptionDe newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_organizations_CreateOrganizationAccessKey.go b/service/cip/api_organizations_CreateOrganizationAccessKey.go index cd66af4..76b9939 100644 --- a/service/cip/api_organizations_CreateOrganizationAccessKey.go +++ b/service/cip/api_organizations_CreateOrganizationAccessKey.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateOrganizationAccessKey Get an access ID and key pair for an existing organization based on the organization identifier. + body - Access Key details. parentDeploymentId - Deployment on which the calling organization resides. orgId - Identifier of the organization for which the access ID and key pair is required. @@ -96,10 +98,12 @@ func (a *APIClient) CreateOrganizationAccessKey(body types.AccessKeyCreateReques newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_organizations_DeleteOrganization.go b/service/cip/api_organizations_DeleteOrganization.go index 4bfd40c..f7db92e 100644 --- a/service/cip/api_organizations_DeleteOrganization.go +++ b/service/cip/api_organizations_DeleteOrganization.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteOrganization Deactivate an organization with the given identifier, deleting all its data and its subscription. + orgId - Identifier of the organization to deactivate. parentDeploymentId - Deployment on which the calling organization resides. */ @@ -93,10 +95,12 @@ func (a *APIClient) DeleteOrganization(orgId string, parentDeploymentId string) newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_organizations_GetDeployments.go b/service/cip/api_organizations_GetDeployments.go index 4c2a724..89b3acd 100644 --- a/service/cip/api_organizations_GetDeployments.go +++ b/service/cip/api_organizations_GetDeployments.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetDeployments Get deployment details where organization can be created. + parentDeploymentId - Deployment on which the calling organization resides. */ func (a *APIClient) GetDeployments(parentDeploymentId string) ([]types.Deployment, *http.Response, error) { @@ -90,10 +92,12 @@ func (a *APIClient) GetDeployments(parentDeploymentId string) ([]types.Deploymen newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_organizations_GetOrganization.go b/service/cip/api_organizations_GetOrganization.go index 862056c..bcbce3b 100644 --- a/service/cip/api_organizations_GetOrganization.go +++ b/service/cip/api_organizations_GetOrganization.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetOrganization Get details of an existing organization based on an organization identifier. + orgId - Identifier of the organization for which the details are required. parentDeploymentId - Deployment on which the calling organization resides. */ @@ -93,10 +95,12 @@ func (a *APIClient) GetOrganization(orgId string, parentDeploymentId string) (ty newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_organizations_GetOrganizationUsage.go b/service/cip/api_organizations_GetOrganizationUsage.go index 6bd2d26..402ae0e 100644 --- a/service/cip/api_organizations_GetOrganizationUsage.go +++ b/service/cip/api_organizations_GetOrganizationUsage.go @@ -2,18 +2,19 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetOrganizationUsage Get the detailed usage breakdown of an existing organization based on the organization identifier. - * @param orgId Identifier of the organization for which the details are required. - * @param parentDeploymentId Deployment on which the calling organization resides. + - @param orgId Identifier of the organization for which the details are required. + - @param parentDeploymentId Deployment on which the calling organization resides. */ func (a *APIClient) GetOrganizationUsage(orgId string, parentDeploymentId string) (types.DetailedUsage, *http.Response, error) { var ( @@ -93,10 +94,12 @@ func (a *APIClient) GetOrganizationUsage(orgId string, parentDeploymentId string newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_organizations_GetOrganizationUsages.go b/service/cip/api_organizations_GetOrganizationUsages.go index ab1deef..c446642 100644 --- a/service/cip/api_organizations_GetOrganizationUsages.go +++ b/service/cip/api_organizations_GetOrganizationUsages.go @@ -1,21 +1,24 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetOrganizationUsages Get the credits usage details of all the given organizations. The response is paginated with a default limit of 100 organizations per page. + body - List of the organizations for which usage needs to be fetched. parentDeploymentId - Deployment on which the calling organization resides. optional - nil or *types.OrganizationsUsagesOpts - Optional Parameters: Limit (optional.Int32) - Limit the number of results returned in the response. The number of results returned may be less than the limit. Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. token is set to null when no more pages are left. + @return ListUsagesResponse */ func (a *APIClient) GetOrganizationUsages(body []string, parentDeploymentId string, localVarOptionals *types.OrganizationsUsagesOpts) (types.ListUsagesResponse, *http.Response, error) { @@ -103,10 +106,12 @@ func (a *APIClient) GetOrganizationUsages(body []string, parentDeploymentId stri newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_organizations_GetParentOrganizationDetails.go b/service/cip/api_organizations_GetParentOrganizationDetails.go index 43f8f30..652f483 100644 --- a/service/cip/api_organizations_GetParentOrganizationDetails.go +++ b/service/cip/api_organizations_GetParentOrganizationDetails.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetParentOrganizationDetails Get the credits usage and allocation details of the current organization. + parentDeploymentId - Deployment on which the calling organization resides. */ func (a *APIClient) GetParentOrganizationDetails(parentDeploymentId string) (types.ParentUsage, *http.Response, error) { @@ -90,10 +92,12 @@ func (a *APIClient) GetParentOrganizationDetails(parentDeploymentId string) (typ newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_organizations_GetParentOrganizationInfo.go b/service/cip/api_organizations_GetParentOrganizationInfo.go index f8e8eb8..655f157 100644 --- a/service/cip/api_organizations_GetParentOrganizationInfo.go +++ b/service/cip/api_organizations_GetParentOrganizationInfo.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetParentOrganizationInfo Get information about parent organization. + parentDeploymentId - Deployment on which the calling organization resides. */ func (a *APIClient) GetParentOrganizationInfo(parentDeploymentId string) (types.ParentOrgInfo, *http.Response, error) { @@ -90,10 +92,12 @@ func (a *APIClient) GetParentOrganizationInfo(parentDeploymentId string) (types. newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_organizations_GetSubdomainLoginUrl.go b/service/cip/api_organizations_GetSubdomainLoginUrl.go index d15202d..1cec897 100644 --- a/service/cip/api_organizations_GetSubdomainLoginUrl.go +++ b/service/cip/api_organizations_GetSubdomainLoginUrl.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetSubdomainLoginUrl Get the login URL for the subdomain configured organization based on the organization identifier. + orgId - Identifier of the child organization for which the loginUrl is required. parentDeploymentId - Deployment on which the calling organization resides. */ @@ -93,10 +95,12 @@ func (a *APIClient) GetSubdomainLoginUrl(orgId string, parentDeploymentId string newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_organizations_ListOrganizations.go b/service/cip/api_organizations_ListOrganizations.go index 5ca9b1b..b071e66 100644 --- a/service/cip/api_organizations_ListOrganizations.go +++ b/service/cip/api_organizations_ListOrganizations.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ListOrganizations Get a list of all organizations in this account. The response is paginated with a default limit of 100 organizations per page. + parentDeploymentId - Deployment on which the calling organization resides. optional - nil or *types.ListOrganizationsOpts - Optional Parameters: Limit (optional.Int32) - Limit the number of organizations returned in the response. The number of organizations returned may be less than the `limit`. @@ -103,10 +105,12 @@ func (a *APIClient) ListOrganizations(parentDeploymentId string, localVarOptiona newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_organizations_UpdateOrganization.go b/service/cip/api_organizations_UpdateOrganization.go index 47bbc62..16d5e2f 100644 --- a/service/cip/api_organizations_UpdateOrganization.go +++ b/service/cip/api_organizations_UpdateOrganization.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateOrganization Update an existing organization's subscription based on its identifier. + body - The utilization baselines for the organization, which will determine their credits allocation. For organizations on Trial/Free plans, reallocating credits will upgrade their plan type to your plan. The plan change cannot be rolled back. parentDeploymentId - Deployment on which the calling organization resides. orgId - Identifier of the organization to update. @@ -96,10 +98,12 @@ func (a *APIClient) UpdateOrganization(body types.Baselines, parentDeploymentId newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_partition_CancelRetentionUpdate.go b/service/cip/api_partition_CancelRetentionUpdate.go index 5e821ff..91a542c 100644 --- a/service/cip/api_partition_CancelRetentionUpdate.go +++ b/service/cip/api_partition_CancelRetentionUpdate.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CancelRetentionUpdate Cancel update to retention of a partition for which retention was updated previously using reduceRetentionPeriodImmediately parameter as false + id - Identifier of the partition to cancel the retention update for. */ func (a *APIClient) CancelRetentionUpdate(id string) (*http.Response, error) { @@ -75,10 +77,12 @@ func (a *APIClient) CancelRetentionUpdate(id string) (*http.Response, error) { newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_partition_CreatePartition.go b/service/cip/api_partition_CreatePartition.go index 00cc78a..ce427b5 100644 --- a/service/cip/api_partition_CreatePartition.go +++ b/service/cip/api_partition_CreatePartition.go @@ -1,18 +1,20 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreatePartition Create a new partition. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Information about the new partition. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param body Information about the new partition. + @return Partition */ func (a *APIClient) CreatePartition(body types.CreatePartitionDefinition) (types.Partition, *http.Response, error) { @@ -93,10 +95,12 @@ func (a *APIClient) CreatePartition(body types.CreatePartitionDefinition) (types newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_partition_DecommissionPartition.go b/service/cip/api_partition_DecommissionPartition.go index c2c05e6..554a0ac 100644 --- a/service/cip/api_partition_DecommissionPartition.go +++ b/service/cip/api_partition_DecommissionPartition.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DecommissionPartition Decommission a partition with the given identifier from the organization. + id - Identifier of the partition to decommission. */ func (a *APIClient) DecommissionPartition(id string) (*http.Response, error) { @@ -75,10 +77,12 @@ func (a *APIClient) DecommissionPartition(id string) (*http.Response, error) { newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_partition_GetPartition.go b/service/cip/api_partition_GetPartition.go index df80291..d19b27b 100644 --- a/service/cip/api_partition_GetPartition.go +++ b/service/cip/api_partition_GetPartition.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetPartition Get a partition with the given identifier from the organization. + id - Identifier of partition to return. */ func (a *APIClient) GetPartition(id string) (types.Partition, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) GetPartition(id string) (types.Partition, *http.Response, er newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_partition_ListPartitions.go b/service/cip/api_partition_ListPartitions.go index 01e82fe..bc33942 100644 --- a/service/cip/api_partition_ListPartitions.go +++ b/service/cip/api_partition_ListPartitions.go @@ -1,23 +1,25 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ListPartitions Get a list of all partitions in the organization. The response is paginated with a default limit of 100 partitions per page. - optional - nil or *types.PartitionOpts - Optional Parameters: - Limit (optional.Int32) - Limit the number of partitions returned in the response. The number of partitions returned may be less than the limit. - Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. token is set to null when no more pages are left. - ViewTypes (optional.Interface of []string) - The type of partitions to retrieve. More than one type of partitions can be retrieved in same request. Valid values are: - DefaultView To get General Index partition. - Partition To get user defined views/partitions. - AuditIndex: To get the internal audit indexes. + + optional - nil or *types.PartitionOpts - Optional Parameters: + Limit (optional.Int32) - Limit the number of partitions returned in the response. The number of partitions returned may be less than the limit. + Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. token is set to null when no more pages are left. + ViewTypes (optional.Interface of []string) - The type of partitions to retrieve. More than one type of partitions can be retrieved in same request. Valid values are: + DefaultView To get General Index partition. + Partition To get user defined views/partitions. + AuditIndex: To get the internal audit indexes. */ func (a *APIClient) ListPartitions(localVarOptionals *types.PartitionOpts) (types.ListPartitionsResponse, *http.Response, error) { var ( @@ -104,10 +106,12 @@ func (a *APIClient) ListPartitions(localVarOptionals *types.PartitionOpts) (type newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_partition_UpdatePartition.go b/service/cip/api_partition_UpdatePartition.go index 886fb42..0a8195c 100644 --- a/service/cip/api_partition_UpdatePartition.go +++ b/service/cip/api_partition_UpdatePartition.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdatePartition Update an existing partition in the organization. + body - Information to update about the partition. id - Identifier of the partition to update. */ @@ -94,10 +96,12 @@ func (a *APIClient) UpdatePartition(body types.UpdatePartitionDefinition, id str newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_password_policy_GetPasswordPolicy.go b/service/cip/api_password_policy_GetPasswordPolicy.go index 002f3c8..bb18c05 100644 --- a/service/cip/api_password_policy_GetPasswordPolicy.go +++ b/service/cip/api_password_policy_GetPasswordPolicy.go @@ -1,11 +1,12 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -88,10 +89,12 @@ func (a *APIClient) GetPasswordPolicy() (types.PasswordPolicy, *http.Response, e newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_password_policy_SetPasswordPolicy.go b/service/cip/api_password_policy_SetPasswordPolicy.go index f823233..4703b9e 100644 --- a/service/cip/api_password_policy_SetPasswordPolicy.go +++ b/service/cip/api_password_policy_SetPasswordPolicy.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* SetPasswordPolicy Update the current password policy. + body - Specify the password policy. */ func (a *APIClient) SetPasswordPolicy(body types.PasswordPolicy) (types.PasswordPolicy, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) SetPasswordPolicy(body types.PasswordPolicy) (types.Password newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_policies_GetAuditPolicy.go b/service/cip/api_policies_GetAuditPolicy.go index 5876485..97e1b0f 100644 --- a/service/cip/api_policies_GetAuditPolicy.go +++ b/service/cip/api_policies_GetAuditPolicy.go @@ -1,11 +1,12 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -88,10 +89,12 @@ func (a *APIClient) GetAuditPolicy() (types.AuditPolicy, *http.Response, error) newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_policies_GetDataAccessLevelPolicy.go b/service/cip/api_policies_GetDataAccessLevelPolicy.go index 900c144..cd10fc7 100644 --- a/service/cip/api_policies_GetDataAccessLevelPolicy.go +++ b/service/cip/api_policies_GetDataAccessLevelPolicy.go @@ -1,11 +1,12 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -88,10 +89,12 @@ func (a *APIClient) GetDataAccessLevelPolicy() (types.DataAccessLevelPolicy, *ht newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_policies_GetMaxUserSessionTimeoutPolicy.go b/service/cip/api_policies_GetMaxUserSessionTimeoutPolicy.go index 5858a7b..d438358 100644 --- a/service/cip/api_policies_GetMaxUserSessionTimeoutPolicy.go +++ b/service/cip/api_policies_GetMaxUserSessionTimeoutPolicy.go @@ -1,11 +1,12 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -88,10 +89,12 @@ func (a *APIClient) GetMaxUserSessionTimeoutPolicy() (types.MaxUserSessionTimeou newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_policies_GetSearchAuditPolicy.go b/service/cip/api_policies_GetSearchAuditPolicy.go index 387cb8d..5d55cab 100644 --- a/service/cip/api_policies_GetSearchAuditPolicy.go +++ b/service/cip/api_policies_GetSearchAuditPolicy.go @@ -1,11 +1,12 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -88,10 +89,12 @@ func (a *APIClient) GetSearchAuditPolicy() (types.SearchAuditPolicy, *http.Respo newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_policies_GetShareDashboardsOutsideOrganizationPolicy.go b/service/cip/api_policies_GetShareDashboardsOutsideOrganizationPolicy.go index 4554144..980fd8a 100644 --- a/service/cip/api_policies_GetShareDashboardsOutsideOrganizationPolicy.go +++ b/service/cip/api_policies_GetShareDashboardsOutsideOrganizationPolicy.go @@ -1,11 +1,12 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -88,10 +89,12 @@ func (a *APIClient) GetShareDashboardsOutsideOrganizationPolicy() (types.ShareDa newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_policies_GetUserConcurrentSessionsLimitPolicy.go b/service/cip/api_policies_GetUserConcurrentSessionsLimitPolicy.go index e3de8c3..ab782d9 100644 --- a/service/cip/api_policies_GetUserConcurrentSessionsLimitPolicy.go +++ b/service/cip/api_policies_GetUserConcurrentSessionsLimitPolicy.go @@ -1,11 +1,12 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -88,10 +89,12 @@ func (a *APIClient) GetUserConcurrentSessionsLimitPolicy() (types.UserConcurrent newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_policies_SetAuditPolicy.go b/service/cip/api_policies_SetAuditPolicy.go index 9382234..d062528 100644 --- a/service/cip/api_policies_SetAuditPolicy.go +++ b/service/cip/api_policies_SetAuditPolicy.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* SetAuditPolicy Set the Audit policy. This policy specifies whether audit records for your account are enabled. You can access details about reported account events in the Sumo Logic Audit Index. [Learn More](https://help.sumologic.com/Manage/Security/Audit-Index) + body - Specifies if the policy is enabled or not */ func (a *APIClient) SetAuditPolicy(body types.AuditPolicy) (types.AuditPolicy, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) SetAuditPolicy(body types.AuditPolicy) (types.AuditPolicy, * newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_policies_SetDataAccessLevelPolicy.go b/service/cip/api_policies_SetDataAccessLevelPolicy.go index 0c99e11..d6e9169 100644 --- a/service/cip/api_policies_SetDataAccessLevelPolicy.go +++ b/service/cip/api_policies_SetDataAccessLevelPolicy.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* SetDataAccessLevelPolicy Set the Data Access Level policy. When enabled, this policy sets the default data access level for all newly created dashboards to the viewer’s role access filter. Otherwise, newly created dashboards will default to the sharer’s role access filter and might display data that viewers’ roles don’t allow them to view. [Learn More](https://help.sumologic.com/Manage/Security/Data_Access_Level_for_Shared_Dashboards) + body - Specifies if the policy is enabled or not */ func (a *APIClient) SetDataAccessLevelPolicy(body types.DataAccessLevelPolicy) (types.DataAccessLevelPolicy, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) SetDataAccessLevelPolicy(body types.DataAccessLevelPolicy) ( newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_policies_SetMaxUserSessionTimeoutPolicy.go b/service/cip/api_policies_SetMaxUserSessionTimeoutPolicy.go index d29e0cd..62521e8 100644 --- a/service/cip/api_policies_SetMaxUserSessionTimeoutPolicy.go +++ b/service/cip/api_policies_SetMaxUserSessionTimeoutPolicy.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* SetMaxUserSessionTimeoutPolicy Set the Max User Session Timeout policy. When enabled, this policy sets the maximum web session timeout users are able to configure within their user preferences. Users preferences will be updated to match this value only if their current preference is set to a higher value. [Learn More](https://help.sumologic.com/Manage/Security/Set_a_Maximum_Web_Session_Timeout) + body - Specifies if the policy is enabled or not */ func (a *APIClient) SetMaxUserSessionTimeoutPolicy(body types.MaxUserSessionTimeoutPolicy) (types.MaxUserSessionTimeoutPolicy, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) SetMaxUserSessionTimeoutPolicy(body types.MaxUserSessionTime newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_policies_SetSearchAuditPolicy.go b/service/cip/api_policies_SetSearchAuditPolicy.go index 6d751dd..bb21b3e 100644 --- a/service/cip/api_policies_SetSearchAuditPolicy.go +++ b/service/cip/api_policies_SetSearchAuditPolicy.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* SetSearchAuditPolicy Set the Search Audit policy. This policy specifies whether search records for your account are enabled. You can access details about your account's search capacity, queries run by users from the Sumo Search Audit Index. [Learn More](https://help.sumologic.com/Manage/Security/Search_Audit_Index) + body - Specifies if the policy is enabled or not */ func (a *APIClient) SetSearchAuditPolicy(body types.SearchAuditPolicy) (types.SearchAuditPolicy, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) SetSearchAuditPolicy(body types.SearchAuditPolicy) (types.Se newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_policies_SetShareDashboardsOutsideOrganizationPolicy.go b/service/cip/api_policies_SetShareDashboardsOutsideOrganizationPolicy.go index a3ebdff..21b7fc3 100644 --- a/service/cip/api_policies_SetShareDashboardsOutsideOrganizationPolicy.go +++ b/service/cip/api_policies_SetShareDashboardsOutsideOrganizationPolicy.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* SetShareDashboardsOutsideOrganizationPolicy Set the Share Dashboards Outside Organization policy. This policy allows users to share the dashboard with view only privileges outside of the organization (capability must be enabled from the Roles page). Disabling this policy will disable all dashboards that have been shared outside of the organization. [Learn More](https://help.sumologic.com/Visualizations-and-Alerts/Dashboards/Share_Dashboards/Share_a_Dashboard_Outside_Your_Org) + body - Specifies if the policy is enabled or not */ func (a *APIClient) SetShareDashboardsOutsideOrganizationPolicy(body types.ShareDashboardsOutsideOrganizationPolicy) (types.ShareDashboardsOutsideOrganizationPolicy, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) SetShareDashboardsOutsideOrganizationPolicy(body types.Share newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_policies_SetUserConcurrentSessionsLimitPolicy.go b/service/cip/api_policies_SetUserConcurrentSessionsLimitPolicy.go index e5a33b2..a27fd33 100644 --- a/service/cip/api_policies_SetUserConcurrentSessionsLimitPolicy.go +++ b/service/cip/api_policies_SetUserConcurrentSessionsLimitPolicy.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* SetUserConcurrentSessionsLimitPolicy Set the User Concurrent Sessions Limit policy. When enabled, the number of concurrent sessions a user may have is limited to the value entered. If a user exceeds the allowed number of sessions, the user's oldest session will be logged out to accommodate the new one. Disabling this policy means a user may have an unlimited number of concurrent sessions. [Learn More](https://help.sumologic.com/Manage/Security/Set_a_Limit_for_User_Concurrent_Sessions) + body - Specifies if the policy is enabled or not */ func (a *APIClient) SetUserConcurrentSessionsLimitPolicy(body types.UserConcurrentSessionsLimitPolicy) (types.UserConcurrentSessionsLimitPolicy, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) SetUserConcurrentSessionsLimitPolicy(body types.UserConcurre newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_role_AssignRoleToUser.go b/service/cip/api_role_AssignRoleToUser.go index 84536da..ab45b67 100644 --- a/service/cip/api_role_AssignRoleToUser.go +++ b/service/cip/api_role_AssignRoleToUser.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* AssignRoleToUser Assigns a role to a user in the organization. + roleId - Identifier of the role to assign. userId - Identifier of the user to assign the role to. */ @@ -93,10 +95,12 @@ func (a *APIClient) AssignRoleToUser(roleId string, userId string) (types.RoleMo newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_role_CreateRole.go b/service/cip/api_role_CreateRole.go index d1f394d..39ea5b7 100644 --- a/service/cip/api_role_CreateRole.go +++ b/service/cip/api_role_CreateRole.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateRole Create a new role in the organization. + body - Information about the new role. */ func (a *APIClient) CreateRole(body types.CreateRoleDefinition) (types.RoleModel, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) CreateRole(body types.CreateRoleDefinition) (types.RoleModel newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_role_DeleteRole.go b/service/cip/api_role_DeleteRole.go index abce718..b2eb05f 100644 --- a/service/cip/api_role_DeleteRole.go +++ b/service/cip/api_role_DeleteRole.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteRole Delete a role with the given identifier from the organization. + id - Identifier of the role to delete. */ func (a *APIClient) DeleteRole(id string) (*http.Response, error) { @@ -75,10 +77,12 @@ func (a *APIClient) DeleteRole(id string) (*http.Response, error) { newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_role_GetRole.go b/service/cip/api_role_GetRole.go index 395d972..2b4e08b 100644 --- a/service/cip/api_role_GetRole.go +++ b/service/cip/api_role_GetRole.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetRole Get a role with the given identifier in the organization. + id - Identifier of the role to fetch. */ func (a *APIClient) GetRole(id string) (types.RoleModel, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) GetRole(id string) (types.RoleModel, *http.Response, error) newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_role_ListRoles.go b/service/cip/api_role_ListRoles.go index b37a7af..b00a410 100644 --- a/service/cip/api_role_ListRoles.go +++ b/service/cip/api_role_ListRoles.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ListRoles Get a list of all the roles in the organization. The response is paginated with a default limit of 100 roles per page. + optional - nil or *types.ListRolesOpts - Optional Parameters: Limit (optional.Int32) - Limit the number of roles returned in the response. The number of roles returned may be less than the `limit`. Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. Token is set to null when no more pages are left. @@ -105,10 +107,12 @@ func (a *APIClient) ListRoles(localVarOptionals *types.ListRolesOpts) (types.Lis newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_role_RemoveRoleFromUser.go b/service/cip/api_role_RemoveRoleFromUser.go index 9b0b84c..9c3e8be 100644 --- a/service/cip/api_role_RemoveRoleFromUser.go +++ b/service/cip/api_role_RemoveRoleFromUser.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* RemoveRoleFromUser Remove a role from a user in the organization. + roleId - Identifier of the role to delete. userId - Identifier of the user to remove the role from. */ @@ -77,10 +79,12 @@ func (a *APIClient) RemoveRoleFromUser(roleId string, userId string) (*http.Resp newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_role_UpdateRole.go b/service/cip/api_role_UpdateRole.go index a4d66f1..037d612 100644 --- a/service/cip/api_role_UpdateRole.go +++ b/service/cip/api_role_UpdateRole.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateRole Update an existing role in the organization. + body - Information to update about the role. id - Identifier of the role to update. */ @@ -94,10 +96,12 @@ func (a *APIClient) UpdateRole(body types.UpdateRoleDefinition, id string) (type newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_saml_configuration_CreateAllowlistedUser.go b/service/cip/api_saml_configuration_CreateAllowlistedUser.go index eea3459..29b722f 100644 --- a/service/cip/api_saml_configuration_CreateAllowlistedUser.go +++ b/service/cip/api_saml_configuration_CreateAllowlistedUser.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateAllowlistedUser Allowlist a user from SAML lockdown allowing them to sign in using a password in addition to SAML. + userId - Identifier of the user. */ func (a *APIClient) CreateAllowlistedUser(userId string) (types.AllowlistedUserResult, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) CreateAllowlistedUser(userId string) (types.AllowlistedUserR newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_saml_configuration_CreateIdentityProvider.go b/service/cip/api_saml_configuration_CreateIdentityProvider.go index ebf4245..48a2a2c 100644 --- a/service/cip/api_saml_configuration_CreateIdentityProvider.go +++ b/service/cip/api_saml_configuration_CreateIdentityProvider.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateIdentityProvider Create a new SAML configuration in the organization. + body - The configuration of the SAML identity provider. */ func (a *APIClient) CreateIdentityProvider(body types.SamlIdentityProviderRequest) (types.SamlIdentityProvider, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) CreateIdentityProvider(body types.SamlIdentityProviderReques newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_saml_configuration_DeleteAllowlistedUser.go b/service/cip/api_saml_configuration_DeleteAllowlistedUser.go index f91d2e8..bd6e4d6 100644 --- a/service/cip/api_saml_configuration_DeleteAllowlistedUser.go +++ b/service/cip/api_saml_configuration_DeleteAllowlistedUser.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteAllowlistedUser Remove an allowlisted user requiring them to sign in using SAML. + userId - Identifier of user that will no longer be allowlisted from SAML Lockdown. */ func (a *APIClient) DeleteAllowlistedUser(userId string) (*http.Response, error) { @@ -75,10 +77,12 @@ func (a *APIClient) DeleteAllowlistedUser(userId string) (*http.Response, error) newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_saml_configuration_DeleteIdentityProvider.go b/service/cip/api_saml_configuration_DeleteIdentityProvider.go index 75b085a..7545e0f 100644 --- a/service/cip/api_saml_configuration_DeleteIdentityProvider.go +++ b/service/cip/api_saml_configuration_DeleteIdentityProvider.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteIdentityProvider Delete a SAML configuration with the given identifier from the organization. + id - Identifier of the SAML configuration to delete. */ func (a *APIClient) DeleteIdentityProvider(id string) (*http.Response, error) { @@ -75,10 +77,12 @@ func (a *APIClient) DeleteIdentityProvider(id string) (*http.Response, error) { newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_saml_configuration_DisableSamlLockdown.go b/service/cip/api_saml_configuration_DisableSamlLockdown.go index 2c9d497..acf7d3e 100644 --- a/service/cip/api_saml_configuration_DisableSamlLockdown.go +++ b/service/cip/api_saml_configuration_DisableSamlLockdown.go @@ -1,11 +1,12 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -72,10 +73,12 @@ func (a *APIClient) DisableSamlLockdown() (*http.Response, error) { newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_saml_configuration_EnableSamlLockdown.go b/service/cip/api_saml_configuration_EnableSamlLockdown.go index cf9624e..fb1e524 100644 --- a/service/cip/api_saml_configuration_EnableSamlLockdown.go +++ b/service/cip/api_saml_configuration_EnableSamlLockdown.go @@ -1,11 +1,12 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -72,10 +73,12 @@ func (a *APIClient) EnableSamlLockdown() (*http.Response, error) { newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_saml_configuration_GetAllowlistedUsers.go b/service/cip/api_saml_configuration_GetAllowlistedUsers.go index 5961a49..65ab54a 100644 --- a/service/cip/api_saml_configuration_GetAllowlistedUsers.go +++ b/service/cip/api_saml_configuration_GetAllowlistedUsers.go @@ -1,11 +1,12 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -88,10 +89,12 @@ func (a *APIClient) GetAllowlistedUsers() ([]types.AllowlistedUserResult, *http. newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_saml_configuration_GetIdentityProviders.go b/service/cip/api_saml_configuration_GetIdentityProviders.go index f97eec4..4967365 100644 --- a/service/cip/api_saml_configuration_GetIdentityProviders.go +++ b/service/cip/api_saml_configuration_GetIdentityProviders.go @@ -1,11 +1,12 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -88,10 +89,12 @@ func (a *APIClient) GetIdentityProviders() ([]types.SamlIdentityProvider, *http. newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_saml_configuration_UpdateIdentityProvider.go b/service/cip/api_saml_configuration_UpdateIdentityProvider.go index 5ce67f3..a99492f 100644 --- a/service/cip/api_saml_configuration_UpdateIdentityProvider.go +++ b/service/cip/api_saml_configuration_UpdateIdentityProvider.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateIdentityProvider Update an existing SAML configuration in the organization. + body - Information to update in the SAML configuration. id - Identifier of the SAML configuration to update. */ @@ -94,10 +96,12 @@ func (a *APIClient) UpdateIdentityProvider(body types.SamlIdentityProviderReques newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_scheduled_view_CreateScheduledView.go b/service/cip/api_scheduled_view_CreateScheduledView.go index 83fda1f..ac9cd1a 100644 --- a/service/cip/api_scheduled_view_CreateScheduledView.go +++ b/service/cip/api_scheduled_view_CreateScheduledView.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateScheduledView Creates a new scheduled view in the organization. + body - Information about the new scheduled view. */ func (a *APIClient) CreateScheduledView(body types.CreateScheduledViewDefinition) (types.ScheduledView, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) CreateScheduledView(body types.CreateScheduledViewDefinition newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_scheduled_view_DisableScheduledView.go b/service/cip/api_scheduled_view_DisableScheduledView.go index ac652e3..0faa2af 100644 --- a/service/cip/api_scheduled_view_DisableScheduledView.go +++ b/service/cip/api_scheduled_view_DisableScheduledView.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DisableScheduledView Disable a scheduled view with the given identifier. + id - Identifier of the scheduled view to disable. */ func (a *APIClient) DisableScheduledView(id string) (*http.Response, error) { @@ -75,10 +77,12 @@ func (a *APIClient) DisableScheduledView(id string) (*http.Response, error) { newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_scheduled_view_GetScheduledView.go b/service/cip/api_scheduled_view_GetScheduledView.go index 1764022..09386e2 100644 --- a/service/cip/api_scheduled_view_GetScheduledView.go +++ b/service/cip/api_scheduled_view_GetScheduledView.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetScheduledView Get a scheduled view with the given identifier. + id - Identifier of the scheduled view to fetch. */ func (a *APIClient) GetScheduledView(id string) (types.ScheduledView, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) GetScheduledView(id string) (types.ScheduledView, *http.Resp newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_scheduled_view_ListScheduledViews.go b/service/cip/api_scheduled_view_ListScheduledViews.go index 6e9a6c4..351e4bb 100644 --- a/service/cip/api_scheduled_view_ListScheduledViews.go +++ b/service/cip/api_scheduled_view_ListScheduledViews.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ListScheduledViews Get a list of all scheduled views in the organization. The response is paginated with a default limit of 100 scheduled views per page. + optional - nil or *types.ScheduledViewsOpts - Optional Parameters: Limit (optional.Int32) - Limit the number of scheduled views returned in the response. The number of scheduled views returned may be less than the limit. Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. token is set to null when no more pages are left. @@ -97,10 +99,12 @@ func (a *APIClient) ListScheduledViews(localVarOptionals *types.ScheduledViewsOp newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_scheduled_view_PauseScheduledView.go b/service/cip/api_scheduled_view_PauseScheduledView.go index f71ccd1..aced6c0 100644 --- a/service/cip/api_scheduled_view_PauseScheduledView.go +++ b/service/cip/api_scheduled_view_PauseScheduledView.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* PauseScheduledView Pause a scheduled view with the given identifier. + id - Identifier of the scheduled view to pause. */ func (a *APIClient) PauseScheduledView(id string) (types.ScheduledView, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) PauseScheduledView(id string) (types.ScheduledView, *http.Re newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_scheduled_view_StartScheduledView.go b/service/cip/api_scheduled_view_StartScheduledView.go index 518724c..54d5e7b 100644 --- a/service/cip/api_scheduled_view_StartScheduledView.go +++ b/service/cip/api_scheduled_view_StartScheduledView.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* StartScheduledView Start a scheduled view with the given identifier. + id - Identifier of the scheduled view to start. */ func (a *APIClient) StartScheduledView(id string) (types.ScheduledView, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) StartScheduledView(id string) (types.ScheduledView, *http.Re newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_scheduled_view_UpdateScheduledView.go b/service/cip/api_scheduled_view_UpdateScheduledView.go index 0e6bb6b..6e6a1a9 100644 --- a/service/cip/api_scheduled_view_UpdateScheduledView.go +++ b/service/cip/api_scheduled_view_UpdateScheduledView.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateScheduledView Update an existing scheduled view. + body - Information to update about the scheduled view. id - Identifier of the scheduled view to update. */ @@ -94,10 +96,12 @@ func (a *APIClient) UpdateScheduledView(body types.UpdateScheduledViewDefinition newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_service_allowlist_AddAllowlistedCidrs.go b/service/cip/api_service_allowlist_AddAllowlistedCidrs.go index 2b22d47..49c111d 100644 --- a/service/cip/api_service_allowlist_AddAllowlistedCidrs.go +++ b/service/cip/api_service_allowlist_AddAllowlistedCidrs.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* AddAllowlistedCidrs Add CIDR notations and/or IP addresses to the allowlist of the organization if not already there. When service allowlisting functionality is enabled, CIDRs/IP addresses that are allowlisted will have access to Sumo Logic and/or content sharing. + body - List of all CIDR notations and/or IP addresses to be added to the allowlist of the organization. */ func (a *APIClient) AddAllowlistedCidrs(body types.CidrList) (types.CidrList, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) AddAllowlistedCidrs(body types.CidrList) (types.CidrList, *h newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_service_allowlist_DeleteAllowlistedCidrs.go b/service/cip/api_service_allowlist_DeleteAllowlistedCidrs.go index 58e938e..f8af6ff 100644 --- a/service/cip/api_service_allowlist_DeleteAllowlistedCidrs.go +++ b/service/cip/api_service_allowlist_DeleteAllowlistedCidrs.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteAllowlistedCidrs Remove allowlisted CIDR notations and/or IP addresses from the organization. Removed CIDRs/IPs will immediately lose access to Sumo Logic and content sharing. + body - List of all CIDR notations and/or IP addresses to be removed from the allowlist of the organization. */ func (a *APIClient) DeleteAllowlistedCidrs(body types.CidrList) (types.CidrList, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) DeleteAllowlistedCidrs(body types.CidrList) (types.CidrList, newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_service_allowlist_DisableAllowlisting.go b/service/cip/api_service_allowlist_DisableAllowlisting.go index 698f139..34ad250 100644 --- a/service/cip/api_service_allowlist_DisableAllowlisting.go +++ b/service/cip/api_service_allowlist_DisableAllowlisting.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DisableAllowlisting Disable service allowlisting functionality for login/API authentication or content sharing for the organization. + allowlistType - The type of allowlisting to be disabled. It can be one of: Login, Content, or Both. */ func (a *APIClient) DisableAllowlisting(allowlistType string) (*http.Response, error) { @@ -74,10 +76,12 @@ func (a *APIClient) DisableAllowlisting(allowlistType string) (*http.Response, e newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_service_allowlist_EnableAllowlisting.go b/service/cip/api_service_allowlist_EnableAllowlisting.go index 4d7d06b..3f1a995 100644 --- a/service/cip/api_service_allowlist_EnableAllowlisting.go +++ b/service/cip/api_service_allowlist_EnableAllowlisting.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* EnableAllowlisting Enable service allowlisting functionality for the organization. The service allowlisting can be for 1. Login: If enabled, access to Sumo Logic is granted only to CIDRs/IP addresses that are allowlisted. 2. Content: If enabled, dashboards can be shared with users connecting from CIDRs/IP addresses that are allowlisted without logging in. + allowlistType - The type of allowlisting to be enabled. It can be one of: Login, Content, or Both. */ func (a *APIClient) EnableAllowlisting(allowlistType string) (*http.Response, error) { @@ -74,10 +76,12 @@ func (a *APIClient) EnableAllowlisting(allowlistType string) (*http.Response, er newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_service_allowlist_GetAllowlistingStatus.go b/service/cip/api_service_allowlist_GetAllowlistingStatus.go index 2e9a1fa..8b1d310 100644 --- a/service/cip/api_service_allowlist_GetAllowlistingStatus.go +++ b/service/cip/api_service_allowlist_GetAllowlistingStatus.go @@ -1,11 +1,12 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -88,10 +89,12 @@ func (a *APIClient) GetAllowlistingStatus() (types.AllowlistingStatus, *http.Res newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_service_allowlist_ListAllowlistedCidrs.go b/service/cip/api_service_allowlist_ListAllowlistedCidrs.go index 7f30856..077fb2e 100644 --- a/service/cip/api_service_allowlist_ListAllowlistedCidrs.go +++ b/service/cip/api_service_allowlist_ListAllowlistedCidrs.go @@ -1,11 +1,12 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -88,10 +89,12 @@ func (a *APIClient) ListAllowlistedCidrs() (types.CidrList, *http.Response, erro newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_sources_CreateAWSS3ArchiveSource.go b/service/cip/api_sources_CreateAWSS3ArchiveSource.go index 78f90fc..38016bc 100644 --- a/service/cip/api_sources_CreateAWSS3ArchiveSource.go +++ b/service/cip/api_sources_CreateAWSS3ArchiveSource.go @@ -12,6 +12,7 @@ import ( /* CreateAWSS3ArchiveSource Create an AWS S3 Archive source. + body - The definition of the AWS S3 Archive source. collectorId - The identifier of the Sumo Logic collector to assign the source to. */ diff --git a/service/cip/api_sources_CreateEventHubSource.go b/service/cip/api_sources_CreateEventHubSource.go index e1208f0..a44c29c 100644 --- a/service/cip/api_sources_CreateEventHubSource.go +++ b/service/cip/api_sources_CreateEventHubSource.go @@ -12,6 +12,7 @@ import ( /* CreateEventHubSource Create an Azure Event Hub source. + body - The definition of the Event Hub source. collectorId - The identifier of the Sumo Logic collector to assign the source to. */ diff --git a/service/cip/api_sources_DeleteSource.go b/service/cip/api_sources_DeleteSource.go index c3d1e1a..8601838 100644 --- a/service/cip/api_sources_DeleteSource.go +++ b/service/cip/api_sources_DeleteSource.go @@ -12,6 +12,7 @@ import ( /* DeleteSource Deletes the specified source from the specified collector. + collectorId - Identifier of the collector that the source is attached to. sourceId - Identifier of the source. */ diff --git a/service/cip/api_sources_GetAWSS3ArchiveSource.go b/service/cip/api_sources_GetAWSS3ArchiveSource.go index b04af9c..e4c32a6 100644 --- a/service/cip/api_sources_GetAWSS3ArchiveSource.go +++ b/service/cip/api_sources_GetAWSS3ArchiveSource.go @@ -12,6 +12,7 @@ import ( /* GetAWSS3ArchiveSource Get information about an AWS S3 Archive source. + collectorId - The identifier of the Sumo Logic collector that the source is assigned to. sourceId - The identifier of the Sumo Logic AWS S3 Archive source. */ diff --git a/service/cip/api_sources_GetEventHubSource.go b/service/cip/api_sources_GetEventHubSource.go index 51b829c..237615d 100644 --- a/service/cip/api_sources_GetEventHubSource.go +++ b/service/cip/api_sources_GetEventHubSource.go @@ -12,6 +12,7 @@ import ( /* GetEventHubSource Get information about an Azure Event Hub source. + collectorId - The identifier of the Sumo Logic collector that the source is assigned to. sourceId - The identifier of the Sumo Logic Azure Event Hub source. */ diff --git a/service/cip/api_sources_UpdateEventHubSource.go b/service/cip/api_sources_UpdateEventHubSource.go index 9738231..daa23f6 100644 --- a/service/cip/api_sources_UpdateEventHubSource.go +++ b/service/cip/api_sources_UpdateEventHubSource.go @@ -12,6 +12,7 @@ import ( /* UpdateEventHubSource Update an Azure Event Hub source. + body - The definition of the Event Hub source. collectorId - The identifier of the Sumo Logic collector that the source is assigned to. sourceId - The identifier of the Sumo Logic source. diff --git a/service/cip/api_tokens_CreateToken.go b/service/cip/api_tokens_CreateToken.go index 7aa9b4f..4af40e4 100644 --- a/service/cip/api_tokens_CreateToken.go +++ b/service/cip/api_tokens_CreateToken.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateToken Create a token in the token library. + body - Information about the token to create. */ func (a *APIClient) CreateToken(body types.TokenBaseDefinition) (types.TokenBaseResponse, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) CreateToken(body types.TokenBaseDefinition) (types.TokenBase newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_tokens_DeleteToken.go b/service/cip/api_tokens_DeleteToken.go index 116c8e9..0d568d7 100644 --- a/service/cip/api_tokens_DeleteToken.go +++ b/service/cip/api_tokens_DeleteToken.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteToken Delete a token with the given identifier in the token library. + id - Identifier of the token to delete. */ func (a *APIClient) DeleteToken(id string) (*http.Response, error) { @@ -75,10 +77,12 @@ func (a *APIClient) DeleteToken(id string) (*http.Response, error) { newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_tokens_GetToken.go b/service/cip/api_tokens_GetToken.go index af608b6..2ad21e5 100644 --- a/service/cip/api_tokens_GetToken.go +++ b/service/cip/api_tokens_GetToken.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetToken Get a token with the given identifier in the token library. + id - Identifier of the token to return. */ func (a *APIClient) GetToken(id string) (types.TokenBaseResponse, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) GetToken(id string) (types.TokenBaseResponse, *http.Response newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_tokens_ListTokens.go b/service/cip/api_tokens_ListTokens.go index 3fba537..4c9e0a9 100644 --- a/service/cip/api_tokens_ListTokens.go +++ b/service/cip/api_tokens_ListTokens.go @@ -1,11 +1,12 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -88,10 +89,12 @@ func (a *APIClient) ListTokens() (types.ListTokensBaseResponse, *http.Response, newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_tokens_UpdateToken.go b/service/cip/api_tokens_UpdateToken.go index 290db60..131350f 100644 --- a/service/cip/api_tokens_UpdateToken.go +++ b/service/cip/api_tokens_UpdateToken.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateToken Update a token with the given identifier in the token library. + body - The token to update. id - Identifier of the token to update. */ @@ -94,10 +96,12 @@ func (a *APIClient) UpdateToken(body types.TokenBaseDefinitionUpdate, id string) newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_transformation_rule_CreateTransformationRule.go b/service/cip/api_transformation_rule_CreateTransformationRule.go index ee02272..1bd3895 100644 --- a/service/cip/api_transformation_rule_CreateTransformationRule.go +++ b/service/cip/api_transformation_rule_CreateTransformationRule.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateTransformationRule Create a new transformation rule. + body - The configuration of the transformation rule to create. */ func (a *APIClient) CreateTransformationRule(body types.TransformationRuleRequest) (types.TransformationRuleResponse, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) CreateTransformationRule(body types.TransformationRuleReques newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_transformation_rule_DeleteTransformationRule.go b/service/cip/api_transformation_rule_DeleteTransformationRule.go index 1eadbe5..f498503 100644 --- a/service/cip/api_transformation_rule_DeleteTransformationRule.go +++ b/service/cip/api_transformation_rule_DeleteTransformationRule.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteTransformationRule Delete a transformation rule with the given identifier. + id - Identifier of the transformation rule to delete. */ func (a *APIClient) DeleteTransformationRule(id string) (*http.Response, error) { @@ -75,10 +77,12 @@ func (a *APIClient) DeleteTransformationRule(id string) (*http.Response, error) newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_transformation_rule_GetTransformationRule.go b/service/cip/api_transformation_rule_GetTransformationRule.go index 3197f86..b0b1fb2 100644 --- a/service/cip/api_transformation_rule_GetTransformationRule.go +++ b/service/cip/api_transformation_rule_GetTransformationRule.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetTransformationRule Get a transformation rule with the given identifier. + id - Identifier of transformation rule to return. */ func (a *APIClient) GetTransformationRule(id string) (types.TransformationRuleResponse, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) GetTransformationRule(id string) (types.TransformationRuleRe newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_transformation_rule_ListTransformationRules.go b/service/cip/api_transformation_rule_ListTransformationRules.go index d0cfd9f..d9f6bc8 100644 --- a/service/cip/api_transformation_rule_ListTransformationRules.go +++ b/service/cip/api_transformation_rule_ListTransformationRules.go @@ -1,19 +1,21 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ListTransformationRules Get a list of transformation rules in the organization. The response is paginated with a default limit of 100 rules per page. - optional - nil or *types.TransformationRulesOpts - Optional Parameters: - Limit (optional.Int32) - Limit the number of transformation rules returned in the response. - Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. token is set to null when no more pages are left. + + optional - nil or *types.TransformationRulesOpts - Optional Parameters: + Limit (optional.Int32) - Limit the number of transformation rules returned in the response. + Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. token is set to null when no more pages are left. */ func (a *APIClient) ListTransformationRules(localVarOptionals *types.TransformationRulesOpts) (types.TransformationRulesResponse, *http.Response, error) { var ( @@ -97,10 +99,12 @@ func (a *APIClient) ListTransformationRules(localVarOptionals *types.Transformat newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_transformation_rule_UpdateTransformationRule.go b/service/cip/api_transformation_rule_UpdateTransformationRule.go index c6accb4..8938469 100644 --- a/service/cip/api_transformation_rule_UpdateTransformationRule.go +++ b/service/cip/api_transformation_rule_UpdateTransformationRule.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateTransformationRule Update an existing transformation rule. All properties specified in the request are replaced. + body - Information to update about the transformation rule. id - Identifier of the transformation rule to update. */ @@ -94,10 +96,12 @@ func (a *APIClient) UpdateTransformationRule(body types.TransformationRuleReques newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_user_CreateUser.go b/service/cip/api_user_CreateUser.go index f2da3c9..00b3d38 100644 --- a/service/cip/api_user_CreateUser.go +++ b/service/cip/api_user_CreateUser.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateUser Create a new user in the organization. + body - Information about the new user. */ func (a *APIClient) CreateUser(body types.CreateUserDefinition) (types.UserModel, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) CreateUser(body types.CreateUserDefinition) (types.UserModel newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_user_DeleteUser.go b/service/cip/api_user_DeleteUser.go index aec349f..05d395c 100644 --- a/service/cip/api_user_DeleteUser.go +++ b/service/cip/api_user_DeleteUser.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteUser Delete a user with the given identifier from the organization and transfer their content to the user with the identifier specified in transferTo. If transferTo is not specified the contents are deleted. + id - Identifier of the user to delete. optional - nil or *types.DeleteUserOpts - Optional Parameters: TransferTo (optional.String) - Identifier of the user to receive the transfer of content from the deleted user. @@ -80,10 +82,12 @@ func (a *APIClient) DeleteUser(id string, localVarOptionals *types.DeleteUserOpt newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_user_DisableMfa.go b/service/cip/api_user_DisableMfa.go index 9bfc131..2fcfec3 100644 --- a/service/cip/api_user_DisableMfa.go +++ b/service/cip/api_user_DisableMfa.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DisableMfa Disable multi-factor authentication for given user. + body - Email and Password of the user to disable MFA for. id - Identifier of the user to disable MFA for. */ @@ -78,10 +80,12 @@ func (a *APIClient) DisableMfa(body types.DisableMfaRequest, id string) (*http.R newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_user_GetUser.go b/service/cip/api_user_GetUser.go index 5367bf2..635fb0f 100644 --- a/service/cip/api_user_GetUser.go +++ b/service/cip/api_user_GetUser.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetUser Get a user with the given identifier from the organization. + id - Identifier of user to return. */ func (a *APIClient) GetUser(id string) (types.UserModel, *http.Response, error) { @@ -91,10 +93,12 @@ func (a *APIClient) GetUser(id string) (types.UserModel, *http.Response, error) newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_user_ListUsers.go b/service/cip/api_user_ListUsers.go index d6852db..d988d3f 100644 --- a/service/cip/api_user_ListUsers.go +++ b/service/cip/api_user_ListUsers.go @@ -1,16 +1,18 @@ package cip import ( - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ListUsers Get a list of all users in the organization. The response is paginated with a default limit of 100 users per page. + optional - nil or *types.ListUsersOpts - Optional Parameters: Limit (optional.Int32) - Limit the number of users returned in the response. The number of users returned may be less than the limit. Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. token is set to null when no more pages are left. @@ -105,10 +107,12 @@ func (a *APIClient) ListUsers(localVarOptionals *types.ListUsersOpts) (types.Lis newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_user_RequestChangeEmail.go b/service/cip/api_user_RequestChangeEmail.go index a4f4ed8..e5b4228 100644 --- a/service/cip/api_user_RequestChangeEmail.go +++ b/service/cip/api_user_RequestChangeEmail.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* RequestChangeEmail An email with an activation link is sent to the user’s new email address. The user must click the link in the email within seven days to complete the email address change, or the link will expire. + body - New email address of the user. id - Identifier of the user to change email address. */ @@ -78,10 +80,12 @@ func (a *APIClient) RequestChangeEmail(body types.ChangeEmailRequest, id string) newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_user_ResetPassword.go b/service/cip/api_user_ResetPassword.go index 9cc6a7b..e8b4304 100644 --- a/service/cip/api_user_ResetPassword.go +++ b/service/cip/api_user_ResetPassword.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ResetPassword Reset a user's password. + id - Identifier of the user to reset password. */ func (a *APIClient) ResetPassword(id string) (*http.Response, error) { @@ -75,10 +77,12 @@ func (a *APIClient) ResetPassword(id string) (*http.Response, error) { newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_user_UnlockUser.go b/service/cip/api_user_UnlockUser.go index 3786019..9298931 100644 --- a/service/cip/api_user_UnlockUser.go +++ b/service/cip/api_user_UnlockUser.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UnlockUser Unlock another user's account. + id - The id of the user that needs to be unlocked. */ func (a *APIClient) UnlockUser(id string) (*http.Response, error) { @@ -75,10 +77,12 @@ func (a *APIClient) UnlockUser(id string) (*http.Response, error) { newErr.error = err.Error() return localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarHttpResponse, newErr } diff --git a/service/cip/api_user_UpdateUser.go b/service/cip/api_user_UpdateUser.go index 879b815..436cabd 100644 --- a/service/cip/api_user_UpdateUser.go +++ b/service/cip/api_user_UpdateUser.go @@ -2,16 +2,18 @@ package cip import ( "fmt" - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateUser Update an existing user in the organization. + body - Information to update about the user. id - Identifier of the user to update. */ @@ -94,12 +96,13 @@ func (a *APIClient) UpdateUser(body types.UpdateUserDefinition, id string) (type newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } - return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, newErr } From b9a50a89bc752e5f6775584fdd9bdb1345b03ad7 Mon Sep 17 00:00:00 2001 From: Chris Lee Date: Mon, 23 Dec 2024 10:50:26 -0800 Subject: [PATCH 2/4] undo: go fmt --- service/cip/api_access_key_CreateAccessKey.go | 7 +++---- service/cip/api_access_key_DeleteAccessKey.go | 4 +--- service/cip/api_access_key_ListAccessKeys.go | 4 +--- .../api_access_key_ListPersonalAccessKeys.go | 3 +-- service/cip/api_access_key_UpdateAccessKey.go | 4 +--- service/cip/api_account_CreateSubdomain.go | 4 +--- service/cip/api_account_DeleteSubdomain.go | 3 +-- service/cip/api_account_GetAccountOwner.go | 3 +-- service/cip/api_account_GetStatus.go | 3 +-- service/cip/api_account_GetSubdomain.go | 3 +-- service/cip/api_account_RecoverSubdomain.go | 4 +--- service/cip/api_account_UpdateSubdomain.go | 4 +--- service/cip/api_app_GetApp.go | 4 +--- service/cip/api_app_GetAsyncInstallStatus.go | 4 +--- service/cip/api_app_InstallApp.go | 4 +--- service/cip/api_app_ListApps.go | 3 +-- service/cip/api_archive_CreateArchiveJob.go | 4 +--- service/cip/api_archive_DeleteArchiveJob.go | 4 +--- .../api_archive_ListArchiveJobsBySourceId.go | 4 +--- ...pi_archive_ListArchiveJobsCountPerSource.go | 3 +-- service/cip/api_collectors_CreateCollector.go | 1 - .../cip/api_collectors_DeleteCollectorById.go | 1 - .../api_collectors_DeleteOfflineCollectors.go | 5 ++--- service/cip/api_collectors_GetCollectorById.go | 1 - .../cip/api_collectors_GetCollectorByName.go | 1 - .../api_collectors_GetUpgradableCollectors.go | 1 - ...llectors_GetUpgradeOrDowngradeTaskStatus.go | 1 - service/cip/api_collectors_ListCollectors.go | 1 - .../api_collectors_ListOfflineCollectors.go | 1 - .../api_collectors_UpdateHostedCollector.go | 1 - .../api_collectors_UpdateInstalledCollector.go | 1 - ...pi_connection_CreateServiceNowConnection.go | 4 +--- .../api_connection_CreateWebhookConnection.go | 4 +--- service/cip/api_connection_DeleteConnection.go | 4 +--- service/cip/api_connection_GetConnection.go | 4 +--- service/cip/api_connection_ListConnections.go | 4 +--- .../api_connection_TestServiceNowConnection.go | 4 +--- .../api_connection_TestWebhookConnection.go | 4 +--- ...pi_connection_UpdateServiceNowConnection.go | 4 +--- .../api_connection_UpdateWebhookConnection.go | 4 +--- service/cip/api_content_AsyncCopyStatus.go | 4 +--- service/cip/api_content_BeginAsyncCopy.go | 4 +--- service/cip/api_content_BeginAsyncDelete.go | 4 +--- service/cip/api_content_BeginAsyncExport.go | 4 +--- .../api_content_BeginDashboardAsyncImport.go | 4 +--- .../cip/api_content_BeginFolderAsyncImport.go | 4 +--- .../api_content_BeginLookTableAsyncImport.go | 4 +--- ...ntent_BeginMetricsSavedSearchAsyncImport.go | 4 +--- ...pi_content_BeginMetricsSearchAsyncImport.go | 4 +--- .../api_content_BeginMewboardAsyncImport.go | 4 +--- .../api_content_BeginSavedSearchAsyncImport.go | 4 +--- .../cip/api_content_GetAsyncDeleteStatus.go | 4 +--- .../cip/api_content_GetAsyncExportResult.go | 4 +--- .../cip/api_content_GetAsyncExportStatus.go | 4 +--- .../cip/api_content_GetAsyncImportStatus.go | 4 +--- ...pi_content_GetDashboardAsyncExportResult.go | 4 +--- .../api_content_GetFolderAsyncExportResult.go | 4 +--- service/cip/api_content_GetItemByPath.go | 4 +--- ..._content_GetLookupTableAsyncExportResult.go | 4 +--- ...t_GetMetricsSavedSearchAsyncExportResult.go | 4 +--- ...ontent_GetMetricsSearchAsyncExportResult.go | 4 +--- ...api_content_GetMewboardAsyncExportResult.go | 4 +--- service/cip/api_content_GetPathById.go | 4 +--- ..._content_GetSavedSearchAsyncExportResult.go | 4 +--- service/cip/api_content_MoveItem.go | 4 +--- ...ontent_permissions_AddContentPermissions.go | 4 +--- ...ontent_permissions_GetContentPermissions.go | 4 +--- ...ent_permissions_RemoveContentPermissions.go | 4 +--- service/cip/api_dashboard_CreateDashboard.go | 4 +--- service/cip/api_dashboard_DeleteDashboard.go | 4 +--- service/cip/api_dashboard_GetDashboard.go | 4 +--- service/cip/api_dashboard_UpdateDashboard.go | 4 +--- ...dynamic_parsing_CreateDynamicParsingRule.go | 4 +--- ...dynamic_parsing_DeleteDynamicParsingRule.go | 4 +--- ...pi_dynamic_parsing_GetDynamicParsingRule.go | 4 +--- ..._dynamic_parsing_ListDynamicParsingRules.go | 4 +--- ...dynamic_parsing_UpdateDynamicParsingRule.go | 4 +--- ...api_extraction_rule_CreateExtractionRule.go | 4 +--- ...api_extraction_rule_DeleteExtractionRule.go | 4 +--- .../api_extraction_rule_GetExtractionRule.go | 4 +--- .../api_extraction_rule_ListExtractionRule.go | 10 ++++------ ...api_extraction_rule_UpdateExtractionRule.go | 8 +++----- .../cip/api_field_management_CreateField.go | 4 +--- .../cip/api_field_management_DeleteField.go | 4 +--- .../cip/api_field_management_DisableField.go | 4 +--- .../cip/api_field_management_EnableField.go | 4 +--- .../api_field_management_GetBuiltInField.go | 4 +--- .../cip/api_field_management_GetCustomField.go | 4 +--- .../cip/api_field_management_GetFieldQuota.go | 3 +-- .../api_field_management_ListBuiltInFields.go | 3 +-- .../api_field_management_ListCustomFields.go | 3 +-- .../api_field_management_ListDroppedFields.go | 3 +-- service/cip/api_folder_CreateFolder.go | 4 +--- ...pi_folder_GetAdminRecommendedFolderAsync.go | 4 +--- ...i_folder_GetAdminRecommendedFolderResult.go | 4 +--- ...i_folder_GetAdminRecommendedFolderStatus.go | 4 +--- service/cip/api_folder_GetFolder.go | 4 +--- service/cip/api_folder_GetGlobalFolderAsync.go | 4 +--- .../api_folder_GetGlobalFolderAsyncResult.go | 4 +--- .../api_folder_GetGlobalFolderAsyncStatus.go | 4 +--- service/cip/api_folder_GetPersonalFolder.go | 3 +-- service/cip/api_folder_UpdateFolder.go | 4 +--- service/cip/api_general_SendMessage.go | 1 - .../api_health_events_ListAllHealthEvents.go | 10 ++++------ ...h_events_ListAllHealthEventsForResources.go | 12 +++++------- ...ingest_budget_v1_AssignCollectorToBudget.go | 4 +--- .../api_ingest_budget_v1_CreateIngestBudget.go | 4 +--- .../api_ingest_budget_v1_DeleteIngestBudget.go | 4 +--- ...i_ingest_budget_v1_GetAssignedCollectors.go | 12 +++++------- .../api_ingest_budget_v1_GetIngestBudget.go | 4 +--- .../api_ingest_budget_v1_ListIngestBudgets.go | 10 ++++------ ...gest_budget_v1_RemoveCollectorFromBudget.go | 4 +--- service/cip/api_ingest_budget_v1_ResetUsage.go | 4 +--- .../api_ingest_budget_v1_UpdateIngestBudget.go | 4 +--- .../api_ingest_budget_v2_CreateIngestBudget.go | 4 +--- .../api_ingest_budget_v2_DeleteIngestBudget.go | 4 +--- .../api_ingest_budget_v2_GetIngestBudget.go | 4 +--- .../api_ingest_budget_v2_ListIngestBudgets.go | 10 ++++------ service/cip/api_ingest_budget_v2_ResetUsage.go | 4 +--- .../api_ingest_budget_v2_UpdateIngestBudget.go | 4 +--- ...timated_usage_GetLogSearchEstimatedUsage.go | 4 +--- ...d_usage_GetLogSearchEstimatedUsageByTier.go | 4 +--- service/cip/api_lookup_CreateTable.go | 4 +--- service/cip/api_lookup_DeleteTable.go | 4 +--- service/cip/api_lookup_DeleteTableRow.go | 4 +--- service/cip/api_lookup_LookupTableById.go | 4 +--- service/cip/api_lookup_RequestJobStatus.go | 4 +--- service/cip/api_lookup_TruncateTable.go | 4 +--- service/cip/api_lookup_UpdateTable.go | 4 +--- service/cip/api_lookup_UpdateTableRow.go | 4 +--- service/cip/api_lookup_UploadFile.go | 4 +--- .../cip/api_metrics_query_RunMetricsQueries.go | 4 +--- ...api_metrics_searches_CreateMetricsSearch.go | 4 +--- ...api_metrics_searches_DeleteMetricsSearch.go | 4 +--- .../api_metrics_searches_GetMetricsSearch.go | 4 +--- ...api_metrics_searches_UpdateMetricsSearch.go | 4 +--- service/cip/api_monitors_CopyMonitors.go | 4 +--- service/cip/api_monitors_CreateMonitors.go | 3 +-- service/cip/api_monitors_DeleteMonitorsById.go | 4 +--- .../cip/api_monitors_DeleteMonitorsByIds.go | 4 +--- service/cip/api_monitors_ExportMonitorsItem.go | 4 +--- .../cip/api_monitors_GetMonitorUsageInfo.go | 3 +-- service/cip/api_monitors_GetMonitorsById.go | 4 +--- service/cip/api_monitors_GetMonitorsByIds.go | 4 +--- service/cip/api_monitors_GetMonitorsByPath.go | 5 ++--- .../cip/api_monitors_GetMonitorsFullPath.go | 4 +--- .../cip/api_monitors_GetMonitorsLibraryRoot.go | 3 +-- service/cip/api_monitors_ImportMonitorsItem.go | 4 +--- service/cip/api_monitors_MoveMonitors.go | 4 +--- service/cip/api_monitors_SearchMonitors.go | 4 +--- service/cip/api_monitors_UpdateMonitorsById.go | 4 +--- .../cip/api_monitors_ValidateMonitorQueries.go | 4 +--- .../api_organizations_CreateOrganization.go | 4 +--- ...rganizations_CreateOrganizationAccessKey.go | 4 +--- .../api_organizations_DeleteOrganization.go | 4 +--- .../cip/api_organizations_GetDeployments.go | 4 +--- .../cip/api_organizations_GetOrganization.go | 4 +--- .../api_organizations_GetOrganizationUsage.go | 7 +++---- .../api_organizations_GetOrganizationUsages.go | 5 +---- ...ganizations_GetParentOrganizationDetails.go | 4 +--- ..._organizations_GetParentOrganizationInfo.go | 4 +--- .../api_organizations_GetSubdomainLoginUrl.go | 4 +--- .../cip/api_organizations_ListOrganizations.go | 4 +--- .../api_organizations_UpdateOrganization.go | 4 +--- .../cip/api_partition_CancelRetentionUpdate.go | 4 +--- service/cip/api_partition_CreatePartition.go | 8 +++----- .../cip/api_partition_DecommissionPartition.go | 4 +--- service/cip/api_partition_GetPartition.go | 4 +--- service/cip/api_partition_ListPartitions.go | 18 ++++++++---------- service/cip/api_partition_UpdatePartition.go | 4 +--- .../api_password_policy_GetPasswordPolicy.go | 3 +-- .../api_password_policy_SetPasswordPolicy.go | 4 +--- service/cip/api_policies_GetAuditPolicy.go | 3 +-- .../api_policies_GetDataAccessLevelPolicy.go | 3 +-- ..._policies_GetMaxUserSessionTimeoutPolicy.go | 3 +-- .../cip/api_policies_GetSearchAuditPolicy.go | 3 +-- ...ShareDashboardsOutsideOrganizationPolicy.go | 3 +-- ...ies_GetUserConcurrentSessionsLimitPolicy.go | 3 +-- service/cip/api_policies_SetAuditPolicy.go | 4 +--- .../api_policies_SetDataAccessLevelPolicy.go | 4 +--- ..._policies_SetMaxUserSessionTimeoutPolicy.go | 4 +--- .../cip/api_policies_SetSearchAuditPolicy.go | 4 +--- ...ShareDashboardsOutsideOrganizationPolicy.go | 4 +--- ...ies_SetUserConcurrentSessionsLimitPolicy.go | 4 +--- service/cip/api_role_AssignRoleToUser.go | 4 +--- service/cip/api_role_CreateRole.go | 4 +--- service/cip/api_role_DeleteRole.go | 4 +--- service/cip/api_role_GetRole.go | 4 +--- service/cip/api_role_ListRoles.go | 4 +--- service/cip/api_role_RemoveRoleFromUser.go | 4 +--- service/cip/api_role_UpdateRole.go | 4 +--- ...saml_configuration_CreateAllowlistedUser.go | 4 +--- ...aml_configuration_CreateIdentityProvider.go | 4 +--- ...saml_configuration_DeleteAllowlistedUser.go | 4 +--- ...aml_configuration_DeleteIdentityProvider.go | 4 +--- ...i_saml_configuration_DisableSamlLockdown.go | 3 +-- ...pi_saml_configuration_EnableSamlLockdown.go | 3 +-- ...i_saml_configuration_GetAllowlistedUsers.go | 3 +-- ..._saml_configuration_GetIdentityProviders.go | 3 +-- ...aml_configuration_UpdateIdentityProvider.go | 4 +--- .../api_scheduled_view_CreateScheduledView.go | 4 +--- .../api_scheduled_view_DisableScheduledView.go | 4 +--- .../cip/api_scheduled_view_GetScheduledView.go | 4 +--- .../api_scheduled_view_ListScheduledViews.go | 4 +--- .../api_scheduled_view_PauseScheduledView.go | 4 +--- .../api_scheduled_view_StartScheduledView.go | 4 +--- .../api_scheduled_view_UpdateScheduledView.go | 4 +--- ...pi_service_allowlist_AddAllowlistedCidrs.go | 4 +--- ...service_allowlist_DeleteAllowlistedCidrs.go | 4 +--- ...pi_service_allowlist_DisableAllowlisting.go | 4 +--- ...api_service_allowlist_EnableAllowlisting.go | 4 +--- ..._service_allowlist_GetAllowlistingStatus.go | 3 +-- ...i_service_allowlist_ListAllowlistedCidrs.go | 3 +-- .../api_sources_CreateAWSS3ArchiveSource.go | 1 - .../cip/api_sources_CreateEventHubSource.go | 1 - service/cip/api_sources_DeleteSource.go | 1 - .../cip/api_sources_GetAWSS3ArchiveSource.go | 1 - service/cip/api_sources_GetEventHubSource.go | 1 - .../cip/api_sources_UpdateEventHubSource.go | 1 - service/cip/api_tokens_CreateToken.go | 4 +--- service/cip/api_tokens_DeleteToken.go | 4 +--- service/cip/api_tokens_GetToken.go | 4 +--- service/cip/api_tokens_ListTokens.go | 3 +-- service/cip/api_tokens_UpdateToken.go | 4 +--- ...sformation_rule_CreateTransformationRule.go | 4 +--- ...sformation_rule_DeleteTransformationRule.go | 4 +--- ...ransformation_rule_GetTransformationRule.go | 4 +--- ...nsformation_rule_ListTransformationRules.go | 10 ++++------ ...sformation_rule_UpdateTransformationRule.go | 4 +--- service/cip/api_user_CreateUser.go | 4 +--- service/cip/api_user_DeleteUser.go | 4 +--- service/cip/api_user_DisableMfa.go | 4 +--- service/cip/api_user_GetUser.go | 4 +--- service/cip/api_user_ListUsers.go | 4 +--- service/cip/api_user_RequestChangeEmail.go | 4 +--- service/cip/api_user_ResetPassword.go | 4 +--- service/cip/api_user_UnlockUser.go | 4 +--- service/cip/api_user_UpdateUser.go | 4 +--- 238 files changed, 261 insertions(+), 688 deletions(-) diff --git a/service/cip/api_access_key_CreateAccessKey.go b/service/cip/api_access_key_CreateAccessKey.go index 421e0ec..d4614a4 100644 --- a/service/cip/api_access_key_CreateAccessKey.go +++ b/service/cip/api_access_key_CreateAccessKey.go @@ -1,12 +1,11 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -14,8 +13,8 @@ CreateAccessKey Creates a new access ID and key pair. The new access key can be used from the domains specified in corsHeaders field. Whether Sumo Logic accepts or rejects an API request depends on whether it contains an ORIGIN header and the entries in the allowlist. Sumo Logic will reject: - 1. Requests with an ORIGIN header but the allowlist is empty. - 2. Requests with an ORIGIN header that don't match any entry in the allowlist. + 1. Requests with an ORIGIN header but the allowlist is empty. + 2. Requests with an ORIGIN header that don't match any entry in the allowlist. */ func (a *APIClient) CreateAccessKey(body types.AccessKeyCreateRequest) (types.AccessKey, *http.Response, error) { var ( diff --git a/service/cip/api_access_key_DeleteAccessKey.go b/service/cip/api_access_key_DeleteAccessKey.go index ac8b720..6620477 100644 --- a/service/cip/api_access_key_DeleteAccessKey.go +++ b/service/cip/api_access_key_DeleteAccessKey.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteAccessKey Deletes the access key with the given accessId. - id - The accessId of the access key to delete. */ func (a *APIClient) DeleteAccessKey(id string) (*http.Response, error) { diff --git a/service/cip/api_access_key_ListAccessKeys.go b/service/cip/api_access_key_ListAccessKeys.go index 799352b..f954e5e 100644 --- a/service/cip/api_access_key_ListAccessKeys.go +++ b/service/cip/api_access_key_ListAccessKeys.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ListAccessKeys List all access keys in your account. - optional - nil or *types.AccessKeyOpts - Optional Parameters: Limit (optional.Int32) - Limit the number of access keys returned in the response. The number of access keys returned may be less than the limit. Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. token is set to null when no more pages are left. diff --git a/service/cip/api_access_key_ListPersonalAccessKeys.go b/service/cip/api_access_key_ListPersonalAccessKeys.go index 2a03182..a59fcfe 100644 --- a/service/cip/api_access_key_ListPersonalAccessKeys.go +++ b/service/cip/api_access_key_ListPersonalAccessKeys.go @@ -1,12 +1,11 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* diff --git a/service/cip/api_access_key_UpdateAccessKey.go b/service/cip/api_access_key_UpdateAccessKey.go index 3a65a03..59f531a 100644 --- a/service/cip/api_access_key_UpdateAccessKey.go +++ b/service/cip/api_access_key_UpdateAccessKey.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateAccessKey Updates the properties of existing accessKey by accessId. It can be used to enable or disable the access key and to update the corsHeaders list. - body - Information to update about the access key id - The accessId of the access key to update. */ diff --git a/service/cip/api_account_CreateSubdomain.go b/service/cip/api_account_CreateSubdomain.go index caedcce..45b5c6a 100644 --- a/service/cip/api_account_CreateSubdomain.go +++ b/service/cip/api_account_CreateSubdomain.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateSubdomain Create a subdomain. Only the Account Owner can create a subdomain. - body - The new subdomain. */ func (a *APIClient) CreateSubdomain(body types.ConfigureSubdomainRequest) (types.SubdomainDefinitionResponse, *http.Response, error) { diff --git a/service/cip/api_account_DeleteSubdomain.go b/service/cip/api_account_DeleteSubdomain.go index af2a4a7..c3f4664 100644 --- a/service/cip/api_account_DeleteSubdomain.go +++ b/service/cip/api_account_DeleteSubdomain.go @@ -1,12 +1,11 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* diff --git a/service/cip/api_account_GetAccountOwner.go b/service/cip/api_account_GetAccountOwner.go index ed91330..2640aed 100644 --- a/service/cip/api_account_GetAccountOwner.go +++ b/service/cip/api_account_GetAccountOwner.go @@ -1,12 +1,11 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* diff --git a/service/cip/api_account_GetStatus.go b/service/cip/api_account_GetStatus.go index d5d7f22..28c70a2 100644 --- a/service/cip/api_account_GetStatus.go +++ b/service/cip/api_account_GetStatus.go @@ -1,12 +1,11 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* diff --git a/service/cip/api_account_GetSubdomain.go b/service/cip/api_account_GetSubdomain.go index eadfdd3..5e890b4 100644 --- a/service/cip/api_account_GetSubdomain.go +++ b/service/cip/api_account_GetSubdomain.go @@ -1,12 +1,11 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* diff --git a/service/cip/api_account_RecoverSubdomain.go b/service/cip/api_account_RecoverSubdomain.go index 4215078..09eeef3 100644 --- a/service/cip/api_account_RecoverSubdomain.go +++ b/service/cip/api_account_RecoverSubdomain.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* RecoverSubdomains Send an email with the subdomain information for a user with the given email address. - email - Email address of the user to get subdomain information. */ func (a *APIClient) RecoverSubdomains(email string) (*http.Response, error) { diff --git a/service/cip/api_account_UpdateSubdomain.go b/service/cip/api_account_UpdateSubdomain.go index a61d2aa..e9c6283 100644 --- a/service/cip/api_account_UpdateSubdomain.go +++ b/service/cip/api_account_UpdateSubdomain.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateSubdomain Update a subdomain. Only the Account Owner can update the subdomain. - body - The new subdomain. */ func (a *APIClient) UpdateSubdomain(body types.ConfigureSubdomainRequest) (types.SubdomainDefinitionResponse, *http.Response, error) { diff --git a/service/cip/api_app_GetApp.go b/service/cip/api_app_GetApp.go index 4fcad61..c8f9319 100644 --- a/service/cip/api_app_GetApp.go +++ b/service/cip/api_app_GetApp.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetApp Gets the app with the given universally unique identifier (UUID). - uuid - The identifier of the app to retrieve. */ func (a *APIClient) GetApp(uuid string) (types.App, *http.Response, error) { diff --git a/service/cip/api_app_GetAsyncInstallStatus.go b/service/cip/api_app_GetAsyncInstallStatus.go index c25b9a7..c4f4162 100644 --- a/service/cip/api_app_GetAsyncInstallStatus.go +++ b/service/cip/api_app_GetAsyncInstallStatus.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetAsyncInstallStatus Get the status of an asynchronous app install request for the given job identifier. - jobId - The identifier of the asynchronous install job. */ func (a *APIClient) GetAsyncInstallStatus(jobId string) (types.AsyncJobStatus, *http.Response, error) { diff --git a/service/cip/api_app_InstallApp.go b/service/cip/api_app_InstallApp.go index 2744e32..a5400ff 100644 --- a/service/cip/api_app_InstallApp.go +++ b/service/cip/api_app_InstallApp.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* InstallApp Installs the app with given UUID in the folder specified using destinationFolderId. - body - Information for the new app uuid - UUID of the app to install. */ diff --git a/service/cip/api_app_ListApps.go b/service/cip/api_app_ListApps.go index 322f729..e95fb97 100644 --- a/service/cip/api_app_ListApps.go +++ b/service/cip/api_app_ListApps.go @@ -1,12 +1,11 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* diff --git a/service/cip/api_archive_CreateArchiveJob.go b/service/cip/api_archive_CreateArchiveJob.go index f5da750..72d5ebf 100644 --- a/service/cip/api_archive_CreateArchiveJob.go +++ b/service/cip/api_archive_CreateArchiveJob.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateArchiveJob Create an ingestion job to pull data from your S3 bucket. - body - The definition of the ingestion job to create. sourceId - The identifier of the Archive Source for which the job is to be added. */ diff --git a/service/cip/api_archive_DeleteArchiveJob.go b/service/cip/api_archive_DeleteArchiveJob.go index df537d1..cca2963 100644 --- a/service/cip/api_archive_DeleteArchiveJob.go +++ b/service/cip/api_archive_DeleteArchiveJob.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteArchiveJob Delete an ingestion job with the given identifier from the organization. The delete operation is only possible for jobs with a Succeeded or Failed status. - sourceId - The identifier of the Archive Source. id - The identifier of the ingestion job to delete. */ diff --git a/service/cip/api_archive_ListArchiveJobsBySourceId.go b/service/cip/api_archive_ListArchiveJobsBySourceId.go index b160673..d9cf1f1 100644 --- a/service/cip/api_archive_ListArchiveJobsBySourceId.go +++ b/service/cip/api_archive_ListArchiveJobsBySourceId.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ListArchiveJobsBySourceId Get a list of all the ingestion jobs created on an Archive Source. The response is paginated with a default limit of 10 jobs per page. - sourceId - The identifier of an Archive Source. optional - nil or *types.ArchiveOpts - Optional Parameters: Limit (optional.Int32) - Limit the number of jobs returned in the response. The number of jobs returned may be less than the limit. diff --git a/service/cip/api_archive_ListArchiveJobsCountPerSource.go b/service/cip/api_archive_ListArchiveJobsCountPerSource.go index 6eb1da8..533a5af 100644 --- a/service/cip/api_archive_ListArchiveJobsCountPerSource.go +++ b/service/cip/api_archive_ListArchiveJobsCountPerSource.go @@ -1,12 +1,11 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* diff --git a/service/cip/api_collectors_CreateCollector.go b/service/cip/api_collectors_CreateCollector.go index a16705a..fe30abe 100644 --- a/service/cip/api_collectors_CreateCollector.go +++ b/service/cip/api_collectors_CreateCollector.go @@ -11,7 +11,6 @@ import ( /* CreateCollector Create a new hosted collector in the organization. - body - Information about the new collector */ func (a *APIClient) CreateCollector(body types.CreateCollectorRequest) (types.CollectorModel, *http.Response, error) { diff --git a/service/cip/api_collectors_DeleteCollectorById.go b/service/cip/api_collectors_DeleteCollectorById.go index 0014a3f..cb2abda 100644 --- a/service/cip/api_collectors_DeleteCollectorById.go +++ b/service/cip/api_collectors_DeleteCollectorById.go @@ -12,7 +12,6 @@ import ( /* DeleteCollectorById Delete a collector with the given identifier from the organization. - id - Identifier of the collector to delete. */ func (a *APIClient) DeleteCollectorById(id string) (*http.Response, error) { diff --git a/service/cip/api_collectors_DeleteOfflineCollectors.go b/service/cip/api_collectors_DeleteOfflineCollectors.go index 9816267..064f23b 100644 --- a/service/cip/api_collectors_DeleteOfflineCollectors.go +++ b/service/cip/api_collectors_DeleteOfflineCollectors.go @@ -11,9 +11,8 @@ import ( /* DeleteOfflineCollectors Deletes offline collectors from the organization. - - optional - nil or *types.DeleteOfflineCollectorsOpts - Optional Parameters: - AliveBeforeDays (optional.Int32) - Minimum number of days the Collectors have been offline. + optional - nil or *types.DeleteOfflineCollectorsOpts - Optional Parameters: + AliveBeforeDays (optional.Int32) - Minimum number of days the Collectors have been offline. */ func (a *APIClient) DeleteOfflineCollectors(localVarOptionals *types.DeleteOfflineCollectorsOpts) (*http.Response, error) { var ( diff --git a/service/cip/api_collectors_GetCollectorById.go b/service/cip/api_collectors_GetCollectorById.go index 5776a47..cf9a34d 100644 --- a/service/cip/api_collectors_GetCollectorById.go +++ b/service/cip/api_collectors_GetCollectorById.go @@ -12,7 +12,6 @@ import ( /* GetCollectorById Gets information about a collector by its identifier. - id - The identifier of the collector */ func (a *APIClient) GetCollectorById(id string) (types.CollectorModel, *http.Response, error) { diff --git a/service/cip/api_collectors_GetCollectorByName.go b/service/cip/api_collectors_GetCollectorByName.go index d10bc19..a550f79 100644 --- a/service/cip/api_collectors_GetCollectorByName.go +++ b/service/cip/api_collectors_GetCollectorByName.go @@ -12,7 +12,6 @@ import ( /* GetCollectorByName Gets information about a collector by its name. - name - The name of the collector */ func (a *APIClient) GetCollectorByName(name string) (types.CollectorModel, *http.Response, error) { diff --git a/service/cip/api_collectors_GetUpgradableCollectors.go b/service/cip/api_collectors_GetUpgradableCollectors.go index 5075034..f7335a0 100644 --- a/service/cip/api_collectors_GetUpgradableCollectors.go +++ b/service/cip/api_collectors_GetUpgradableCollectors.go @@ -11,7 +11,6 @@ import ( /* GetUpgradableCollectors Gets a list of installed collectors that can be upgraded. - optional - nil or *types.GetUpgradableCollectorsOpts - Optional Parameters: Limit (optional.Int32) - Limit the number of collectors returned in the response. The number of collectors returned may be less than the limit. Offset (optional.Int32) - Offset into the list of Collectors. diff --git a/service/cip/api_collectors_GetUpgradeOrDowngradeTaskStatus.go b/service/cip/api_collectors_GetUpgradeOrDowngradeTaskStatus.go index 03c38f9..a8bb46c 100644 --- a/service/cip/api_collectors_GetUpgradeOrDowngradeTaskStatus.go +++ b/service/cip/api_collectors_GetUpgradeOrDowngradeTaskStatus.go @@ -12,7 +12,6 @@ import ( /* GetUpgradeOrDowngradeTaskStatus Gets the status of a collector upgrade or downgrade task. - id - Job id of the task. */ func (a *APIClient) GetUpgradeOrDowngradeTaskStatus(id string) (types.UpgradeOrDowngradeTaskStatusModel, *http.Response, error) { diff --git a/service/cip/api_collectors_ListCollectors.go b/service/cip/api_collectors_ListCollectors.go index d01ab17..d847d44 100644 --- a/service/cip/api_collectors_ListCollectors.go +++ b/service/cip/api_collectors_ListCollectors.go @@ -11,7 +11,6 @@ import ( /* ListCollectors Get a list of collectors in the organization. The response has a default limit of 1000 collectors. - optional - nil or *types.ListCollectorsOpts - Optional Parameters: Filter (optional.String) - Filter the Collectors returned using one of the available filter types: installed, hosted, dead or alive. Limit (optional.Int32) - Limit the number of collectors return in the response. The number of collectors returned may be less than the limit. diff --git a/service/cip/api_collectors_ListOfflineCollectors.go b/service/cip/api_collectors_ListOfflineCollectors.go index 5cba38b..4439f04 100644 --- a/service/cip/api_collectors_ListOfflineCollectors.go +++ b/service/cip/api_collectors_ListOfflineCollectors.go @@ -11,7 +11,6 @@ import ( /* ListOfflineCollectors Get a list of offline collectors in the organization. The response has a default limit of 1000 collectors. - optional - nil or *types.ListCollectorsOpts - Optional Parameters: AliveBeforeDays (optional.Int32) - Minimum number of days the Collectors have been offline. Limit (optional.Int32) - Limit the number of collectors returned in the response. The number of collectors returned may be less than the limit. diff --git a/service/cip/api_collectors_UpdateHostedCollector.go b/service/cip/api_collectors_UpdateHostedCollector.go index 1da3868..19df269 100644 --- a/service/cip/api_collectors_UpdateHostedCollector.go +++ b/service/cip/api_collectors_UpdateHostedCollector.go @@ -13,7 +13,6 @@ import ( /* UpdateHostedCollector Updates a hosted collector in the organization. - body - Information to update about the collector. id - Identifier of the hosted collector to update. */ diff --git a/service/cip/api_collectors_UpdateInstalledCollector.go b/service/cip/api_collectors_UpdateInstalledCollector.go index cb23599..ff97193 100644 --- a/service/cip/api_collectors_UpdateInstalledCollector.go +++ b/service/cip/api_collectors_UpdateInstalledCollector.go @@ -13,7 +13,6 @@ import ( /* UpdateInstalledCollector Update an installed collector in the organization. - body - Information to update about the collector. id - Identifier of the installed collector to update. */ diff --git a/service/cip/api_connection_CreateServiceNowConnection.go b/service/cip/api_connection_CreateServiceNowConnection.go index 0546d6b..976d0ff 100644 --- a/service/cip/api_connection_CreateServiceNowConnection.go +++ b/service/cip/api_connection_CreateServiceNowConnection.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateServiceNowConnection Create a new ServiceNow connection in the organization. - body - Information about the new ServiceNow connection. */ func (a *APIClient) CreateServiceNowConnection(body types.ServiceNowDefinition) (types.ServiceNowConnection, *http.Response, error) { diff --git a/service/cip/api_connection_CreateWebhookConnection.go b/service/cip/api_connection_CreateWebhookConnection.go index 1baf0da..ba4881f 100644 --- a/service/cip/api_connection_CreateWebhookConnection.go +++ b/service/cip/api_connection_CreateWebhookConnection.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateWebhookConnection Create a new webhook connection in the organization. - body - Information about the new webhook connection. */ func (a *APIClient) CreateWebhookConnection(body types.WebhookDefinition) (types.WebhookConnection, *http.Response, error) { diff --git a/service/cip/api_connection_DeleteConnection.go b/service/cip/api_connection_DeleteConnection.go index 02f1a93..dc4e2e5 100644 --- a/service/cip/api_connection_DeleteConnection.go +++ b/service/cip/api_connection_DeleteConnection.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteConnection Delete a connection with the given identifier. - id - Identifier of the connection to delete. type_ - Type of connection to delete. Valid values are WebhookConnection, ServiceNowConnection. */ diff --git a/service/cip/api_connection_GetConnection.go b/service/cip/api_connection_GetConnection.go index 98e9afe..bef2bd3 100644 --- a/service/cip/api_connection_GetConnection.go +++ b/service/cip/api_connection_GetConnection.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetConnection Get a connection with the given identifier. - id - Identifier of connection to return. type_ - Type of connection to return. Valid values are WebhookConnection, ServiceNowConnections. */ diff --git a/service/cip/api_connection_ListConnections.go b/service/cip/api_connection_ListConnections.go index ecfc865..2444af0 100644 --- a/service/cip/api_connection_ListConnections.go +++ b/service/cip/api_connection_ListConnections.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ListConnections Get a list of all connections in the organization. The response is paginated with a default limit of 100 connections per page. - optional - nil or *types.ConnectionOpts - Optional Parameters: Limit (optional.Int32) - Limit the number of connections returned in the response. The number of connections returned may be less than the limit. Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. token is set to null when no more pages are left. diff --git a/service/cip/api_connection_TestServiceNowConnection.go b/service/cip/api_connection_TestServiceNowConnection.go index d1c075c..808d095 100644 --- a/service/cip/api_connection_TestServiceNowConnection.go +++ b/service/cip/api_connection_TestServiceNowConnection.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* TestServiceNowConnection Test a new webhook connection url is valid and can connect. - body - Information about the new webhook connection. */ func (a *APIClient) TestServiceNowConnection(body types.ServiceNowDefinition) (types.TestConnectionResponse, *http.Response, error) { diff --git a/service/cip/api_connection_TestWebhookConnection.go b/service/cip/api_connection_TestWebhookConnection.go index 9983c9f..4268d25 100644 --- a/service/cip/api_connection_TestWebhookConnection.go +++ b/service/cip/api_connection_TestWebhookConnection.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* TestWebhookConnection Test a new webhook connection url is valid and can connect. - body - Information about the new webhook connection. */ func (a *APIClient) TestWebhookConnection(body types.WebhookDefinition) (types.TestConnectionResponse, *http.Response, error) { diff --git a/service/cip/api_connection_UpdateServiceNowConnection.go b/service/cip/api_connection_UpdateServiceNowConnection.go index 72327f4..a2c1625 100644 --- a/service/cip/api_connection_UpdateServiceNowConnection.go +++ b/service/cip/api_connection_UpdateServiceNowConnection.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateServiceNowConnection Update an existing ServiceNow connection. - body - Information to update about the ServiceNow connection. id - Identifier of the connection to update */ diff --git a/service/cip/api_connection_UpdateWebhookConnection.go b/service/cip/api_connection_UpdateWebhookConnection.go index bca5d9b..73eae2d 100644 --- a/service/cip/api_connection_UpdateWebhookConnection.go +++ b/service/cip/api_connection_UpdateWebhookConnection.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateWebhookConnection Update an existing webhook connection. - body - Information to update about the webhook connection. id - Identifier of the connection to update */ diff --git a/service/cip/api_content_AsyncCopyStatus.go b/service/cip/api_content_AsyncCopyStatus.go index be4caa4..5dc39b4 100644 --- a/service/cip/api_content_AsyncCopyStatus.go +++ b/service/cip/api_content_AsyncCopyStatus.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* AsyncCopyStatus Gets the status of a copy request with the given jobId. - id - The identifier of the content that was copied. jobId - The identifier of the asynchronous copy request job. optional - nil or *types.ContentOpts - Optional Parameters: diff --git a/service/cip/api_content_BeginAsyncCopy.go b/service/cip/api_content_BeginAsyncCopy.go index bfc5f21..a1aaedf 100644 --- a/service/cip/api_content_BeginAsyncCopy.go +++ b/service/cip/api_content_BeginAsyncCopy.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* BeginAsyncCopy Start an asynchronous content copy job with the given identifier to the destination folder. If the content item is a folder, everything under the folder is copied recursively. - id - The identifier of the content item to copy. Identifiers from the Library in the Sumo user interface are provided in decimal format which is incompatible with this API. The identifier needs to be in hexadecimal format. destinationFolder - The identifier of the destination folder. optional - nil or *types.ContentOpts - Optional Parameters: diff --git a/service/cip/api_content_BeginAsyncDelete.go b/service/cip/api_content_BeginAsyncDelete.go index b90a8a4..743fe0f 100644 --- a/service/cip/api_content_BeginAsyncDelete.go +++ b/service/cip/api_content_BeginAsyncDelete.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* BeginAsyncDelete Start an asynchronous content deletion job with the given identifier. - id - Identifier of the content to delete. Identifiers from the Library in the Sumo user interface are provided in decimal format which is incompatible with this API. The identifier needs to be in hexadecimal format. optional - nil or *types.ContentOpts - Optional Parameters: IsAdminMode (optional.String) - Set this to true if you want to perform the request as a Content Administrator. diff --git a/service/cip/api_content_BeginAsyncExport.go b/service/cip/api_content_BeginAsyncExport.go index 38c9a53..3476414 100644 --- a/service/cip/api_content_BeginAsyncExport.go +++ b/service/cip/api_content_BeginAsyncExport.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* BeginAsyncExport Schedule an asynchronous export of content with the given identifier. You will get back an asynchronous job identifier on success. Use the GetAsyncExportStatus function and the job identifier you got back in the response to track the status of an asynchronous export job. If the content item is a folder, everything under the folder is exported recursively. Keep in mind when exporting large folders that there is a limit of 1000 content objects that can be exported at once. If you want to import more than 1000 content objects, then be sure to split the import into batches of 1000 objects or less. The results from the export are compatible with the Library import feature in the Sumo Logic user interface as well as the API content import job. - id - The identifier of the content item to export. Identifiers from the Library in the Sumo user interface are provided in decimal format which is incompatible with this API. The identifier needs to be in hexadecimal format. optional - nil or *types.ContentOpts - Optional Parameters: IsAdminMode (optional.String) - Set this to true if you want to perform the request as a Content Administrator. diff --git a/service/cip/api_content_BeginDashboardAsyncImport.go b/service/cip/api_content_BeginDashboardAsyncImport.go index d23d218..5d70d85 100644 --- a/service/cip/api_content_BeginDashboardAsyncImport.go +++ b/service/cip/api_content_BeginDashboardAsyncImport.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* BeginDashboardAsyncImport Schedule an asynchronous import of dashboard content inside an existing folder with the given identifier. Import requests can be used to create or update content within a folder. Content items need to have a unique name within their folder. If there is already a content item with the same name in the folder, you can set the `overwrite` parameter to `true` to overwrite existing content items. By default, the overwrite parameter is set to false, where the import will fail if a content item with the same name already exist. Keep in mind when importing large folders that there is a limit of 1000 content objects that can be imported at once. If you want to import more than 1000 content objects, then be sure to split the import into batches of 1000 objects or less. - body - The content to import. folderId - The identifier of the folder to import into. Identifiers from the Library in the Sumo user interface are provided in decimal format which is incompatible with this API. The identifier needs to be in hexadecimal format. optional - nil or *types.ContentImportOpts - Optional Parameters: diff --git a/service/cip/api_content_BeginFolderAsyncImport.go b/service/cip/api_content_BeginFolderAsyncImport.go index 951c603..b607df5 100644 --- a/service/cip/api_content_BeginFolderAsyncImport.go +++ b/service/cip/api_content_BeginFolderAsyncImport.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* BeginFolderAsyncImport Schedule an asynchronous import of folder content inside an existing folder with the given identifier. Import requests can be used to create or update content within a folder. Content items need to have a unique name within their folder. If there is already a content item with the same name in the folder, you can set the `overwrite` parameter to `true` to overwrite existing content items. By default, the overwrite parameter is set to false, where the import will fail if a content item with the same name already exist. Keep in mind when importing large folders that there is a limit of 1000 content objects that can be imported at once. If you want to import more than 1000 content objects, then be sure to split the import into batches of 1000 objects or less. - body - The content to import. folderId - The identifier of the folder to import into. Identifiers from the Library in the Sumo user interface are provided in decimal format which is incompatible with this API. The identifier needs to be in hexadecimal format. optional - nil or *types.ContentImportOpts - Optional Parameters: diff --git a/service/cip/api_content_BeginLookTableAsyncImport.go b/service/cip/api_content_BeginLookTableAsyncImport.go index 8729fc2..24a98a6 100644 --- a/service/cip/api_content_BeginLookTableAsyncImport.go +++ b/service/cip/api_content_BeginLookTableAsyncImport.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* BeginLookupTableAsyncImport Schedule an asynchronous import of lookup table content inside an existing folder with the given identifier. Import requests can be used to create or update content within a folder. Content items need to have a unique name within their folder. If there is already a content item with the same name in the folder, you can set the `overwrite` parameter to `true` to overwrite existing content items. By default, the overwrite parameter is set to false, where the import will fail if a content item with the same name already exist. Keep in mind when importing large folders that there is a limit of 1000 content objects that can be imported at once. If you want to import more than 1000 content objects, then be sure to split the import into batches of 1000 objects or less. - body - The content to import. folderId - The identifier of the folder to import into. Identifiers from the Library in the Sumo user interface are provided in decimal format which is incompatible with this API. The identifier needs to be in hexadecimal format. optional - nil or *types.ContentImportOpts - Optional Parameters: diff --git a/service/cip/api_content_BeginMetricsSavedSearchAsyncImport.go b/service/cip/api_content_BeginMetricsSavedSearchAsyncImport.go index 53afa02..c64c1b1 100644 --- a/service/cip/api_content_BeginMetricsSavedSearchAsyncImport.go +++ b/service/cip/api_content_BeginMetricsSavedSearchAsyncImport.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* BeginMetricsSavedSearchAsyncImport Schedule an asynchronous import of metric saved searches content inside an existing folder with the given identifier. Import requests can be used to create or update content within a folder. Content items need to have a unique name within their folder. If there is already a content item with the same name in the folder, you can set the `overwrite` parameter to `true` to overwrite existing content items. By default, the overwrite parameter is set to false, where the import will fail if a content item with the same name already exist. Keep in mind when importing large folders that there is a limit of 1000 content objects that can be imported at once. If you want to import more than 1000 content objects, then be sure to split the import into batches of 1000 objects or less. - body - The content to import. folderId - The identifier of the folder to import into. Identifiers from the Library in the Sumo user interface are provided in decimal format which is incompatible with this API. The identifier needs to be in hexadecimal format. optional - nil or *types.ContentImportOpts - Optional Parameters: diff --git a/service/cip/api_content_BeginMetricsSearchAsyncImport.go b/service/cip/api_content_BeginMetricsSearchAsyncImport.go index 083c2f3..cb3c466 100644 --- a/service/cip/api_content_BeginMetricsSearchAsyncImport.go +++ b/service/cip/api_content_BeginMetricsSearchAsyncImport.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* BeginMetricsSearchAsyncImport Schedule an asynchronous import of metric searches content inside an existing folder with the given identifier. Import requests can be used to create or update content within a folder. Content items need to have a unique name within their folder. If there is already a content item with the same name in the folder, you can set the `overwrite` parameter to `true` to overwrite existing content items. By default, the overwrite parameter is set to false, where the import will fail if a content item with the same name already exist. Keep in mind when importing large folders that there is a limit of 1000 content objects that can be imported at once. If you want to import more than 1000 content objects, then be sure to split the import into batches of 1000 objects or less. - body - The content to import. folderId - The identifier of the folder to import into. Identifiers from the Library in the Sumo user interface are provided in decimal format which is incompatible with this API. The identifier needs to be in hexadecimal format. optional - nil or *types.ContentImportOpts - Optional Parameters: diff --git a/service/cip/api_content_BeginMewboardAsyncImport.go b/service/cip/api_content_BeginMewboardAsyncImport.go index b945480..c72456a 100644 --- a/service/cip/api_content_BeginMewboardAsyncImport.go +++ b/service/cip/api_content_BeginMewboardAsyncImport.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* BeginMewboardAsyncImport Schedule an asynchronous import of mewboard content inside an existing folder with the given identifier. Import requests can be used to create or update content within a folder. Content items need to have a unique name within their folder. If there is already a content item with the same name in the folder, you can set the `overwrite` parameter to `true` to overwrite existing content items. By default, the overwrite parameter is set to false, where the import will fail if a content item with the same name already exist. Keep in mind when importing large folders that there is a limit of 1000 content objects that can be imported at once. If you want to import more than 1000 content objects, then be sure to split the import into batches of 1000 objects or less. - body - The content to import. folderId - The identifier of the folder to import into. Identifiers from the Library in the Sumo user interface are provided in decimal format which is incompatible with this API. The identifier needs to be in hexadecimal format. optional - nil or *types.ContentImportOpts - Optional Parameters: diff --git a/service/cip/api_content_BeginSavedSearchAsyncImport.go b/service/cip/api_content_BeginSavedSearchAsyncImport.go index b157de0..04748f8 100644 --- a/service/cip/api_content_BeginSavedSearchAsyncImport.go +++ b/service/cip/api_content_BeginSavedSearchAsyncImport.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* BeginSavedSearchAsyncImport Schedule an asynchronous import of saved search content inside an existing folder with the given identifier. Import requests can be used to create or update content within a folder. Content items need to have a unique name within their folder. If there is already a content item with the same name in the folder, you can set the `overwrite` parameter to `true` to overwrite existing content items. By default, the overwrite parameter is set to false, where the import will fail if a content item with the same name already exist. Keep in mind when importing large folders that there is a limit of 1000 content objects that can be imported at once. If you want to import more than 1000 content objects, then be sure to split the import into batches of 1000 objects or less. - body - The content to import. folderId - The identifier of the folder to import into. Identifiers from the Library in the Sumo user interface are provided in decimal format which is incompatible with this API. The identifier needs to be in hexadecimal format. optional - nil or *types.ContentImportOpts - Optional Parameters: diff --git a/service/cip/api_content_GetAsyncDeleteStatus.go b/service/cip/api_content_GetAsyncDeleteStatus.go index a52b152..65a7a88 100644 --- a/service/cip/api_content_GetAsyncDeleteStatus.go +++ b/service/cip/api_content_GetAsyncDeleteStatus.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetAsyncDeleteStatus Get the status of an asynchronous content deletion job request for the given job identifier. - id - Identifier of the content to delete. jobId - The identifier of the asynchronous job. optional - nil or *types.ContentOpts - Optional Parameters: diff --git a/service/cip/api_content_GetAsyncExportResult.go b/service/cip/api_content_GetAsyncExportResult.go index 03a8192..5d50851 100644 --- a/service/cip/api_content_GetAsyncExportResult.go +++ b/service/cip/api_content_GetAsyncExportResult.go @@ -2,12 +2,11 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* @@ -15,7 +14,6 @@ GetAsyncExportResult Get results from content export job for the given job identifier. The results from this export are incompatible with the Library import feature in the Sumo user interface. You can use this function to find out type of content was exported and use one of the following functions to return the appropriate data for the content type: GetFolderAsyncExportResult, GetDashboardAsyncExportResult, GetMewboardAsyncExportResult, GetSavedSearchAsyncExportResult, GetMetricsSavedSearchAsyncExportResult, GetMetricsSearchAsyncExportResult, GetLookupTableAsyncExportResult. - contentId - The identifier of the exported content item. jobId - The identifier of the asynchronous job. optional - nil or *types.ContentOpts - Optional Parameters: diff --git a/service/cip/api_content_GetAsyncExportStatus.go b/service/cip/api_content_GetAsyncExportStatus.go index 005f7d0..127b99e 100644 --- a/service/cip/api_content_GetAsyncExportStatus.go +++ b/service/cip/api_content_GetAsyncExportStatus.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetAsyncExportStatus Get the status of an asynchronous content export request for the given job identifier. On success, use the [getExportResult](#operation/getAsyncExportResult) endpoint to get the result of the export job. - contentId - The identifier of the exported content item. jobId - The identifier of the asynchronous export job. optional - nil or *types.ContentManagementApiGetAsyncExportStatusOpts - Optional Parameters: diff --git a/service/cip/api_content_GetAsyncImportStatus.go b/service/cip/api_content_GetAsyncImportStatus.go index eef3491..7e19e26 100644 --- a/service/cip/api_content_GetAsyncImportStatus.go +++ b/service/cip/api_content_GetAsyncImportStatus.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetAsyncImportStatus Get the status of a content import job for the given job identifier. - folderId - The identifier of the folder to import into. jobId - The identifier of the import request. optional - nil or *types.ContentOpts - Optional Parameters: diff --git a/service/cip/api_content_GetDashboardAsyncExportResult.go b/service/cip/api_content_GetDashboardAsyncExportResult.go index 1880bb4..345f8fb 100644 --- a/service/cip/api_content_GetDashboardAsyncExportResult.go +++ b/service/cip/api_content_GetDashboardAsyncExportResult.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetDashboardAsyncExportResult Get dashboard results from content export job for the given job identifier. The results from this export are incompatible with the Library import feature in the Sumo user interface. - contentId - The identifier of the exported content item. jobId - The identifier of the asynchronous job. optional - nil or *types.ContentManagementApiGetAsyncExportResultOpts - Optional Parameters: diff --git a/service/cip/api_content_GetFolderAsyncExportResult.go b/service/cip/api_content_GetFolderAsyncExportResult.go index e26093a..9177819 100644 --- a/service/cip/api_content_GetFolderAsyncExportResult.go +++ b/service/cip/api_content_GetFolderAsyncExportResult.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetFolderAsyncExportResult Get folder results from content export job for the given job identifier. The results from this export are incompatible with the Library import feature in the Sumo user interface. - contentId - The identifier of the exported content item. jobId - The identifier of the asynchronous job. optional - nil or *types.ContentManagementApiGetAsyncExportResultOpts - Optional Parameters: diff --git a/service/cip/api_content_GetItemByPath.go b/service/cip/api_content_GetItemByPath.go index 371ea82..c70da1e 100644 --- a/service/cip/api_content_GetItemByPath.go +++ b/service/cip/api_content_GetItemByPath.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetItemByPath Get a content item corresponding to the given path. The absolute path to a content item should be specified to get the item. The content library has Library folder at the root level. For items in Personal folder, the base path is /Library/Users/user@sumo.com where user@sumo.com is the email address of the user. For example if a user with email address wile@acme.com has Rockets folder inside Personal folder, the path of Rockets folder will be /Library/Users/wile@acme.com/Rockets. For items in Admin Recommended folder, the base path is /Library/Admin Recommended. For example, given a folder Acme in Admin Recommended folder, the path will be /Library/Admin Recommended/Acme. - path - Path of the content item to retrieve. */ func (a *APIClient) GetItemByPath(path string) (types.Content, *http.Response, error) { diff --git a/service/cip/api_content_GetLookupTableAsyncExportResult.go b/service/cip/api_content_GetLookupTableAsyncExportResult.go index b0b0eac..988d928 100644 --- a/service/cip/api_content_GetLookupTableAsyncExportResult.go +++ b/service/cip/api_content_GetLookupTableAsyncExportResult.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetLookupTableAsyncExportResult Get lookup table results from content export job for the given job identifier. The results from this export are incompatible with the Library import feature in the Sumo user interface. - contentId - The identifier of the exported content item. jobId - The identifier of the asynchronous job. optional - nil or *types.ContentOpts - Optional Parameters: diff --git a/service/cip/api_content_GetMetricsSavedSearchAsyncExportResult.go b/service/cip/api_content_GetMetricsSavedSearchAsyncExportResult.go index f5b1e10..556222a 100644 --- a/service/cip/api_content_GetMetricsSavedSearchAsyncExportResult.go +++ b/service/cip/api_content_GetMetricsSavedSearchAsyncExportResult.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetMetricsSavedSearchAsyncExportResult Get metrics saved search results from content export job for the given job identifier. The results from this export are incompatible with the Library import feature in the Sumo user interface. - contentId - The identifier of the exported content item. jobId - The identifier of the asynchronous job. optional - nil or *types.ContentOpts - Optional Parameters: diff --git a/service/cip/api_content_GetMetricsSearchAsyncExportResult.go b/service/cip/api_content_GetMetricsSearchAsyncExportResult.go index decd579..95e4616 100644 --- a/service/cip/api_content_GetMetricsSearchAsyncExportResult.go +++ b/service/cip/api_content_GetMetricsSearchAsyncExportResult.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetMetricsSearchAsyncExportResult Get metrics search results from content export job for the given job identifier. The results from this export are incompatible with the Library import feature in the Sumo user interface. - contentId - The identifier of the exported content item. jobId - The identifier of the asynchronous job. optional - nil or *types.ContentOpts - Optional Parameters: diff --git a/service/cip/api_content_GetMewboardAsyncExportResult.go b/service/cip/api_content_GetMewboardAsyncExportResult.go index 23ddec8..8fa87a1 100644 --- a/service/cip/api_content_GetMewboardAsyncExportResult.go +++ b/service/cip/api_content_GetMewboardAsyncExportResult.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetMewboardAsyncExportResult Get mewboard results from content export job for the given job identifier. The results from this export are incompatible with the Library import feature in the Sumo user interface. - contentId - The identifier of the exported content item. jobId - The identifier of the asynchronous job. optional - nil or *types.ContentOpts - Optional Parameters: diff --git a/service/cip/api_content_GetPathById.go b/service/cip/api_content_GetPathById.go index af45669..e4fb1a9 100644 --- a/service/cip/api_content_GetPathById.go +++ b/service/cip/api_content_GetPathById.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetPathById Get full path of a content item with the given identifier. - contentId - Identifier of the content item to get the path. */ func (a *APIClient) GetPathById(contentId string) (types.ContentPath, *http.Response, error) { diff --git a/service/cip/api_content_GetSavedSearchAsyncExportResult.go b/service/cip/api_content_GetSavedSearchAsyncExportResult.go index a9665f2..2e29130 100644 --- a/service/cip/api_content_GetSavedSearchAsyncExportResult.go +++ b/service/cip/api_content_GetSavedSearchAsyncExportResult.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetSavedSearchAsyncExportResult Get saved search results from content export job for the given job identifier. The results from this export are incompatible with the Library import feature in the Sumo user interface. - contentId - The identifier of the exported content item. jobId - The identifier of the asynchronous job. optional - nil or *types.ContentOpts - Optional Parameters: diff --git a/service/cip/api_content_MoveItem.go b/service/cip/api_content_MoveItem.go index 79bdba5..ce48576 100644 --- a/service/cip/api_content_MoveItem.go +++ b/service/cip/api_content_MoveItem.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* MoveItem Moves an item from its current location to another folder. - destinationFolderId - Identifier of the destination folder. id - Identifier of the item the user wants to move. optional - nil or *types.ContentOpts - Optional Parameters: diff --git a/service/cip/api_content_permissions_AddContentPermissions.go b/service/cip/api_content_permissions_AddContentPermissions.go index 171b359..7c832c6 100644 --- a/service/cip/api_content_permissions_AddContentPermissions.go +++ b/service/cip/api_content_permissions_AddContentPermissions.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* AddContentPermissions Add permissions to a content item with the given identifier. - body - New permissions to add to the content item with the given identifier. id - The identifier of the content item. optional - nil or *types.ContentPermissionsOpts - Optional Parameters: diff --git a/service/cip/api_content_permissions_GetContentPermissions.go b/service/cip/api_content_permissions_GetContentPermissions.go index d38ca6d..6654e3c 100644 --- a/service/cip/api_content_permissions_GetContentPermissions.go +++ b/service/cip/api_content_permissions_GetContentPermissions.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetContentPermissions Returns content permissions of a content item with the given identifier. - id - The identifier of the content item. optional - nil or *types.GetContentPermissionsOpts - Optional Parameters: ExplicitOnly (optional.Bool) - There are two permission types: explicit and implicit. Permissions specifically assigned to the content item are explicit. Permissions derived from a parent content item, like a folder are implicit. To return only explicit permissions set this to true. diff --git a/service/cip/api_content_permissions_RemoveContentPermissions.go b/service/cip/api_content_permissions_RemoveContentPermissions.go index de11a98..9ddd9bb 100644 --- a/service/cip/api_content_permissions_RemoveContentPermissions.go +++ b/service/cip/api_content_permissions_RemoveContentPermissions.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* RemoveContentPermissions Remove permissions from a content item with the given identifier. - body - Permissions to remove from a content item with the given identifier. id - The identifier of the content item. optional - nil or *types.ContentPermissionsOpts - Optional Parameters: diff --git a/service/cip/api_dashboard_CreateDashboard.go b/service/cip/api_dashboard_CreateDashboard.go index 9bdd60c..91b7a25 100644 --- a/service/cip/api_dashboard_CreateDashboard.go +++ b/service/cip/api_dashboard_CreateDashboard.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateDashboard Creates a new dashboard. - body - Information to create the new dashboard. */ func (a *APIClient) CreateDashboard(body types.DashboardRequest) (types.Dashboard, *http.Response, error) { diff --git a/service/cip/api_dashboard_DeleteDashboard.go b/service/cip/api_dashboard_DeleteDashboard.go index 24d04e1..1e5c995 100644 --- a/service/cip/api_dashboard_DeleteDashboard.go +++ b/service/cip/api_dashboard_DeleteDashboard.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteDashboard Delete a dashboard by the given identifier. - id - Identifier of the dashboard to delete. */ func (a *APIClient) DeleteDashboard(id string) (*http.Response, error) { diff --git a/service/cip/api_dashboard_GetDashboard.go b/service/cip/api_dashboard_GetDashboard.go index a447a59..1fc1ed7 100644 --- a/service/cip/api_dashboard_GetDashboard.go +++ b/service/cip/api_dashboard_GetDashboard.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetDashboard Get a dashboard by the given identifier. - id - UUID of the dashboard to return. */ func (a *APIClient) GetDashboard(id string) (types.Dashboard, *http.Response, error) { diff --git a/service/cip/api_dashboard_UpdateDashboard.go b/service/cip/api_dashboard_UpdateDashboard.go index 16ddfad..aef34c3 100644 --- a/service/cip/api_dashboard_UpdateDashboard.go +++ b/service/cip/api_dashboard_UpdateDashboard.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateDashboard Update a dashboard by the given identifier. - body - Information to update on the dashboard. id - Identifier of the dashboard to update. */ diff --git a/service/cip/api_dynamic_parsing_CreateDynamicParsingRule.go b/service/cip/api_dynamic_parsing_CreateDynamicParsingRule.go index 58be372..4296daf 100644 --- a/service/cip/api_dynamic_parsing_CreateDynamicParsingRule.go +++ b/service/cip/api_dynamic_parsing_CreateDynamicParsingRule.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateDynamicParsingRule Create a new dynamic parsing rule. - body - Information about the new dynamic parsing rule. */ func (a *APIClient) CreateDynamicParsingRule(body types.DynamicRuleDefinition) (types.DynamicRule, *http.Response, error) { diff --git a/service/cip/api_dynamic_parsing_DeleteDynamicParsingRule.go b/service/cip/api_dynamic_parsing_DeleteDynamicParsingRule.go index c851cca..5ea3ea9 100644 --- a/service/cip/api_dynamic_parsing_DeleteDynamicParsingRule.go +++ b/service/cip/api_dynamic_parsing_DeleteDynamicParsingRule.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteDynamicParsingRule Delete a dynamic parsing rule with the given identifier. - id - Identifier of the dynamic parsing rule to delete. */ func (a *APIClient) DeleteDynamicParsingRule(id string) (*http.Response, error) { diff --git a/service/cip/api_dynamic_parsing_GetDynamicParsingRule.go b/service/cip/api_dynamic_parsing_GetDynamicParsingRule.go index 53e2d2c..8edf14c 100644 --- a/service/cip/api_dynamic_parsing_GetDynamicParsingRule.go +++ b/service/cip/api_dynamic_parsing_GetDynamicParsingRule.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetDynamicParsingRule Get a dynamic parsing rule with the given identifier. - id - Identifier of dynamic parsing rule to return. */ func (a *APIClient) GetDynamicParsingRule(id string) (types.DynamicRule, *http.Response, error) { diff --git a/service/cip/api_dynamic_parsing_ListDynamicParsingRules.go b/service/cip/api_dynamic_parsing_ListDynamicParsingRules.go index da99f88..8322ef3 100644 --- a/service/cip/api_dynamic_parsing_ListDynamicParsingRules.go +++ b/service/cip/api_dynamic_parsing_ListDynamicParsingRules.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ListDynamicParsingRules Get a list of all dynamic parsing rules. The response is paginated with a default limit of 100 dynamic parsing rules per page. - optional - nil or *types.DynamicParsingRuleOpts - Optional Parameters: Limit (optional.Int32) - Limit the number of dynamic parsing rules returned in the response. The number of dynamic parsing rules returned may be less than the limit. Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. diff --git a/service/cip/api_dynamic_parsing_UpdateDynamicParsingRule.go b/service/cip/api_dynamic_parsing_UpdateDynamicParsingRule.go index 5ee82a7..b553094 100644 --- a/service/cip/api_dynamic_parsing_UpdateDynamicParsingRule.go +++ b/service/cip/api_dynamic_parsing_UpdateDynamicParsingRule.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateDynamicParsingRule Update an existing dynamic parsing rule. All properties specified in the request are replaced. Missing properties are set to their default values. - body - Information to update about the dynamic parsing rule. id - Identifier of the dynamic parsing rule to update. */ diff --git a/service/cip/api_extraction_rule_CreateExtractionRule.go b/service/cip/api_extraction_rule_CreateExtractionRule.go index f90e0f8..617b7cf 100644 --- a/service/cip/api_extraction_rule_CreateExtractionRule.go +++ b/service/cip/api_extraction_rule_CreateExtractionRule.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateExtractionRule Create a new field extraction rule. - body - Information about the new field extraction rule. */ func (a *APIClient) CreateExtractionRule(body types.ExtractionRuleDefinition) (types.ExtractionRule, *http.Response, error) { diff --git a/service/cip/api_extraction_rule_DeleteExtractionRule.go b/service/cip/api_extraction_rule_DeleteExtractionRule.go index e803a3a..8e4920b 100644 --- a/service/cip/api_extraction_rule_DeleteExtractionRule.go +++ b/service/cip/api_extraction_rule_DeleteExtractionRule.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteExtractionRule Delete a field extraction rule with the given identifier. - id - Identifier of the field extraction rule to delete. */ func (a *APIClient) DeleteExtractionRule(id string) (*http.Response, error) { diff --git a/service/cip/api_extraction_rule_GetExtractionRule.go b/service/cip/api_extraction_rule_GetExtractionRule.go index 41a37bd..d4bd3d9 100644 --- a/service/cip/api_extraction_rule_GetExtractionRule.go +++ b/service/cip/api_extraction_rule_GetExtractionRule.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetExtractionRule Get a field extraction rule with the given identifier. - id - Identifier of field extraction rule to return. */ func (a *APIClient) GetExtractionRule(id string) (types.ExtractionRule, *http.Response, error) { diff --git a/service/cip/api_extraction_rule_ListExtractionRule.go b/service/cip/api_extraction_rule_ListExtractionRule.go index 06d517b..0faa28f 100644 --- a/service/cip/api_extraction_rule_ListExtractionRule.go +++ b/service/cip/api_extraction_rule_ListExtractionRule.go @@ -1,21 +1,19 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ListExtractionRules Get a list of all field extraction rules. The response is paginated with a default limit of 100 field extraction rules per page. - - optional - nil or *types.ExtractionRuleOpts - Optional Parameters: - Limit (optional.Int32) - Limit the number of field extraction rules returned in the response. The number of field extraction rules returned may be less than the limit. - Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. + optional - nil or *types.ExtractionRuleOpts - Optional Parameters: + Limit (optional.Int32) - Limit the number of field extraction rules returned in the response. The number of field extraction rules returned may be less than the limit. + Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. */ func (a *APIClient) ListExtractionRules(localVarOptionals *types.ExtractionRuleOpts) (types.ListExtractionRulesResponse, *http.Response, error) { var ( diff --git a/service/cip/api_extraction_rule_UpdateExtractionRule.go b/service/cip/api_extraction_rule_UpdateExtractionRule.go index 88b2009..dddab16 100644 --- a/service/cip/api_extraction_rule_UpdateExtractionRule.go +++ b/service/cip/api_extraction_rule_UpdateExtractionRule.go @@ -2,20 +2,18 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateExtractionRule Update an existing field extraction rule. All properties specified in the request are replaced. Missing properties are set to their default values. - - body - Information to update about the field extraction rule. - id - Identifier of the field extraction rule to update. + body - Information to update about the field extraction rule. + id - Identifier of the field extraction rule to update. */ func (a *APIClient) UpdateExtractionRule(body types.UpdateExtractionRuleDefinition, id string) (types.ExtractionRule, *http.Response, error) { var ( diff --git a/service/cip/api_field_management_CreateField.go b/service/cip/api_field_management_CreateField.go index 8790886..44e1351 100644 --- a/service/cip/api_field_management_CreateField.go +++ b/service/cip/api_field_management_CreateField.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateField Adding a field will define it in the Fields schema allowing it to be assigned as metadata to your logs. - body - Name of a field to add. The name is used as the key in the key-value pair. */ func (a *APIClient) CreateField(body types.FieldName) (types.CustomField, *http.Response, error) { diff --git a/service/cip/api_field_management_DeleteField.go b/service/cip/api_field_management_DeleteField.go index 1286fc4..bb42223 100644 --- a/service/cip/api_field_management_DeleteField.go +++ b/service/cip/api_field_management_DeleteField.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteField Deleting a field does not delete historical data assigned with that field. If you delete a field by mistake and one or more of those dependencies break, you can re-add the field to get things working properly again. You should always disable a field and ensure things are behaving as expected before deleting a field. - id - Identifier of a field to delete. */ func (a *APIClient) DeleteField(id string) (*http.Response, error) { diff --git a/service/cip/api_field_management_DisableField.go b/service/cip/api_field_management_DisableField.go index 6165587..88d46dc 100644 --- a/service/cip/api_field_management_DisableField.go +++ b/service/cip/api_field_management_DisableField.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DisableField After disabling a field Sumo Logic will start dropping its incoming values at ingest. As a result, they won't be searchable or usable. Historical values are not removed and remain searchable. - id - Identifier of a field to disable. */ func (a *APIClient) DisableField(id string) (*http.Response, error) { diff --git a/service/cip/api_field_management_EnableField.go b/service/cip/api_field_management_EnableField.go index bd6ac34..25ef8b2 100644 --- a/service/cip/api_field_management_EnableField.go +++ b/service/cip/api_field_management_EnableField.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* EnableField Fields have to be enabled to be assigned to your data. This operation ensures that a specified field is enabled and Sumo Logic will treat it as safe to process. All manually created custom fields are enabled by default. - id - Identifier of a field to enable. */ func (a *APIClient) EnableField(id string) (*http.Response, error) { diff --git a/service/cip/api_field_management_GetBuiltInField.go b/service/cip/api_field_management_GetBuiltInField.go index 6caf288..6d2e958 100644 --- a/service/cip/api_field_management_GetBuiltInField.go +++ b/service/cip/api_field_management_GetBuiltInField.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetBuiltInField Get the details of a built-in field. - id - Identifier of a built-in field. */ func (a *APIClient) GetBuiltInField(id string) (types.BuiltinField, *http.Response, error) { diff --git a/service/cip/api_field_management_GetCustomField.go b/service/cip/api_field_management_GetCustomField.go index 4811665..e5a4c57 100644 --- a/service/cip/api_field_management_GetCustomField.go +++ b/service/cip/api_field_management_GetCustomField.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetCustomField Get the details of a custom field. - id - Identifier of a field. */ func (a *APIClient) GetCustomField(id string) (types.CustomField, *http.Response, error) { diff --git a/service/cip/api_field_management_GetFieldQuota.go b/service/cip/api_field_management_GetFieldQuota.go index 47ad342..e279a3f 100644 --- a/service/cip/api_field_management_GetFieldQuota.go +++ b/service/cip/api_field_management_GetFieldQuota.go @@ -1,12 +1,11 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* diff --git a/service/cip/api_field_management_ListBuiltInFields.go b/service/cip/api_field_management_ListBuiltInFields.go index 58688d1..0230093 100644 --- a/service/cip/api_field_management_ListBuiltInFields.go +++ b/service/cip/api_field_management_ListBuiltInFields.go @@ -1,12 +1,11 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* diff --git a/service/cip/api_field_management_ListCustomFields.go b/service/cip/api_field_management_ListCustomFields.go index aa82497..0c55e20 100644 --- a/service/cip/api_field_management_ListCustomFields.go +++ b/service/cip/api_field_management_ListCustomFields.go @@ -1,12 +1,11 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* diff --git a/service/cip/api_field_management_ListDroppedFields.go b/service/cip/api_field_management_ListDroppedFields.go index d98ff54..1c4a485 100644 --- a/service/cip/api_field_management_ListDroppedFields.go +++ b/service/cip/api_field_management_ListDroppedFields.go @@ -1,12 +1,11 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* diff --git a/service/cip/api_folder_CreateFolder.go b/service/cip/api_folder_CreateFolder.go index 05f78d2..3f46e65 100644 --- a/service/cip/api_folder_CreateFolder.go +++ b/service/cip/api_folder_CreateFolder.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateFolder Creates a new folder under the given parent folder. - body - Information about the new folder. optional - nil or *types.FolderOpts - Optional Parameters: IsAdminMode (optional.String) - Set this to true if you want to perform the request as a Content Administrator. diff --git a/service/cip/api_folder_GetAdminRecommendedFolderAsync.go b/service/cip/api_folder_GetAdminRecommendedFolderAsync.go index a1b175c..d4f9f5f 100644 --- a/service/cip/api_folder_GetAdminRecommendedFolderAsync.go +++ b/service/cip/api_folder_GetAdminRecommendedFolderAsync.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetAdminRecommendedFolderAsync Schedule an asynchronous job to get the top-level Admin Recommended content items. - optional - nil or *types.FolderOpts - Optional Parameters: IsAdminMode (optional.String) - Set this to true if you want to perform the request as a Content Administrator. */ diff --git a/service/cip/api_folder_GetAdminRecommendedFolderResult.go b/service/cip/api_folder_GetAdminRecommendedFolderResult.go index 808385c..255baf7 100644 --- a/service/cip/api_folder_GetAdminRecommendedFolderResult.go +++ b/service/cip/api_folder_GetAdminRecommendedFolderResult.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetAdminRecommendedFolderAsyncResult Get results from Admin Recommended job for the given job identifier. - jobId - The identifier of the asynchronous Admin Recommended folder job. */ func (a *APIClient) GetAdminRecommendedFolderAsyncResult(jobId string) (types.Folder, *http.Response, error) { diff --git a/service/cip/api_folder_GetAdminRecommendedFolderStatus.go b/service/cip/api_folder_GetAdminRecommendedFolderStatus.go index e655380..5c5b0af 100644 --- a/service/cip/api_folder_GetAdminRecommendedFolderStatus.go +++ b/service/cip/api_folder_GetAdminRecommendedFolderStatus.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetAdminRecommendedFolderAsyncStatus Get the status of an asynchronous Admin Recommended folder job for the given job identifier. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - jobId - The identifier of the asynchronous Admin Recommended folder job. */ func (a *APIClient) GetAdminRecommendedFolderAsyncStatus(jobId string) (types.AsyncJobStatus, *http.Response, error) { diff --git a/service/cip/api_folder_GetFolder.go b/service/cip/api_folder_GetFolder.go index c87f7a1..3c4ad68 100644 --- a/service/cip/api_folder_GetFolder.go +++ b/service/cip/api_folder_GetFolder.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetFolder Get a folder with the given identifier. - id - Identifier of the folder to fetch. optional - nil or *types.FolderOpts - Optional Parameters: IsAdminMode (optional.String) - Set this to true if you want to perform the request as a Content Administrator. diff --git a/service/cip/api_folder_GetGlobalFolderAsync.go b/service/cip/api_folder_GetGlobalFolderAsync.go index 1a6e6e1..8f4e567 100644 --- a/service/cip/api_folder_GetGlobalFolderAsync.go +++ b/service/cip/api_folder_GetGlobalFolderAsync.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetGlobalFolderAsync Schedule an asynchronous job to get global folder. Global folder contains all content items that a user has permissions to view in the organization. - optional - nil or *types.FolderOpts - Optional Parameters: IsAdminMode (optional.String) - Set this to true if you want to perform the request as a Content Administrator. */ diff --git a/service/cip/api_folder_GetGlobalFolderAsyncResult.go b/service/cip/api_folder_GetGlobalFolderAsyncResult.go index 3e57283..cc2e20a 100644 --- a/service/cip/api_folder_GetGlobalFolderAsyncResult.go +++ b/service/cip/api_folder_GetGlobalFolderAsyncResult.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetGlobalFolderAsyncResult Get results from global folder job for the given job identifier. - jobId - The identifier of the asynchronous global folder job. */ func (a *APIClient) GetGlobalFolderAsyncResult(jobId string) (types.ContentList, *http.Response, error) { diff --git a/service/cip/api_folder_GetGlobalFolderAsyncStatus.go b/service/cip/api_folder_GetGlobalFolderAsyncStatus.go index 2c3eaab..5ec3e4b 100644 --- a/service/cip/api_folder_GetGlobalFolderAsyncStatus.go +++ b/service/cip/api_folder_GetGlobalFolderAsyncStatus.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetGlobalFolderAsyncStatus Get the status of an asynchronous global folder job for the given job identifier. - jobId - The identifier of the asynchronous global folder job. */ func (a *APIClient) GetGlobalFolderAsyncStatus(jobId string) (types.AsyncJobStatus, *http.Response, error) { diff --git a/service/cip/api_folder_GetPersonalFolder.go b/service/cip/api_folder_GetPersonalFolder.go index 94b05a3..8491624 100644 --- a/service/cip/api_folder_GetPersonalFolder.go +++ b/service/cip/api_folder_GetPersonalFolder.go @@ -1,12 +1,11 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* diff --git a/service/cip/api_folder_UpdateFolder.go b/service/cip/api_folder_UpdateFolder.go index 6f4e7f3..2c44c7e 100644 --- a/service/cip/api_folder_UpdateFolder.go +++ b/service/cip/api_folder_UpdateFolder.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateFolder Update an existing folder with the given identifier. - body - Information to update about the folder. id - Identifier of the folder to update. optional - nil or *types.FolderOpts - Optional Parameters: diff --git a/service/cip/api_general_SendMessage.go b/service/cip/api_general_SendMessage.go index 732d36b..2a800a9 100644 --- a/service/cip/api_general_SendMessage.go +++ b/service/cip/api_general_SendMessage.go @@ -13,7 +13,6 @@ import ( SendMessage Allows you to send data to a Sumo Logic HTTP source endpoint. If sending the data to the endpoint fails it will retry every 10 seconds based on the value of maxRetries. - maxRetries - determines how many times the message will attempt to be sent if there is an error sending. message - data to send to the Sumo Logic source. */ diff --git a/service/cip/api_health_events_ListAllHealthEvents.go b/service/cip/api_health_events_ListAllHealthEvents.go index f4be9dd..1e60f25 100644 --- a/service/cip/api_health_events_ListAllHealthEvents.go +++ b/service/cip/api_health_events_ListAllHealthEvents.go @@ -99,12 +99,10 @@ func (a *APIClient) ListAllHealthEvents(localVarOptionals *types.HealthEventsOpt newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if len(v.Errors) > 0 { - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message - } + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message } return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/service/cip/api_health_events_ListAllHealthEventsForResources.go b/service/cip/api_health_events_ListAllHealthEventsForResources.go index 64defed..282b9f4 100644 --- a/service/cip/api_health_events_ListAllHealthEventsForResources.go +++ b/service/cip/api_health_events_ListAllHealthEventsForResources.go @@ -1,23 +1,21 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ListAllHealthEventsForResources Get a list of all the unresolved events in your account that belong to the supplied resource identifiers. If you want to retrieve health events for a Source or Ingest Budget use the following functions: ListSourceHealthEvents or ListIngestBudgetHealthEvents - - body - Resource identifiers to request health events from. - optional - nil or *types.HealthEventsOpts - Optional Parameters: - Limit (optional.Int32) - Limit the number of health events returned in the response. The number of health events returned may be less than the limit. - Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. token is set to null when no more pages are left. + body - Resource identifiers to request health events from. + optional - nil or *types.HealthEventsOpts - Optional Parameters: + Limit (optional.Int32) - Limit the number of health events returned in the response. The number of health events returned may be less than the limit. + Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. token is set to null when no more pages are left. */ func (a *APIClient) ListAllHealthEventsForResources(body types.ResourceIdentities, localVarOptionals *types.HealthEventsOpts) (types.ListHealthEventResponse, *http.Response, error) { var ( diff --git a/service/cip/api_ingest_budget_v1_AssignCollectorToBudget.go b/service/cip/api_ingest_budget_v1_AssignCollectorToBudget.go index 95d1769..4654047 100644 --- a/service/cip/api_ingest_budget_v1_AssignCollectorToBudget.go +++ b/service/cip/api_ingest_budget_v1_AssignCollectorToBudget.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* AssignCollectorToBudget Assign a Collector to a budget. - id - Identifier of the ingest budget to assign to the Collector. collectorId - Identifier of the Collector to assign. */ diff --git a/service/cip/api_ingest_budget_v1_CreateIngestBudget.go b/service/cip/api_ingest_budget_v1_CreateIngestBudget.go index bbf8a29..0a10dd7 100644 --- a/service/cip/api_ingest_budget_v1_CreateIngestBudget.go +++ b/service/cip/api_ingest_budget_v1_CreateIngestBudget.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateIngestBudget Create a new ingest budget. - body - Information about the new ingest budget. */ func (a *APIClient) CreateIngestBudget(body types.IngestBudgetDefinition) (types.IngestBudget, *http.Response, error) { diff --git a/service/cip/api_ingest_budget_v1_DeleteIngestBudget.go b/service/cip/api_ingest_budget_v1_DeleteIngestBudget.go index 1f579e8..94fc7df 100644 --- a/service/cip/api_ingest_budget_v1_DeleteIngestBudget.go +++ b/service/cip/api_ingest_budget_v1_DeleteIngestBudget.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteIngestBudget Delete an ingest budget with the given identifier. - id - Identifier of the ingest budget to delete. */ func (a *APIClient) DeleteIngestBudget(id string) (*http.Response, error) { diff --git a/service/cip/api_ingest_budget_v1_GetAssignedCollectors.go b/service/cip/api_ingest_budget_v1_GetAssignedCollectors.go index c602f50..3d2493c 100644 --- a/service/cip/api_ingest_budget_v1_GetAssignedCollectors.go +++ b/service/cip/api_ingest_budget_v1_GetAssignedCollectors.go @@ -2,22 +2,20 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetAssignedCollectors Get a list of Collectors assigned to an ingest budget. The response is paginated with a default limit of 100 Collectors per page. - - id - Identifier of ingest budget to which Collectors are assigned. - optional - nil or *types.listIngestBudgetV1Opts - Optional Parameters: - Limit (optional.Int32) - Limit the number of Collectors returned in the response. The number of Collectors returned may be less than the limit. - Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. + id - Identifier of ingest budget to which Collectors are assigned. + optional - nil or *types.listIngestBudgetV1Opts - Optional Parameters: + Limit (optional.Int32) - Limit the number of Collectors returned in the response. The number of Collectors returned may be less than the limit. + Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. */ func (a *APIClient) GetAssignedCollectors(id string, localVarOptionals *types.ListIngestBudgetV1Opts) (types.ListCollectorIdentitiesResponse, *http.Response, error) { var ( diff --git a/service/cip/api_ingest_budget_v1_GetIngestBudget.go b/service/cip/api_ingest_budget_v1_GetIngestBudget.go index 80abefd..c1bb37a 100644 --- a/service/cip/api_ingest_budget_v1_GetIngestBudget.go +++ b/service/cip/api_ingest_budget_v1_GetIngestBudget.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetIngestBudget Get an ingest budget by the given identifier. - id - Identifier of ingest budget to return. */ func (a *APIClient) GetIngestBudget(id string) (types.IngestBudget, *http.Response, error) { diff --git a/service/cip/api_ingest_budget_v1_ListIngestBudgets.go b/service/cip/api_ingest_budget_v1_ListIngestBudgets.go index 2101087..43751b5 100644 --- a/service/cip/api_ingest_budget_v1_ListIngestBudgets.go +++ b/service/cip/api_ingest_budget_v1_ListIngestBudgets.go @@ -1,21 +1,19 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ListIngestBudgets Get a list of all ingest budgets. The response is paginated with a default limit of 100 budgets per page. - - optional - nil or *types.ListIngestBudgetV1Opts - Optional Parameters: - Limit (optional.Int32) - Limit the number of budgets returned in the response. The number of budgets returned may be less than the limit. - Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. + optional - nil or *types.ListIngestBudgetV1Opts - Optional Parameters: + Limit (optional.Int32) - Limit the number of budgets returned in the response. The number of budgets returned may be less than the limit. + Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. */ func (a *APIClient) ListIngestBudgets(localVarOptionals *types.ListIngestBudgetV1Opts) (types.ListIngestBudgetsResponse, *http.Response, error) { var ( diff --git a/service/cip/api_ingest_budget_v1_RemoveCollectorFromBudget.go b/service/cip/api_ingest_budget_v1_RemoveCollectorFromBudget.go index adf5272..30649b8 100644 --- a/service/cip/api_ingest_budget_v1_RemoveCollectorFromBudget.go +++ b/service/cip/api_ingest_budget_v1_RemoveCollectorFromBudget.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* RemoveCollectorFromBudget Remove Collector from a budget. - id - Identifier of the ingest budget to unassign from the Collector. collectorId - Identifier of the Collector to unassign. */ diff --git a/service/cip/api_ingest_budget_v1_ResetUsage.go b/service/cip/api_ingest_budget_v1_ResetUsage.go index 6cb4a6e..806186b 100644 --- a/service/cip/api_ingest_budget_v1_ResetUsage.go +++ b/service/cip/api_ingest_budget_v1_ResetUsage.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ResetUsage Reset ingest budget's current usage to 0 before the scheduled reset time. - id - Identifier of the ingest budget to reset usage. */ func (a *APIClient) ResetUsage(id string) (*http.Response, error) { diff --git a/service/cip/api_ingest_budget_v1_UpdateIngestBudget.go b/service/cip/api_ingest_budget_v1_UpdateIngestBudget.go index 6a81a44..edc3997 100644 --- a/service/cip/api_ingest_budget_v1_UpdateIngestBudget.go +++ b/service/cip/api_ingest_budget_v1_UpdateIngestBudget.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateIngestBudget Update an existing ingest budget. All properties specified in the request are required. - body - Information to update about the ingest budget. id - Identifier of the ingest budget to update. */ diff --git a/service/cip/api_ingest_budget_v2_CreateIngestBudget.go b/service/cip/api_ingest_budget_v2_CreateIngestBudget.go index d5bb484..9edfa07 100644 --- a/service/cip/api_ingest_budget_v2_CreateIngestBudget.go +++ b/service/cip/api_ingest_budget_v2_CreateIngestBudget.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateIngestBudgetV2 Create a new ingest budget. - body - Information about the new ingest budget. */ func (a *APIClient) CreateIngestBudgetV2(body types.IngestBudgetDefinitionV2) (types.IngestBudgetV2, *http.Response, error) { diff --git a/service/cip/api_ingest_budget_v2_DeleteIngestBudget.go b/service/cip/api_ingest_budget_v2_DeleteIngestBudget.go index 59e6fa3..efd52a6 100644 --- a/service/cip/api_ingest_budget_v2_DeleteIngestBudget.go +++ b/service/cip/api_ingest_budget_v2_DeleteIngestBudget.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteIngestBudgetV2 Delete an ingest budget with the given identifier. - id - Identifier of the ingest budget to delete. */ func (a *APIClient) DeleteIngestBudgetV2(id string) (*http.Response, error) { diff --git a/service/cip/api_ingest_budget_v2_GetIngestBudget.go b/service/cip/api_ingest_budget_v2_GetIngestBudget.go index 9767ef1..0196d50 100644 --- a/service/cip/api_ingest_budget_v2_GetIngestBudget.go +++ b/service/cip/api_ingest_budget_v2_GetIngestBudget.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetIngestBudgetV2 Get an ingest budget by the given identifier. - id - Identifier of ingest budget to return. */ func (a *APIClient) GetIngestBudgetV2(id string) (types.IngestBudgetV2, *http.Response, error) { diff --git a/service/cip/api_ingest_budget_v2_ListIngestBudgets.go b/service/cip/api_ingest_budget_v2_ListIngestBudgets.go index e69ffdf..15094d3 100644 --- a/service/cip/api_ingest_budget_v2_ListIngestBudgets.go +++ b/service/cip/api_ingest_budget_v2_ListIngestBudgets.go @@ -1,21 +1,19 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ListIngestBudgetsV2 Get a list of all ingest budgets. The response is paginated with a default limit of 100 budgets per page. - - optional - nil or *types.ListIngestBudgetV2Opts - Optional Parameters: - Limit (optional.Int32) - Limit the number of budgets returned in the response. The number of budgets returned may be less than the limit. - Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. + optional - nil or *types.ListIngestBudgetV2Opts - Optional Parameters: + Limit (optional.Int32) - Limit the number of budgets returned in the response. The number of budgets returned may be less than the limit. + Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. */ func (a *APIClient) ListIngestBudgetsV2(localVarOptionals *types.ListIngestBudgetV2Opts) (types.ListIngestBudgetsResponseV2, *http.Response, error) { var ( diff --git a/service/cip/api_ingest_budget_v2_ResetUsage.go b/service/cip/api_ingest_budget_v2_ResetUsage.go index 05dbc06..98754cc 100644 --- a/service/cip/api_ingest_budget_v2_ResetUsage.go +++ b/service/cip/api_ingest_budget_v2_ResetUsage.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ResetUsageV2 Reset ingest budget's current usage to 0 before the scheduled reset time. - id - Identifier of the ingest budget to reset usage. */ func (a *APIClient) ResetUsageV2(id string) (*http.Response, error) { diff --git a/service/cip/api_ingest_budget_v2_UpdateIngestBudget.go b/service/cip/api_ingest_budget_v2_UpdateIngestBudget.go index 0fb2da1..927b0a5 100644 --- a/service/cip/api_ingest_budget_v2_UpdateIngestBudget.go +++ b/service/cip/api_ingest_budget_v2_UpdateIngestBudget.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateIngestBudgetV2 Update an existing ingest budget. All properties specified in the request are required. - body - Information to update about the ingest budget. id - Identifier of the ingest budget to update. */ diff --git a/service/cip/api_log_searches_estimated_usage_GetLogSearchEstimatedUsage.go b/service/cip/api_log_searches_estimated_usage_GetLogSearchEstimatedUsage.go index 0d86ce7..a316d28 100644 --- a/service/cip/api_log_searches_estimated_usage_GetLogSearchEstimatedUsage.go +++ b/service/cip/api_log_searches_estimated_usage_GetLogSearchEstimatedUsage.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetLogSearchEstimatedUsage Gets the estimated volume of data that would be scanned for a given log search in the Infrequent data tier. - body - The definition of the log search estimated usage. */ func (a *APIClient) GetLogSearchEstimatedUsage(body types.LogSearchEstimatedUsageRequest) (types.LogSearchEstimatedUsageDefinition, *http.Response, error) { diff --git a/service/cip/api_log_searches_estimated_usage_GetLogSearchEstimatedUsageByTier.go b/service/cip/api_log_searches_estimated_usage_GetLogSearchEstimatedUsageByTier.go index 99f8a44..48f7bee 100644 --- a/service/cip/api_log_searches_estimated_usage_GetLogSearchEstimatedUsageByTier.go +++ b/service/cip/api_log_searches_estimated_usage_GetLogSearchEstimatedUsageByTier.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetLogSearchEstimatedUsageByTier Gets the estimated volume of data that would be scanned for a given log search per data tier. - body - The definition of the log search estimated usage. */ func (a *APIClient) GetLogSearchEstimatedUsageByTier(body types.LogSearchEstimatedUsageRequestV2) (types.LogSearchEstimatedUsageByTierDefinition, *http.Response, error) { diff --git a/service/cip/api_lookup_CreateTable.go b/service/cip/api_lookup_CreateTable.go index c192137..7854e45 100644 --- a/service/cip/api_lookup_CreateTable.go +++ b/service/cip/api_lookup_CreateTable.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateTable Create a new lookup table by providing a schema and specifying its configuration. Providing parentFolderId is mandatory. - body - The schema and configuration for the lookup table. */ func (a *APIClient) CreateTable(body types.LookupTableDefinition) (types.LookupTable, *http.Response, error) { diff --git a/service/cip/api_lookup_DeleteTable.go b/service/cip/api_lookup_DeleteTable.go index 762065d..3c8afc0 100644 --- a/service/cip/api_lookup_DeleteTable.go +++ b/service/cip/api_lookup_DeleteTable.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteTable Delete a lookup table completely. - id - Identifier of the lookup table. */ func (a *APIClient) DeleteTable(id string) (*http.Response, error) { diff --git a/service/cip/api_lookup_DeleteTableRow.go b/service/cip/api_lookup_DeleteTableRow.go index cb821be..e63c942 100644 --- a/service/cip/api_lookup_DeleteTableRow.go +++ b/service/cip/api_lookup_DeleteTableRow.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteTableRow Delete a row from lookup table by giving primary key. The complete set of primary key fields of the lookup table should be provided. - body - Lookup table row delete definition. id - Identifier of the lookup table. */ diff --git a/service/cip/api_lookup_LookupTableById.go b/service/cip/api_lookup_LookupTableById.go index 47f2cbd..6f3eb63 100644 --- a/service/cip/api_lookup_LookupTableById.go +++ b/service/cip/api_lookup_LookupTableById.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* LookupTableById Get a lookup table for the given identifier. - id - Identifier of the lookup table. */ func (a *APIClient) LookupTableById(id string) (types.LookupTable, *http.Response, error) { diff --git a/service/cip/api_lookup_RequestJobStatus.go b/service/cip/api_lookup_RequestJobStatus.go index 4645250..2db742f 100644 --- a/service/cip/api_lookup_RequestJobStatus.go +++ b/service/cip/api_lookup_RequestJobStatus.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* RequestJobStatus Retrieve the status of a previously made request. If the request was successful, the status of the response object will be Success. - jobId - An identifier returned in response to an asynchronous request. */ func (a *APIClient) RequestJobStatus(jobId string) (types.LookupAsyncJobStatus, *http.Response, error) { diff --git a/service/cip/api_lookup_TruncateTable.go b/service/cip/api_lookup_TruncateTable.go index 702ec4e..3c4f764 100644 --- a/service/cip/api_lookup_TruncateTable.go +++ b/service/cip/api_lookup_TruncateTable.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* TruncateTable Delete all data from a lookup table. - id - Identifier of the table to clear. */ func (a *APIClient) TruncateTable(id string) (types.LookupRequestToken, *http.Response, error) { diff --git a/service/cip/api_lookup_UpdateTable.go b/service/cip/api_lookup_UpdateTable.go index 08fa527..4e2f536 100644 --- a/service/cip/api_lookup_UpdateTable.go +++ b/service/cip/api_lookup_UpdateTable.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateTable Edit the lookup table data. All the fields are mandatory in the request. - body - The configuration changes for the lookup table. id - Identifier of the lookup table. */ diff --git a/service/cip/api_lookup_UpdateTableRow.go b/service/cip/api_lookup_UpdateTableRow.go index 7e37499..a79ddbe 100644 --- a/service/cip/api_lookup_UpdateTableRow.go +++ b/service/cip/api_lookup_UpdateTableRow.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateTableRow Insert or update a row of a lookup table with the given identifier. A new row is inserted if the primary key does not exist already, otherwise the existing row with the specified primary key is updated. All the fields of the lookup table are required and will be updated to the given values. In case a field is not specified then it will be assumed to be set to null. If the table size exceeds the maximum limit of 100MB then based on the size limit action of the table the update will be processed or discarded. - body - Lookup table row update definition. id - Identifier of the lookup table. */ diff --git a/service/cip/api_lookup_UploadFile.go b/service/cip/api_lookup_UploadFile.go index 038231f..5240973 100644 --- a/service/cip/api_lookup_UploadFile.go +++ b/service/cip/api_lookup_UploadFile.go @@ -2,20 +2,18 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io" "io/ioutil" "net/http" "net/url" "os" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UploadFile Create a request to populate a lookup table with a CSV file. - file - A CSV file id - Identifier of the lookup table to populate. optional - nil or *types.LookupTableUploadFileOpts - Optional Parameters: diff --git a/service/cip/api_metrics_query_RunMetricsQueries.go b/service/cip/api_metrics_query_RunMetricsQueries.go index 0d9f48a..53442aa 100644 --- a/service/cip/api_metrics_query_RunMetricsQueries.go +++ b/service/cip/api_metrics_query_RunMetricsQueries.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* RunMetricsQueries Execute up to six metrics queries. If you specify multiple queries, each is returned as a separate set of time series. - body - The parameters for the metrics query. */ func (a *APIClient) RunMetricsQueries(body types.MetricsQueryRequest) (types.MetricsQueryResponse, *http.Response, error) { diff --git a/service/cip/api_metrics_searches_CreateMetricsSearch.go b/service/cip/api_metrics_searches_CreateMetricsSearch.go index d5b4de6..627fe82 100644 --- a/service/cip/api_metrics_searches_CreateMetricsSearch.go +++ b/service/cip/api_metrics_searches_CreateMetricsSearch.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateMetricsSearch Saves a metrics search in the content library. Metrics search consists of one or more queries, a time range, a quantization period and a set of chart properties like line width. - body - The definition of the metrics search. */ func (a *APIClient) CreateMetricsSearch(body types.SaveMetricsSearchRequest) (types.MetricsSearchInstance, *http.Response, error) { diff --git a/service/cip/api_metrics_searches_DeleteMetricsSearch.go b/service/cip/api_metrics_searches_DeleteMetricsSearch.go index 004063a..41597d0 100644 --- a/service/cip/api_metrics_searches_DeleteMetricsSearch.go +++ b/service/cip/api_metrics_searches_DeleteMetricsSearch.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteMetricsSearch Deletes a metrics search from the content library. - id - Identifier of the metrics search. */ func (a *APIClient) DeleteMetricsSearch(id string) (*http.Response, error) { diff --git a/service/cip/api_metrics_searches_GetMetricsSearch.go b/service/cip/api_metrics_searches_GetMetricsSearch.go index 9f20ec8..f66c704 100644 --- a/service/cip/api_metrics_searches_GetMetricsSearch.go +++ b/service/cip/api_metrics_searches_GetMetricsSearch.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetMetricsSearch Returns a metrics search with the specified identifier. - id - Identifier of the metrics search. */ func (a *APIClient) GetMetricsSearch(id string) (types.MetricsSearchInstance, *http.Response, error) { diff --git a/service/cip/api_metrics_searches_UpdateMetricsSearch.go b/service/cip/api_metrics_searches_UpdateMetricsSearch.go index 3691a74..5fabeb1 100644 --- a/service/cip/api_metrics_searches_UpdateMetricsSearch.go +++ b/service/cip/api_metrics_searches_UpdateMetricsSearch.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateMetricsSearch Updates a metrics search with the specified identifier. Partial updates are not supported, you must provide values for all fields. - body - An updated metrics search definition. id - Identifier of the metrics search. */ diff --git a/service/cip/api_monitors_CopyMonitors.go b/service/cip/api_monitors_CopyMonitors.go index 8809516..2aeb178 100644 --- a/service/cip/api_monitors_CopyMonitors.go +++ b/service/cip/api_monitors_CopyMonitors.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CopyMonitors Copy a monitor or folder in the monitors library. - body - Details of the content to copy. id - Identifier of the monitor or folder to copy. */ diff --git a/service/cip/api_monitors_CreateMonitors.go b/service/cip/api_monitors_CreateMonitors.go index e704144..29ccb39 100644 --- a/service/cip/api_monitors_CreateMonitors.go +++ b/service/cip/api_monitors_CreateMonitors.go @@ -1,12 +1,11 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) func (a *APIClient) CreateMonitors(body types.MonitorsLibraryBase, parentId string) (types.MonitorsLibraryBaseResponse, *http.Response, error) { diff --git a/service/cip/api_monitors_DeleteMonitorsById.go b/service/cip/api_monitors_DeleteMonitorsById.go index 80d5613..909d6ea 100644 --- a/service/cip/api_monitors_DeleteMonitorsById.go +++ b/service/cip/api_monitors_DeleteMonitorsById.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteMonitorsById Delete a monitor or folder from the monitors library. - id - Identifier of the monitor or folder to delete. */ func (a *APIClient) DeleteMonitorsById(id string) (*http.Response, error) { diff --git a/service/cip/api_monitors_DeleteMonitorsByIds.go b/service/cip/api_monitors_DeleteMonitorsByIds.go index 5b2ecc4..cef01cc 100644 --- a/service/cip/api_monitors_DeleteMonitorsByIds.go +++ b/service/cip/api_monitors_DeleteMonitorsByIds.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteMonitorsByIds Bulk delete a monitor or folder by the given identifiers in the monitors library. - ids - A comma-separated list of identifiers. */ func (a *APIClient) DeleteMonitorsByIds(ids []string) (map[string]types.MonitorsLibraryBaseResponse, *http.Response, error) { diff --git a/service/cip/api_monitors_ExportMonitorsItem.go b/service/cip/api_monitors_ExportMonitorsItem.go index d841073..36da6e2 100644 --- a/service/cip/api_monitors_ExportMonitorsItem.go +++ b/service/cip/api_monitors_ExportMonitorsItem.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ExportMonitorsItem Export a monitor or folder. If the given identifier is a folder, everything under the folder is exported recursively with folder as the root. - id - Identifier of the monitor or folder to export. */ func (a *APIClient) ExportMonitorsItem(id string) (types.MonitorsLibraryBaseExport, *http.Response, error) { diff --git a/service/cip/api_monitors_GetMonitorUsageInfo.go b/service/cip/api_monitors_GetMonitorUsageInfo.go index b301c71..b83829b 100644 --- a/service/cip/api_monitors_GetMonitorUsageInfo.go +++ b/service/cip/api_monitors_GetMonitorUsageInfo.go @@ -1,12 +1,11 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* diff --git a/service/cip/api_monitors_GetMonitorsById.go b/service/cip/api_monitors_GetMonitorsById.go index 54af382..bac226e 100644 --- a/service/cip/api_monitors_GetMonitorsById.go +++ b/service/cip/api_monitors_GetMonitorsById.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetMonitorsById Get a monitor or folder from the monitors library. - id - Identifier of the monitor or folder to read. */ func (a *APIClient) GetMonitorsById(id string) (types.MonitorsLibraryBaseResponse, *http.Response, error) { diff --git a/service/cip/api_monitors_GetMonitorsByIds.go b/service/cip/api_monitors_GetMonitorsByIds.go index a8b2b4d..0a70925 100644 --- a/service/cip/api_monitors_GetMonitorsByIds.go +++ b/service/cip/api_monitors_GetMonitorsByIds.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetMonitorsByIds Bulk read a monitor or folder by the given identifiers from the monitors library. - ids - A comma-separated list of identifiers. */ func (a *APIClient) GetMonitorsByIds(ids []string) (map[string]types.MonitorsLibraryBaseResponse, *http.Response, error) { diff --git a/service/cip/api_monitors_GetMonitorsByPath.go b/service/cip/api_monitors_GetMonitorsByPath.go index 1cd28e7..de6dc96 100644 --- a/service/cip/api_monitors_GetMonitorsByPath.go +++ b/service/cip/api_monitors_GetMonitorsByPath.go @@ -1,18 +1,17 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetMonitorsByPath Read a monitor or folder by its path in the monitors library structure. - - @param path The path of the monitor or folder. + * @param path The path of the monitor or folder. */ func (a *APIClient) GetMonitorsByPath(path string) (types.MonitorsLibraryBaseResponse, *http.Response, error) { var ( diff --git a/service/cip/api_monitors_GetMonitorsFullPath.go b/service/cip/api_monitors_GetMonitorsFullPath.go index 6ca36c3..1a3b6fe 100644 --- a/service/cip/api_monitors_GetMonitorsFullPath.go +++ b/service/cip/api_monitors_GetMonitorsFullPath.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetMonitorsFullPath Get the full path of the monitor or folder in the monitors library. - id - Identifier of the monitor or folder. */ func (a *APIClient) GetMonitorsFullPath(id string) (types.Path, *http.Response, error) { diff --git a/service/cip/api_monitors_GetMonitorsLibraryRoot.go b/service/cip/api_monitors_GetMonitorsLibraryRoot.go index 2d9e9a4..28275cf 100644 --- a/service/cip/api_monitors_GetMonitorsLibraryRoot.go +++ b/service/cip/api_monitors_GetMonitorsLibraryRoot.go @@ -1,12 +1,11 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* diff --git a/service/cip/api_monitors_ImportMonitorsItem.go b/service/cip/api_monitors_ImportMonitorsItem.go index 9f6da39..2b7c72d 100644 --- a/service/cip/api_monitors_ImportMonitorsItem.go +++ b/service/cip/api_monitors_ImportMonitorsItem.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ImportMonitorsItem Import a monitor or folder. - body - The monitor or folder to be imported. parentId - Identifier of the parent folder in which to import the monitor or folder. */ diff --git a/service/cip/api_monitors_MoveMonitors.go b/service/cip/api_monitors_MoveMonitors.go index 810f011..c1c4d80 100644 --- a/service/cip/api_monitors_MoveMonitors.go +++ b/service/cip/api_monitors_MoveMonitors.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* MoveMonitors Move a monitor or folder to a different location in the monitors library. - id - Identifier of the monitor or folder to move. parentId - Identifier of the parent folder to move the monitor or folder to. */ diff --git a/service/cip/api_monitors_SearchMonitors.go b/service/cip/api_monitors_SearchMonitors.go index 33dc291..57066f1 100644 --- a/service/cip/api_monitors_SearchMonitors.go +++ b/service/cip/api_monitors_SearchMonitors.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* SearchMonitors Search for a monitor or folder in the monitors library structure. - query - The search query to find monitor or folder. The following is a list of different filters: **createdBy**: Filter by the user's identifier who created the content (createdBy:000000000000968B). **createdBefore**: Filter by the content objects created before the given timestamp(in milliseconds) (createdBefore:1457997222). diff --git a/service/cip/api_monitors_UpdateMonitorsById.go b/service/cip/api_monitors_UpdateMonitorsById.go index fc8a65d..99c32cc 100644 --- a/service/cip/api_monitors_UpdateMonitorsById.go +++ b/service/cip/api_monitors_UpdateMonitorsById.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateMonitorsById Update a monitor or folder in the monitors library. - body - The monitor or folder to update. The content version must match its latest version number in the monitors library. If the version does not match it will not be updated. id - Identifier of the monitor or folder to update. */ diff --git a/service/cip/api_monitors_ValidateMonitorQueries.go b/service/cip/api_monitors_ValidateMonitorQueries.go index 522bf79..01f56b6 100644 --- a/service/cip/api_monitors_ValidateMonitorQueries.go +++ b/service/cip/api_monitors_ValidateMonitorQueries.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ValidateMonitorQueries Validate the query strings to make sure they are valid monitor queries. - body - The queries that will be validated. */ func (a *APIClient) ValidateMonitorQueries(body types.MonitorQueries) (types.MonitorQueriesValidationResult, *http.Response, error) { diff --git a/service/cip/api_organizations_CreateOrganization.go b/service/cip/api_organizations_CreateOrganization.go index 48e55dd..06801af 100644 --- a/service/cip/api_organizations_CreateOrganization.go +++ b/service/cip/api_organizations_CreateOrganization.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateOrganization Create a new child organization. - body - Details about the organization to create. parentDeploymentId - Deployment on which the calling organization resides. */ diff --git a/service/cip/api_organizations_CreateOrganizationAccessKey.go b/service/cip/api_organizations_CreateOrganizationAccessKey.go index 76b9939..7cdc5a2 100644 --- a/service/cip/api_organizations_CreateOrganizationAccessKey.go +++ b/service/cip/api_organizations_CreateOrganizationAccessKey.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateOrganizationAccessKey Get an access ID and key pair for an existing organization based on the organization identifier. - body - Access Key details. parentDeploymentId - Deployment on which the calling organization resides. orgId - Identifier of the organization for which the access ID and key pair is required. diff --git a/service/cip/api_organizations_DeleteOrganization.go b/service/cip/api_organizations_DeleteOrganization.go index f7db92e..d10ac5f 100644 --- a/service/cip/api_organizations_DeleteOrganization.go +++ b/service/cip/api_organizations_DeleteOrganization.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteOrganization Deactivate an organization with the given identifier, deleting all its data and its subscription. - orgId - Identifier of the organization to deactivate. parentDeploymentId - Deployment on which the calling organization resides. */ diff --git a/service/cip/api_organizations_GetDeployments.go b/service/cip/api_organizations_GetDeployments.go index 89b3acd..f05aa31 100644 --- a/service/cip/api_organizations_GetDeployments.go +++ b/service/cip/api_organizations_GetDeployments.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetDeployments Get deployment details where organization can be created. - parentDeploymentId - Deployment on which the calling organization resides. */ func (a *APIClient) GetDeployments(parentDeploymentId string) ([]types.Deployment, *http.Response, error) { diff --git a/service/cip/api_organizations_GetOrganization.go b/service/cip/api_organizations_GetOrganization.go index bcbce3b..f9bc496 100644 --- a/service/cip/api_organizations_GetOrganization.go +++ b/service/cip/api_organizations_GetOrganization.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetOrganization Get details of an existing organization based on an organization identifier. - orgId - Identifier of the organization for which the details are required. parentDeploymentId - Deployment on which the calling organization resides. */ diff --git a/service/cip/api_organizations_GetOrganizationUsage.go b/service/cip/api_organizations_GetOrganizationUsage.go index 402ae0e..f3e93e2 100644 --- a/service/cip/api_organizations_GetOrganizationUsage.go +++ b/service/cip/api_organizations_GetOrganizationUsage.go @@ -2,19 +2,18 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetOrganizationUsage Get the detailed usage breakdown of an existing organization based on the organization identifier. - - @param orgId Identifier of the organization for which the details are required. - - @param parentDeploymentId Deployment on which the calling organization resides. + * @param orgId Identifier of the organization for which the details are required. + * @param parentDeploymentId Deployment on which the calling organization resides. */ func (a *APIClient) GetOrganizationUsage(orgId string, parentDeploymentId string) (types.DetailedUsage, *http.Response, error) { var ( diff --git a/service/cip/api_organizations_GetOrganizationUsages.go b/service/cip/api_organizations_GetOrganizationUsages.go index c446642..5fb7b05 100644 --- a/service/cip/api_organizations_GetOrganizationUsages.go +++ b/service/cip/api_organizations_GetOrganizationUsages.go @@ -1,24 +1,21 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetOrganizationUsages Get the credits usage details of all the given organizations. The response is paginated with a default limit of 100 organizations per page. - body - List of the organizations for which usage needs to be fetched. parentDeploymentId - Deployment on which the calling organization resides. optional - nil or *types.OrganizationsUsagesOpts - Optional Parameters: Limit (optional.Int32) - Limit the number of results returned in the response. The number of results returned may be less than the limit. Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. token is set to null when no more pages are left. - @return ListUsagesResponse */ func (a *APIClient) GetOrganizationUsages(body []string, parentDeploymentId string, localVarOptionals *types.OrganizationsUsagesOpts) (types.ListUsagesResponse, *http.Response, error) { diff --git a/service/cip/api_organizations_GetParentOrganizationDetails.go b/service/cip/api_organizations_GetParentOrganizationDetails.go index 652f483..ae00dae 100644 --- a/service/cip/api_organizations_GetParentOrganizationDetails.go +++ b/service/cip/api_organizations_GetParentOrganizationDetails.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetParentOrganizationDetails Get the credits usage and allocation details of the current organization. - parentDeploymentId - Deployment on which the calling organization resides. */ func (a *APIClient) GetParentOrganizationDetails(parentDeploymentId string) (types.ParentUsage, *http.Response, error) { diff --git a/service/cip/api_organizations_GetParentOrganizationInfo.go b/service/cip/api_organizations_GetParentOrganizationInfo.go index 655f157..076789d 100644 --- a/service/cip/api_organizations_GetParentOrganizationInfo.go +++ b/service/cip/api_organizations_GetParentOrganizationInfo.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetParentOrganizationInfo Get information about parent organization. - parentDeploymentId - Deployment on which the calling organization resides. */ func (a *APIClient) GetParentOrganizationInfo(parentDeploymentId string) (types.ParentOrgInfo, *http.Response, error) { diff --git a/service/cip/api_organizations_GetSubdomainLoginUrl.go b/service/cip/api_organizations_GetSubdomainLoginUrl.go index 1cec897..8296841 100644 --- a/service/cip/api_organizations_GetSubdomainLoginUrl.go +++ b/service/cip/api_organizations_GetSubdomainLoginUrl.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetSubdomainLoginUrl Get the login URL for the subdomain configured organization based on the organization identifier. - orgId - Identifier of the child organization for which the loginUrl is required. parentDeploymentId - Deployment on which the calling organization resides. */ diff --git a/service/cip/api_organizations_ListOrganizations.go b/service/cip/api_organizations_ListOrganizations.go index b071e66..8f046e5 100644 --- a/service/cip/api_organizations_ListOrganizations.go +++ b/service/cip/api_organizations_ListOrganizations.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ListOrganizations Get a list of all organizations in this account. The response is paginated with a default limit of 100 organizations per page. - parentDeploymentId - Deployment on which the calling organization resides. optional - nil or *types.ListOrganizationsOpts - Optional Parameters: Limit (optional.Int32) - Limit the number of organizations returned in the response. The number of organizations returned may be less than the `limit`. diff --git a/service/cip/api_organizations_UpdateOrganization.go b/service/cip/api_organizations_UpdateOrganization.go index 16d5e2f..bd3578f 100644 --- a/service/cip/api_organizations_UpdateOrganization.go +++ b/service/cip/api_organizations_UpdateOrganization.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateOrganization Update an existing organization's subscription based on its identifier. - body - The utilization baselines for the organization, which will determine their credits allocation. For organizations on Trial/Free plans, reallocating credits will upgrade their plan type to your plan. The plan change cannot be rolled back. parentDeploymentId - Deployment on which the calling organization resides. orgId - Identifier of the organization to update. diff --git a/service/cip/api_partition_CancelRetentionUpdate.go b/service/cip/api_partition_CancelRetentionUpdate.go index 91a542c..9db3778 100644 --- a/service/cip/api_partition_CancelRetentionUpdate.go +++ b/service/cip/api_partition_CancelRetentionUpdate.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CancelRetentionUpdate Cancel update to retention of a partition for which retention was updated previously using reduceRetentionPeriodImmediately parameter as false - id - Identifier of the partition to cancel the retention update for. */ func (a *APIClient) CancelRetentionUpdate(id string) (*http.Response, error) { diff --git a/service/cip/api_partition_CreatePartition.go b/service/cip/api_partition_CreatePartition.go index ce427b5..abf74b6 100644 --- a/service/cip/api_partition_CreatePartition.go +++ b/service/cip/api_partition_CreatePartition.go @@ -1,20 +1,18 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreatePartition Create a new partition. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param body Information about the new partition. - + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body Information about the new partition. @return Partition */ func (a *APIClient) CreatePartition(body types.CreatePartitionDefinition) (types.Partition, *http.Response, error) { diff --git a/service/cip/api_partition_DecommissionPartition.go b/service/cip/api_partition_DecommissionPartition.go index 554a0ac..167a563 100644 --- a/service/cip/api_partition_DecommissionPartition.go +++ b/service/cip/api_partition_DecommissionPartition.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DecommissionPartition Decommission a partition with the given identifier from the organization. - id - Identifier of the partition to decommission. */ func (a *APIClient) DecommissionPartition(id string) (*http.Response, error) { diff --git a/service/cip/api_partition_GetPartition.go b/service/cip/api_partition_GetPartition.go index d19b27b..99fb308 100644 --- a/service/cip/api_partition_GetPartition.go +++ b/service/cip/api_partition_GetPartition.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetPartition Get a partition with the given identifier from the organization. - id - Identifier of partition to return. */ func (a *APIClient) GetPartition(id string) (types.Partition, *http.Response, error) { diff --git a/service/cip/api_partition_ListPartitions.go b/service/cip/api_partition_ListPartitions.go index bc33942..9827058 100644 --- a/service/cip/api_partition_ListPartitions.go +++ b/service/cip/api_partition_ListPartitions.go @@ -1,25 +1,23 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ListPartitions Get a list of all partitions in the organization. The response is paginated with a default limit of 100 partitions per page. - - optional - nil or *types.PartitionOpts - Optional Parameters: - Limit (optional.Int32) - Limit the number of partitions returned in the response. The number of partitions returned may be less than the limit. - Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. token is set to null when no more pages are left. - ViewTypes (optional.Interface of []string) - The type of partitions to retrieve. More than one type of partitions can be retrieved in same request. Valid values are: - DefaultView To get General Index partition. - Partition To get user defined views/partitions. - AuditIndex: To get the internal audit indexes. + optional - nil or *types.PartitionOpts - Optional Parameters: + Limit (optional.Int32) - Limit the number of partitions returned in the response. The number of partitions returned may be less than the limit. + Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. token is set to null when no more pages are left. + ViewTypes (optional.Interface of []string) - The type of partitions to retrieve. More than one type of partitions can be retrieved in same request. Valid values are: + DefaultView To get General Index partition. + Partition To get user defined views/partitions. + AuditIndex: To get the internal audit indexes. */ func (a *APIClient) ListPartitions(localVarOptionals *types.PartitionOpts) (types.ListPartitionsResponse, *http.Response, error) { var ( diff --git a/service/cip/api_partition_UpdatePartition.go b/service/cip/api_partition_UpdatePartition.go index 0a8195c..c4436f7 100644 --- a/service/cip/api_partition_UpdatePartition.go +++ b/service/cip/api_partition_UpdatePartition.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdatePartition Update an existing partition in the organization. - body - Information to update about the partition. id - Identifier of the partition to update. */ diff --git a/service/cip/api_password_policy_GetPasswordPolicy.go b/service/cip/api_password_policy_GetPasswordPolicy.go index bb18c05..b3720ac 100644 --- a/service/cip/api_password_policy_GetPasswordPolicy.go +++ b/service/cip/api_password_policy_GetPasswordPolicy.go @@ -1,12 +1,11 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* diff --git a/service/cip/api_password_policy_SetPasswordPolicy.go b/service/cip/api_password_policy_SetPasswordPolicy.go index 4703b9e..f7dd4b5 100644 --- a/service/cip/api_password_policy_SetPasswordPolicy.go +++ b/service/cip/api_password_policy_SetPasswordPolicy.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* SetPasswordPolicy Update the current password policy. - body - Specify the password policy. */ func (a *APIClient) SetPasswordPolicy(body types.PasswordPolicy) (types.PasswordPolicy, *http.Response, error) { diff --git a/service/cip/api_policies_GetAuditPolicy.go b/service/cip/api_policies_GetAuditPolicy.go index 97e1b0f..0e4cdff 100644 --- a/service/cip/api_policies_GetAuditPolicy.go +++ b/service/cip/api_policies_GetAuditPolicy.go @@ -1,12 +1,11 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* diff --git a/service/cip/api_policies_GetDataAccessLevelPolicy.go b/service/cip/api_policies_GetDataAccessLevelPolicy.go index cd10fc7..03543b5 100644 --- a/service/cip/api_policies_GetDataAccessLevelPolicy.go +++ b/service/cip/api_policies_GetDataAccessLevelPolicy.go @@ -1,12 +1,11 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* diff --git a/service/cip/api_policies_GetMaxUserSessionTimeoutPolicy.go b/service/cip/api_policies_GetMaxUserSessionTimeoutPolicy.go index d438358..4dde712 100644 --- a/service/cip/api_policies_GetMaxUserSessionTimeoutPolicy.go +++ b/service/cip/api_policies_GetMaxUserSessionTimeoutPolicy.go @@ -1,12 +1,11 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* diff --git a/service/cip/api_policies_GetSearchAuditPolicy.go b/service/cip/api_policies_GetSearchAuditPolicy.go index 5d55cab..6594f3d 100644 --- a/service/cip/api_policies_GetSearchAuditPolicy.go +++ b/service/cip/api_policies_GetSearchAuditPolicy.go @@ -1,12 +1,11 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* diff --git a/service/cip/api_policies_GetShareDashboardsOutsideOrganizationPolicy.go b/service/cip/api_policies_GetShareDashboardsOutsideOrganizationPolicy.go index 980fd8a..783a52e 100644 --- a/service/cip/api_policies_GetShareDashboardsOutsideOrganizationPolicy.go +++ b/service/cip/api_policies_GetShareDashboardsOutsideOrganizationPolicy.go @@ -1,12 +1,11 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* diff --git a/service/cip/api_policies_GetUserConcurrentSessionsLimitPolicy.go b/service/cip/api_policies_GetUserConcurrentSessionsLimitPolicy.go index ab782d9..4707b3a 100644 --- a/service/cip/api_policies_GetUserConcurrentSessionsLimitPolicy.go +++ b/service/cip/api_policies_GetUserConcurrentSessionsLimitPolicy.go @@ -1,12 +1,11 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* diff --git a/service/cip/api_policies_SetAuditPolicy.go b/service/cip/api_policies_SetAuditPolicy.go index d062528..64d7974 100644 --- a/service/cip/api_policies_SetAuditPolicy.go +++ b/service/cip/api_policies_SetAuditPolicy.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* SetAuditPolicy Set the Audit policy. This policy specifies whether audit records for your account are enabled. You can access details about reported account events in the Sumo Logic Audit Index. [Learn More](https://help.sumologic.com/Manage/Security/Audit-Index) - body - Specifies if the policy is enabled or not */ func (a *APIClient) SetAuditPolicy(body types.AuditPolicy) (types.AuditPolicy, *http.Response, error) { diff --git a/service/cip/api_policies_SetDataAccessLevelPolicy.go b/service/cip/api_policies_SetDataAccessLevelPolicy.go index d6e9169..b6d21aa 100644 --- a/service/cip/api_policies_SetDataAccessLevelPolicy.go +++ b/service/cip/api_policies_SetDataAccessLevelPolicy.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* SetDataAccessLevelPolicy Set the Data Access Level policy. When enabled, this policy sets the default data access level for all newly created dashboards to the viewer’s role access filter. Otherwise, newly created dashboards will default to the sharer’s role access filter and might display data that viewers’ roles don’t allow them to view. [Learn More](https://help.sumologic.com/Manage/Security/Data_Access_Level_for_Shared_Dashboards) - body - Specifies if the policy is enabled or not */ func (a *APIClient) SetDataAccessLevelPolicy(body types.DataAccessLevelPolicy) (types.DataAccessLevelPolicy, *http.Response, error) { diff --git a/service/cip/api_policies_SetMaxUserSessionTimeoutPolicy.go b/service/cip/api_policies_SetMaxUserSessionTimeoutPolicy.go index 62521e8..bf338e8 100644 --- a/service/cip/api_policies_SetMaxUserSessionTimeoutPolicy.go +++ b/service/cip/api_policies_SetMaxUserSessionTimeoutPolicy.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* SetMaxUserSessionTimeoutPolicy Set the Max User Session Timeout policy. When enabled, this policy sets the maximum web session timeout users are able to configure within their user preferences. Users preferences will be updated to match this value only if their current preference is set to a higher value. [Learn More](https://help.sumologic.com/Manage/Security/Set_a_Maximum_Web_Session_Timeout) - body - Specifies if the policy is enabled or not */ func (a *APIClient) SetMaxUserSessionTimeoutPolicy(body types.MaxUserSessionTimeoutPolicy) (types.MaxUserSessionTimeoutPolicy, *http.Response, error) { diff --git a/service/cip/api_policies_SetSearchAuditPolicy.go b/service/cip/api_policies_SetSearchAuditPolicy.go index bb21b3e..151e420 100644 --- a/service/cip/api_policies_SetSearchAuditPolicy.go +++ b/service/cip/api_policies_SetSearchAuditPolicy.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* SetSearchAuditPolicy Set the Search Audit policy. This policy specifies whether search records for your account are enabled. You can access details about your account's search capacity, queries run by users from the Sumo Search Audit Index. [Learn More](https://help.sumologic.com/Manage/Security/Search_Audit_Index) - body - Specifies if the policy is enabled or not */ func (a *APIClient) SetSearchAuditPolicy(body types.SearchAuditPolicy) (types.SearchAuditPolicy, *http.Response, error) { diff --git a/service/cip/api_policies_SetShareDashboardsOutsideOrganizationPolicy.go b/service/cip/api_policies_SetShareDashboardsOutsideOrganizationPolicy.go index 21b7fc3..89283c3 100644 --- a/service/cip/api_policies_SetShareDashboardsOutsideOrganizationPolicy.go +++ b/service/cip/api_policies_SetShareDashboardsOutsideOrganizationPolicy.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* SetShareDashboardsOutsideOrganizationPolicy Set the Share Dashboards Outside Organization policy. This policy allows users to share the dashboard with view only privileges outside of the organization (capability must be enabled from the Roles page). Disabling this policy will disable all dashboards that have been shared outside of the organization. [Learn More](https://help.sumologic.com/Visualizations-and-Alerts/Dashboards/Share_Dashboards/Share_a_Dashboard_Outside_Your_Org) - body - Specifies if the policy is enabled or not */ func (a *APIClient) SetShareDashboardsOutsideOrganizationPolicy(body types.ShareDashboardsOutsideOrganizationPolicy) (types.ShareDashboardsOutsideOrganizationPolicy, *http.Response, error) { diff --git a/service/cip/api_policies_SetUserConcurrentSessionsLimitPolicy.go b/service/cip/api_policies_SetUserConcurrentSessionsLimitPolicy.go index a27fd33..7609315 100644 --- a/service/cip/api_policies_SetUserConcurrentSessionsLimitPolicy.go +++ b/service/cip/api_policies_SetUserConcurrentSessionsLimitPolicy.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* SetUserConcurrentSessionsLimitPolicy Set the User Concurrent Sessions Limit policy. When enabled, the number of concurrent sessions a user may have is limited to the value entered. If a user exceeds the allowed number of sessions, the user's oldest session will be logged out to accommodate the new one. Disabling this policy means a user may have an unlimited number of concurrent sessions. [Learn More](https://help.sumologic.com/Manage/Security/Set_a_Limit_for_User_Concurrent_Sessions) - body - Specifies if the policy is enabled or not */ func (a *APIClient) SetUserConcurrentSessionsLimitPolicy(body types.UserConcurrentSessionsLimitPolicy) (types.UserConcurrentSessionsLimitPolicy, *http.Response, error) { diff --git a/service/cip/api_role_AssignRoleToUser.go b/service/cip/api_role_AssignRoleToUser.go index ab45b67..6c1f3f4 100644 --- a/service/cip/api_role_AssignRoleToUser.go +++ b/service/cip/api_role_AssignRoleToUser.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* AssignRoleToUser Assigns a role to a user in the organization. - roleId - Identifier of the role to assign. userId - Identifier of the user to assign the role to. */ diff --git a/service/cip/api_role_CreateRole.go b/service/cip/api_role_CreateRole.go index 39ea5b7..667e4b3 100644 --- a/service/cip/api_role_CreateRole.go +++ b/service/cip/api_role_CreateRole.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateRole Create a new role in the organization. - body - Information about the new role. */ func (a *APIClient) CreateRole(body types.CreateRoleDefinition) (types.RoleModel, *http.Response, error) { diff --git a/service/cip/api_role_DeleteRole.go b/service/cip/api_role_DeleteRole.go index b2eb05f..d03c7d4 100644 --- a/service/cip/api_role_DeleteRole.go +++ b/service/cip/api_role_DeleteRole.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteRole Delete a role with the given identifier from the organization. - id - Identifier of the role to delete. */ func (a *APIClient) DeleteRole(id string) (*http.Response, error) { diff --git a/service/cip/api_role_GetRole.go b/service/cip/api_role_GetRole.go index 2b4e08b..c289393 100644 --- a/service/cip/api_role_GetRole.go +++ b/service/cip/api_role_GetRole.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetRole Get a role with the given identifier in the organization. - id - Identifier of the role to fetch. */ func (a *APIClient) GetRole(id string) (types.RoleModel, *http.Response, error) { diff --git a/service/cip/api_role_ListRoles.go b/service/cip/api_role_ListRoles.go index b00a410..16f7ea5 100644 --- a/service/cip/api_role_ListRoles.go +++ b/service/cip/api_role_ListRoles.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ListRoles Get a list of all the roles in the organization. The response is paginated with a default limit of 100 roles per page. - optional - nil or *types.ListRolesOpts - Optional Parameters: Limit (optional.Int32) - Limit the number of roles returned in the response. The number of roles returned may be less than the `limit`. Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. Token is set to null when no more pages are left. diff --git a/service/cip/api_role_RemoveRoleFromUser.go b/service/cip/api_role_RemoveRoleFromUser.go index 9c3e8be..9166d07 100644 --- a/service/cip/api_role_RemoveRoleFromUser.go +++ b/service/cip/api_role_RemoveRoleFromUser.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* RemoveRoleFromUser Remove a role from a user in the organization. - roleId - Identifier of the role to delete. userId - Identifier of the user to remove the role from. */ diff --git a/service/cip/api_role_UpdateRole.go b/service/cip/api_role_UpdateRole.go index 037d612..c91c7d5 100644 --- a/service/cip/api_role_UpdateRole.go +++ b/service/cip/api_role_UpdateRole.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateRole Update an existing role in the organization. - body - Information to update about the role. id - Identifier of the role to update. */ diff --git a/service/cip/api_saml_configuration_CreateAllowlistedUser.go b/service/cip/api_saml_configuration_CreateAllowlistedUser.go index 29b722f..5fe241c 100644 --- a/service/cip/api_saml_configuration_CreateAllowlistedUser.go +++ b/service/cip/api_saml_configuration_CreateAllowlistedUser.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateAllowlistedUser Allowlist a user from SAML lockdown allowing them to sign in using a password in addition to SAML. - userId - Identifier of the user. */ func (a *APIClient) CreateAllowlistedUser(userId string) (types.AllowlistedUserResult, *http.Response, error) { diff --git a/service/cip/api_saml_configuration_CreateIdentityProvider.go b/service/cip/api_saml_configuration_CreateIdentityProvider.go index 48a2a2c..8d6a06c 100644 --- a/service/cip/api_saml_configuration_CreateIdentityProvider.go +++ b/service/cip/api_saml_configuration_CreateIdentityProvider.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateIdentityProvider Create a new SAML configuration in the organization. - body - The configuration of the SAML identity provider. */ func (a *APIClient) CreateIdentityProvider(body types.SamlIdentityProviderRequest) (types.SamlIdentityProvider, *http.Response, error) { diff --git a/service/cip/api_saml_configuration_DeleteAllowlistedUser.go b/service/cip/api_saml_configuration_DeleteAllowlistedUser.go index bd6e4d6..caea2ac 100644 --- a/service/cip/api_saml_configuration_DeleteAllowlistedUser.go +++ b/service/cip/api_saml_configuration_DeleteAllowlistedUser.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteAllowlistedUser Remove an allowlisted user requiring them to sign in using SAML. - userId - Identifier of user that will no longer be allowlisted from SAML Lockdown. */ func (a *APIClient) DeleteAllowlistedUser(userId string) (*http.Response, error) { diff --git a/service/cip/api_saml_configuration_DeleteIdentityProvider.go b/service/cip/api_saml_configuration_DeleteIdentityProvider.go index 7545e0f..a1e8761 100644 --- a/service/cip/api_saml_configuration_DeleteIdentityProvider.go +++ b/service/cip/api_saml_configuration_DeleteIdentityProvider.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteIdentityProvider Delete a SAML configuration with the given identifier from the organization. - id - Identifier of the SAML configuration to delete. */ func (a *APIClient) DeleteIdentityProvider(id string) (*http.Response, error) { diff --git a/service/cip/api_saml_configuration_DisableSamlLockdown.go b/service/cip/api_saml_configuration_DisableSamlLockdown.go index acf7d3e..46aaaf4 100644 --- a/service/cip/api_saml_configuration_DisableSamlLockdown.go +++ b/service/cip/api_saml_configuration_DisableSamlLockdown.go @@ -1,12 +1,11 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* diff --git a/service/cip/api_saml_configuration_EnableSamlLockdown.go b/service/cip/api_saml_configuration_EnableSamlLockdown.go index fb1e524..b56e7e3 100644 --- a/service/cip/api_saml_configuration_EnableSamlLockdown.go +++ b/service/cip/api_saml_configuration_EnableSamlLockdown.go @@ -1,12 +1,11 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* diff --git a/service/cip/api_saml_configuration_GetAllowlistedUsers.go b/service/cip/api_saml_configuration_GetAllowlistedUsers.go index 65ab54a..b9cff3b 100644 --- a/service/cip/api_saml_configuration_GetAllowlistedUsers.go +++ b/service/cip/api_saml_configuration_GetAllowlistedUsers.go @@ -1,12 +1,11 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* diff --git a/service/cip/api_saml_configuration_GetIdentityProviders.go b/service/cip/api_saml_configuration_GetIdentityProviders.go index 4967365..fb3ee1e 100644 --- a/service/cip/api_saml_configuration_GetIdentityProviders.go +++ b/service/cip/api_saml_configuration_GetIdentityProviders.go @@ -1,12 +1,11 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* diff --git a/service/cip/api_saml_configuration_UpdateIdentityProvider.go b/service/cip/api_saml_configuration_UpdateIdentityProvider.go index a99492f..1bb710e 100644 --- a/service/cip/api_saml_configuration_UpdateIdentityProvider.go +++ b/service/cip/api_saml_configuration_UpdateIdentityProvider.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateIdentityProvider Update an existing SAML configuration in the organization. - body - Information to update in the SAML configuration. id - Identifier of the SAML configuration to update. */ diff --git a/service/cip/api_scheduled_view_CreateScheduledView.go b/service/cip/api_scheduled_view_CreateScheduledView.go index ac9cd1a..9992066 100644 --- a/service/cip/api_scheduled_view_CreateScheduledView.go +++ b/service/cip/api_scheduled_view_CreateScheduledView.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateScheduledView Creates a new scheduled view in the organization. - body - Information about the new scheduled view. */ func (a *APIClient) CreateScheduledView(body types.CreateScheduledViewDefinition) (types.ScheduledView, *http.Response, error) { diff --git a/service/cip/api_scheduled_view_DisableScheduledView.go b/service/cip/api_scheduled_view_DisableScheduledView.go index 0faa2af..9fcea41 100644 --- a/service/cip/api_scheduled_view_DisableScheduledView.go +++ b/service/cip/api_scheduled_view_DisableScheduledView.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DisableScheduledView Disable a scheduled view with the given identifier. - id - Identifier of the scheduled view to disable. */ func (a *APIClient) DisableScheduledView(id string) (*http.Response, error) { diff --git a/service/cip/api_scheduled_view_GetScheduledView.go b/service/cip/api_scheduled_view_GetScheduledView.go index 09386e2..f250acd 100644 --- a/service/cip/api_scheduled_view_GetScheduledView.go +++ b/service/cip/api_scheduled_view_GetScheduledView.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetScheduledView Get a scheduled view with the given identifier. - id - Identifier of the scheduled view to fetch. */ func (a *APIClient) GetScheduledView(id string) (types.ScheduledView, *http.Response, error) { diff --git a/service/cip/api_scheduled_view_ListScheduledViews.go b/service/cip/api_scheduled_view_ListScheduledViews.go index 351e4bb..19eb5d3 100644 --- a/service/cip/api_scheduled_view_ListScheduledViews.go +++ b/service/cip/api_scheduled_view_ListScheduledViews.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ListScheduledViews Get a list of all scheduled views in the organization. The response is paginated with a default limit of 100 scheduled views per page. - optional - nil or *types.ScheduledViewsOpts - Optional Parameters: Limit (optional.Int32) - Limit the number of scheduled views returned in the response. The number of scheduled views returned may be less than the limit. Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. token is set to null when no more pages are left. diff --git a/service/cip/api_scheduled_view_PauseScheduledView.go b/service/cip/api_scheduled_view_PauseScheduledView.go index aced6c0..c3f3da7 100644 --- a/service/cip/api_scheduled_view_PauseScheduledView.go +++ b/service/cip/api_scheduled_view_PauseScheduledView.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* PauseScheduledView Pause a scheduled view with the given identifier. - id - Identifier of the scheduled view to pause. */ func (a *APIClient) PauseScheduledView(id string) (types.ScheduledView, *http.Response, error) { diff --git a/service/cip/api_scheduled_view_StartScheduledView.go b/service/cip/api_scheduled_view_StartScheduledView.go index 54d5e7b..6cce75d 100644 --- a/service/cip/api_scheduled_view_StartScheduledView.go +++ b/service/cip/api_scheduled_view_StartScheduledView.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* StartScheduledView Start a scheduled view with the given identifier. - id - Identifier of the scheduled view to start. */ func (a *APIClient) StartScheduledView(id string) (types.ScheduledView, *http.Response, error) { diff --git a/service/cip/api_scheduled_view_UpdateScheduledView.go b/service/cip/api_scheduled_view_UpdateScheduledView.go index 6e6a1a9..a919924 100644 --- a/service/cip/api_scheduled_view_UpdateScheduledView.go +++ b/service/cip/api_scheduled_view_UpdateScheduledView.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateScheduledView Update an existing scheduled view. - body - Information to update about the scheduled view. id - Identifier of the scheduled view to update. */ diff --git a/service/cip/api_service_allowlist_AddAllowlistedCidrs.go b/service/cip/api_service_allowlist_AddAllowlistedCidrs.go index 49c111d..c0e50af 100644 --- a/service/cip/api_service_allowlist_AddAllowlistedCidrs.go +++ b/service/cip/api_service_allowlist_AddAllowlistedCidrs.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* AddAllowlistedCidrs Add CIDR notations and/or IP addresses to the allowlist of the organization if not already there. When service allowlisting functionality is enabled, CIDRs/IP addresses that are allowlisted will have access to Sumo Logic and/or content sharing. - body - List of all CIDR notations and/or IP addresses to be added to the allowlist of the organization. */ func (a *APIClient) AddAllowlistedCidrs(body types.CidrList) (types.CidrList, *http.Response, error) { diff --git a/service/cip/api_service_allowlist_DeleteAllowlistedCidrs.go b/service/cip/api_service_allowlist_DeleteAllowlistedCidrs.go index f8af6ff..7b1db1f 100644 --- a/service/cip/api_service_allowlist_DeleteAllowlistedCidrs.go +++ b/service/cip/api_service_allowlist_DeleteAllowlistedCidrs.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteAllowlistedCidrs Remove allowlisted CIDR notations and/or IP addresses from the organization. Removed CIDRs/IPs will immediately lose access to Sumo Logic and content sharing. - body - List of all CIDR notations and/or IP addresses to be removed from the allowlist of the organization. */ func (a *APIClient) DeleteAllowlistedCidrs(body types.CidrList) (types.CidrList, *http.Response, error) { diff --git a/service/cip/api_service_allowlist_DisableAllowlisting.go b/service/cip/api_service_allowlist_DisableAllowlisting.go index 34ad250..f864467 100644 --- a/service/cip/api_service_allowlist_DisableAllowlisting.go +++ b/service/cip/api_service_allowlist_DisableAllowlisting.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DisableAllowlisting Disable service allowlisting functionality for login/API authentication or content sharing for the organization. - allowlistType - The type of allowlisting to be disabled. It can be one of: Login, Content, or Both. */ func (a *APIClient) DisableAllowlisting(allowlistType string) (*http.Response, error) { diff --git a/service/cip/api_service_allowlist_EnableAllowlisting.go b/service/cip/api_service_allowlist_EnableAllowlisting.go index 3f1a995..39100c6 100644 --- a/service/cip/api_service_allowlist_EnableAllowlisting.go +++ b/service/cip/api_service_allowlist_EnableAllowlisting.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* EnableAllowlisting Enable service allowlisting functionality for the organization. The service allowlisting can be for 1. Login: If enabled, access to Sumo Logic is granted only to CIDRs/IP addresses that are allowlisted. 2. Content: If enabled, dashboards can be shared with users connecting from CIDRs/IP addresses that are allowlisted without logging in. - allowlistType - The type of allowlisting to be enabled. It can be one of: Login, Content, or Both. */ func (a *APIClient) EnableAllowlisting(allowlistType string) (*http.Response, error) { diff --git a/service/cip/api_service_allowlist_GetAllowlistingStatus.go b/service/cip/api_service_allowlist_GetAllowlistingStatus.go index 8b1d310..d3e2182 100644 --- a/service/cip/api_service_allowlist_GetAllowlistingStatus.go +++ b/service/cip/api_service_allowlist_GetAllowlistingStatus.go @@ -1,12 +1,11 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* diff --git a/service/cip/api_service_allowlist_ListAllowlistedCidrs.go b/service/cip/api_service_allowlist_ListAllowlistedCidrs.go index 077fb2e..75d8f66 100644 --- a/service/cip/api_service_allowlist_ListAllowlistedCidrs.go +++ b/service/cip/api_service_allowlist_ListAllowlistedCidrs.go @@ -1,12 +1,11 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* diff --git a/service/cip/api_sources_CreateAWSS3ArchiveSource.go b/service/cip/api_sources_CreateAWSS3ArchiveSource.go index 38016bc..78f90fc 100644 --- a/service/cip/api_sources_CreateAWSS3ArchiveSource.go +++ b/service/cip/api_sources_CreateAWSS3ArchiveSource.go @@ -12,7 +12,6 @@ import ( /* CreateAWSS3ArchiveSource Create an AWS S3 Archive source. - body - The definition of the AWS S3 Archive source. collectorId - The identifier of the Sumo Logic collector to assign the source to. */ diff --git a/service/cip/api_sources_CreateEventHubSource.go b/service/cip/api_sources_CreateEventHubSource.go index a44c29c..e1208f0 100644 --- a/service/cip/api_sources_CreateEventHubSource.go +++ b/service/cip/api_sources_CreateEventHubSource.go @@ -12,7 +12,6 @@ import ( /* CreateEventHubSource Create an Azure Event Hub source. - body - The definition of the Event Hub source. collectorId - The identifier of the Sumo Logic collector to assign the source to. */ diff --git a/service/cip/api_sources_DeleteSource.go b/service/cip/api_sources_DeleteSource.go index 8601838..c3d1e1a 100644 --- a/service/cip/api_sources_DeleteSource.go +++ b/service/cip/api_sources_DeleteSource.go @@ -12,7 +12,6 @@ import ( /* DeleteSource Deletes the specified source from the specified collector. - collectorId - Identifier of the collector that the source is attached to. sourceId - Identifier of the source. */ diff --git a/service/cip/api_sources_GetAWSS3ArchiveSource.go b/service/cip/api_sources_GetAWSS3ArchiveSource.go index e4c32a6..b04af9c 100644 --- a/service/cip/api_sources_GetAWSS3ArchiveSource.go +++ b/service/cip/api_sources_GetAWSS3ArchiveSource.go @@ -12,7 +12,6 @@ import ( /* GetAWSS3ArchiveSource Get information about an AWS S3 Archive source. - collectorId - The identifier of the Sumo Logic collector that the source is assigned to. sourceId - The identifier of the Sumo Logic AWS S3 Archive source. */ diff --git a/service/cip/api_sources_GetEventHubSource.go b/service/cip/api_sources_GetEventHubSource.go index 237615d..51b829c 100644 --- a/service/cip/api_sources_GetEventHubSource.go +++ b/service/cip/api_sources_GetEventHubSource.go @@ -12,7 +12,6 @@ import ( /* GetEventHubSource Get information about an Azure Event Hub source. - collectorId - The identifier of the Sumo Logic collector that the source is assigned to. sourceId - The identifier of the Sumo Logic Azure Event Hub source. */ diff --git a/service/cip/api_sources_UpdateEventHubSource.go b/service/cip/api_sources_UpdateEventHubSource.go index daa23f6..9738231 100644 --- a/service/cip/api_sources_UpdateEventHubSource.go +++ b/service/cip/api_sources_UpdateEventHubSource.go @@ -12,7 +12,6 @@ import ( /* UpdateEventHubSource Update an Azure Event Hub source. - body - The definition of the Event Hub source. collectorId - The identifier of the Sumo Logic collector that the source is assigned to. sourceId - The identifier of the Sumo Logic source. diff --git a/service/cip/api_tokens_CreateToken.go b/service/cip/api_tokens_CreateToken.go index 4af40e4..a9e5821 100644 --- a/service/cip/api_tokens_CreateToken.go +++ b/service/cip/api_tokens_CreateToken.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateToken Create a token in the token library. - body - Information about the token to create. */ func (a *APIClient) CreateToken(body types.TokenBaseDefinition) (types.TokenBaseResponse, *http.Response, error) { diff --git a/service/cip/api_tokens_DeleteToken.go b/service/cip/api_tokens_DeleteToken.go index 0d568d7..815652a 100644 --- a/service/cip/api_tokens_DeleteToken.go +++ b/service/cip/api_tokens_DeleteToken.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteToken Delete a token with the given identifier in the token library. - id - Identifier of the token to delete. */ func (a *APIClient) DeleteToken(id string) (*http.Response, error) { diff --git a/service/cip/api_tokens_GetToken.go b/service/cip/api_tokens_GetToken.go index 2ad21e5..f9e6e81 100644 --- a/service/cip/api_tokens_GetToken.go +++ b/service/cip/api_tokens_GetToken.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetToken Get a token with the given identifier in the token library. - id - Identifier of the token to return. */ func (a *APIClient) GetToken(id string) (types.TokenBaseResponse, *http.Response, error) { diff --git a/service/cip/api_tokens_ListTokens.go b/service/cip/api_tokens_ListTokens.go index 4c9e0a9..f311d7b 100644 --- a/service/cip/api_tokens_ListTokens.go +++ b/service/cip/api_tokens_ListTokens.go @@ -1,12 +1,11 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* diff --git a/service/cip/api_tokens_UpdateToken.go b/service/cip/api_tokens_UpdateToken.go index 131350f..3b52dc8 100644 --- a/service/cip/api_tokens_UpdateToken.go +++ b/service/cip/api_tokens_UpdateToken.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateToken Update a token with the given identifier in the token library. - body - The token to update. id - Identifier of the token to update. */ diff --git a/service/cip/api_transformation_rule_CreateTransformationRule.go b/service/cip/api_transformation_rule_CreateTransformationRule.go index 1bd3895..0a2bafa 100644 --- a/service/cip/api_transformation_rule_CreateTransformationRule.go +++ b/service/cip/api_transformation_rule_CreateTransformationRule.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateTransformationRule Create a new transformation rule. - body - The configuration of the transformation rule to create. */ func (a *APIClient) CreateTransformationRule(body types.TransformationRuleRequest) (types.TransformationRuleResponse, *http.Response, error) { diff --git a/service/cip/api_transformation_rule_DeleteTransformationRule.go b/service/cip/api_transformation_rule_DeleteTransformationRule.go index f498503..84b62f1 100644 --- a/service/cip/api_transformation_rule_DeleteTransformationRule.go +++ b/service/cip/api_transformation_rule_DeleteTransformationRule.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteTransformationRule Delete a transformation rule with the given identifier. - id - Identifier of the transformation rule to delete. */ func (a *APIClient) DeleteTransformationRule(id string) (*http.Response, error) { diff --git a/service/cip/api_transformation_rule_GetTransformationRule.go b/service/cip/api_transformation_rule_GetTransformationRule.go index b0b1fb2..d54996e 100644 --- a/service/cip/api_transformation_rule_GetTransformationRule.go +++ b/service/cip/api_transformation_rule_GetTransformationRule.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetTransformationRule Get a transformation rule with the given identifier. - id - Identifier of transformation rule to return. */ func (a *APIClient) GetTransformationRule(id string) (types.TransformationRuleResponse, *http.Response, error) { diff --git a/service/cip/api_transformation_rule_ListTransformationRules.go b/service/cip/api_transformation_rule_ListTransformationRules.go index d9f6bc8..a8a84f5 100644 --- a/service/cip/api_transformation_rule_ListTransformationRules.go +++ b/service/cip/api_transformation_rule_ListTransformationRules.go @@ -1,21 +1,19 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ListTransformationRules Get a list of transformation rules in the organization. The response is paginated with a default limit of 100 rules per page. - - optional - nil or *types.TransformationRulesOpts - Optional Parameters: - Limit (optional.Int32) - Limit the number of transformation rules returned in the response. - Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. token is set to null when no more pages are left. + optional - nil or *types.TransformationRulesOpts - Optional Parameters: + Limit (optional.Int32) - Limit the number of transformation rules returned in the response. + Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. token is set to null when no more pages are left. */ func (a *APIClient) ListTransformationRules(localVarOptionals *types.TransformationRulesOpts) (types.TransformationRulesResponse, *http.Response, error) { var ( diff --git a/service/cip/api_transformation_rule_UpdateTransformationRule.go b/service/cip/api_transformation_rule_UpdateTransformationRule.go index 8938469..c478c06 100644 --- a/service/cip/api_transformation_rule_UpdateTransformationRule.go +++ b/service/cip/api_transformation_rule_UpdateTransformationRule.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateTransformationRule Update an existing transformation rule. All properties specified in the request are replaced. - body - Information to update about the transformation rule. id - Identifier of the transformation rule to update. */ diff --git a/service/cip/api_user_CreateUser.go b/service/cip/api_user_CreateUser.go index 00b3d38..c4cb582 100644 --- a/service/cip/api_user_CreateUser.go +++ b/service/cip/api_user_CreateUser.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* CreateUser Create a new user in the organization. - body - Information about the new user. */ func (a *APIClient) CreateUser(body types.CreateUserDefinition) (types.UserModel, *http.Response, error) { diff --git a/service/cip/api_user_DeleteUser.go b/service/cip/api_user_DeleteUser.go index 05d395c..a3e0a43 100644 --- a/service/cip/api_user_DeleteUser.go +++ b/service/cip/api_user_DeleteUser.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DeleteUser Delete a user with the given identifier from the organization and transfer their content to the user with the identifier specified in transferTo. If transferTo is not specified the contents are deleted. - id - Identifier of the user to delete. optional - nil or *types.DeleteUserOpts - Optional Parameters: TransferTo (optional.String) - Identifier of the user to receive the transfer of content from the deleted user. diff --git a/service/cip/api_user_DisableMfa.go b/service/cip/api_user_DisableMfa.go index 2fcfec3..08304e3 100644 --- a/service/cip/api_user_DisableMfa.go +++ b/service/cip/api_user_DisableMfa.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* DisableMfa Disable multi-factor authentication for given user. - body - Email and Password of the user to disable MFA for. id - Identifier of the user to disable MFA for. */ diff --git a/service/cip/api_user_GetUser.go b/service/cip/api_user_GetUser.go index 635fb0f..96cda77 100644 --- a/service/cip/api_user_GetUser.go +++ b/service/cip/api_user_GetUser.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* GetUser Get a user with the given identifier from the organization. - id - Identifier of user to return. */ func (a *APIClient) GetUser(id string) (types.UserModel, *http.Response, error) { diff --git a/service/cip/api_user_ListUsers.go b/service/cip/api_user_ListUsers.go index d988d3f..1db8fb5 100644 --- a/service/cip/api_user_ListUsers.go +++ b/service/cip/api_user_ListUsers.go @@ -1,18 +1,16 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ListUsers Get a list of all users in the organization. The response is paginated with a default limit of 100 users per page. - optional - nil or *types.ListUsersOpts - Optional Parameters: Limit (optional.Int32) - Limit the number of users returned in the response. The number of users returned may be less than the limit. Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. token is set to null when no more pages are left. diff --git a/service/cip/api_user_RequestChangeEmail.go b/service/cip/api_user_RequestChangeEmail.go index e5b4228..d0d269c 100644 --- a/service/cip/api_user_RequestChangeEmail.go +++ b/service/cip/api_user_RequestChangeEmail.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* RequestChangeEmail An email with an activation link is sent to the user’s new email address. The user must click the link in the email within seven days to complete the email address change, or the link will expire. - body - New email address of the user. id - Identifier of the user to change email address. */ diff --git a/service/cip/api_user_ResetPassword.go b/service/cip/api_user_ResetPassword.go index e8b4304..88012f2 100644 --- a/service/cip/api_user_ResetPassword.go +++ b/service/cip/api_user_ResetPassword.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ResetPassword Reset a user's password. - id - Identifier of the user to reset password. */ func (a *APIClient) ResetPassword(id string) (*http.Response, error) { diff --git a/service/cip/api_user_UnlockUser.go b/service/cip/api_user_UnlockUser.go index 9298931..5bd7a1e 100644 --- a/service/cip/api_user_UnlockUser.go +++ b/service/cip/api_user_UnlockUser.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UnlockUser Unlock another user's account. - id - The id of the user that needs to be unlocked. */ func (a *APIClient) UnlockUser(id string) (*http.Response, error) { diff --git a/service/cip/api_user_UpdateUser.go b/service/cip/api_user_UpdateUser.go index 436cabd..c50bf3f 100644 --- a/service/cip/api_user_UpdateUser.go +++ b/service/cip/api_user_UpdateUser.go @@ -2,18 +2,16 @@ package cip import ( "fmt" + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* UpdateUser Update an existing user in the organization. - body - Information to update about the user. id - Identifier of the user to update. */ From 6d2d368efd96b7d310b921167cf5bcf82246eaf7 Mon Sep 17 00:00:00 2001 From: Chris Lee Date: Mon, 23 Dec 2024 10:50:26 -0800 Subject: [PATCH 3/4] undo: go fmt stragglers --- service/cip/api_health_events_ListAllHealthEvents.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/service/cip/api_health_events_ListAllHealthEvents.go b/service/cip/api_health_events_ListAllHealthEvents.go index 1e60f25..2c5781a 100644 --- a/service/cip/api_health_events_ListAllHealthEvents.go +++ b/service/cip/api_health_events_ListAllHealthEvents.go @@ -1,21 +1,19 @@ package cip import ( + "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" "io/ioutil" "net/http" "net/url" "strings" - - "github.com/SumoLogic-Labs/sumologic-go-sdk/service/cip/types" ) /* ListAllHealthEvents Get a list of all the unresolved health events in your account. - - optional - nil or *types.HealthEventsOpts - Optional Parameters: - Limit (optional.Int32) - Limit the number of health events returned in the response. The number of health events returned may be less than the limit. - Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. token is set to null when no more pages are left. + optional - nil or *types.HealthEventsOpts - Optional Parameters: + Limit (optional.Int32) - Limit the number of health events returned in the response. The number of health events returned may be less than the limit. + Token (optional.String) - Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. token is set to null when no more pages are left. */ func (a *APIClient) ListAllHealthEvents(localVarOptionals *types.HealthEventsOpts) (types.ListHealthEventResponse, *http.Response, error) { var ( From d99e5418c25d799f1ebe3e53352ebbe90f79b5f2 Mon Sep 17 00:00:00 2001 From: Chris Lee Date: Mon, 23 Dec 2024 11:08:00 -0800 Subject: [PATCH 4/4] fix: add fix back in for file I accidentally changed --- service/cip/api_health_events_ListAllHealthEvents.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/service/cip/api_health_events_ListAllHealthEvents.go b/service/cip/api_health_events_ListAllHealthEvents.go index 2c5781a..400ade3 100644 --- a/service/cip/api_health_events_ListAllHealthEvents.go +++ b/service/cip/api_health_events_ListAllHealthEvents.go @@ -97,10 +97,12 @@ func (a *APIClient) ListAllHealthEvents(localVarOptionals *types.HealthEventsOpt newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr } - if v.Errors[0].Meta.Reason != "" { - newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason - } else { - newErr.error = v.Errors[0].Message + if len(v.Errors) > 0 { + if v.Errors[0].Meta.Reason != "" { + newErr.error = v.Errors[0].Message + ": " + v.Errors[0].Meta.Reason + } else { + newErr.error = v.Errors[0].Message + } } return localVarReturnValue, localVarHttpResponse, newErr }