diff --git a/service/cip/api_access_key_CreateAccessKey.go b/service/cip/api_access_key_CreateAccessKey.go index 1fe4766..d4614a4 100644 --- a/service/cip/api_access_key_CreateAccessKey.go +++ b/service/cip/api_access_key_CreateAccessKey.go @@ -94,10 +94,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..6620477 100644 --- a/service/cip/api_access_key_DeleteAccessKey.go +++ b/service/cip/api_access_key_DeleteAccessKey.go @@ -75,10 +75,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..f954e5e 100644 --- a/service/cip/api_access_key_ListAccessKeys.go +++ b/service/cip/api_access_key_ListAccessKeys.go @@ -97,10 +97,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..a59fcfe 100644 --- a/service/cip/api_access_key_ListPersonalAccessKeys.go +++ b/service/cip/api_access_key_ListPersonalAccessKeys.go @@ -88,10 +88,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..59f531a 100644 --- a/service/cip/api_access_key_UpdateAccessKey.go +++ b/service/cip/api_access_key_UpdateAccessKey.go @@ -94,10 +94,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..45b5c6a 100644 --- a/service/cip/api_account_CreateSubdomain.go +++ b/service/cip/api_account_CreateSubdomain.go @@ -91,10 +91,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..c3f4664 100644 --- a/service/cip/api_account_DeleteSubdomain.go +++ b/service/cip/api_account_DeleteSubdomain.go @@ -72,10 +72,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..2640aed 100644 --- a/service/cip/api_account_GetAccountOwner.go +++ b/service/cip/api_account_GetAccountOwner.go @@ -88,10 +88,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..28c70a2 100644 --- a/service/cip/api_account_GetStatus.go +++ b/service/cip/api_account_GetStatus.go @@ -88,10 +88,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..5e890b4 100644 --- a/service/cip/api_account_GetSubdomain.go +++ b/service/cip/api_account_GetSubdomain.go @@ -88,10 +88,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..09eeef3 100644 --- a/service/cip/api_account_RecoverSubdomain.go +++ b/service/cip/api_account_RecoverSubdomain.go @@ -74,10 +74,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..e9c6283 100644 --- a/service/cip/api_account_UpdateSubdomain.go +++ b/service/cip/api_account_UpdateSubdomain.go @@ -91,10 +91,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..c8f9319 100644 --- a/service/cip/api_app_GetApp.go +++ b/service/cip/api_app_GetApp.go @@ -91,10 +91,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..c4f4162 100644 --- a/service/cip/api_app_GetAsyncInstallStatus.go +++ b/service/cip/api_app_GetAsyncInstallStatus.go @@ -91,10 +91,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..a5400ff 100644 --- a/service/cip/api_app_InstallApp.go +++ b/service/cip/api_app_InstallApp.go @@ -94,10 +94,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..e95fb97 100644 --- a/service/cip/api_app_ListApps.go +++ b/service/cip/api_app_ListApps.go @@ -88,10 +88,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..72d5ebf 100644 --- a/service/cip/api_archive_CreateArchiveJob.go +++ b/service/cip/api_archive_CreateArchiveJob.go @@ -94,10 +94,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..cca2963 100644 --- a/service/cip/api_archive_DeleteArchiveJob.go +++ b/service/cip/api_archive_DeleteArchiveJob.go @@ -77,10 +77,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..d9cf1f1 100644 --- a/service/cip/api_archive_ListArchiveJobsBySourceId.go +++ b/service/cip/api_archive_ListArchiveJobsBySourceId.go @@ -100,10 +100,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..533a5af 100644 --- a/service/cip/api_archive_ListArchiveJobsCountPerSource.go +++ b/service/cip/api_archive_ListArchiveJobsCountPerSource.go @@ -88,10 +88,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_connection_CreateServiceNowConnection.go b/service/cip/api_connection_CreateServiceNowConnection.go index d7f56d3..976d0ff 100644 --- a/service/cip/api_connection_CreateServiceNowConnection.go +++ b/service/cip/api_connection_CreateServiceNowConnection.go @@ -91,10 +91,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..ba4881f 100644 --- a/service/cip/api_connection_CreateWebhookConnection.go +++ b/service/cip/api_connection_CreateWebhookConnection.go @@ -91,10 +91,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..dc4e2e5 100644 --- a/service/cip/api_connection_DeleteConnection.go +++ b/service/cip/api_connection_DeleteConnection.go @@ -77,10 +77,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..bef2bd3 100644 --- a/service/cip/api_connection_GetConnection.go +++ b/service/cip/api_connection_GetConnection.go @@ -93,10 +93,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..2444af0 100644 --- a/service/cip/api_connection_ListConnections.go +++ b/service/cip/api_connection_ListConnections.go @@ -97,10 +97,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..808d095 100644 --- a/service/cip/api_connection_TestServiceNowConnection.go +++ b/service/cip/api_connection_TestServiceNowConnection.go @@ -91,10 +91,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..4268d25 100644 --- a/service/cip/api_connection_TestWebhookConnection.go +++ b/service/cip/api_connection_TestWebhookConnection.go @@ -91,10 +91,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..a2c1625 100644 --- a/service/cip/api_connection_UpdateServiceNowConnection.go +++ b/service/cip/api_connection_UpdateServiceNowConnection.go @@ -94,10 +94,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..73eae2d 100644 --- a/service/cip/api_connection_UpdateWebhookConnection.go +++ b/service/cip/api_connection_UpdateWebhookConnection.go @@ -94,10 +94,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..5dc39b4 100644 --- a/service/cip/api_content_AsyncCopyStatus.go +++ b/service/cip/api_content_AsyncCopyStatus.go @@ -98,10 +98,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..a1aaedf 100644 --- a/service/cip/api_content_BeginAsyncCopy.go +++ b/service/cip/api_content_BeginAsyncCopy.go @@ -98,10 +98,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..743fe0f 100644 --- a/service/cip/api_content_BeginAsyncDelete.go +++ b/service/cip/api_content_BeginAsyncDelete.go @@ -96,10 +96,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..3476414 100644 --- a/service/cip/api_content_BeginAsyncExport.go +++ b/service/cip/api_content_BeginAsyncExport.go @@ -96,10 +96,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..5d70d85 100644 --- a/service/cip/api_content_BeginDashboardAsyncImport.go +++ b/service/cip/api_content_BeginDashboardAsyncImport.go @@ -103,10 +103,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..b607df5 100644 --- a/service/cip/api_content_BeginFolderAsyncImport.go +++ b/service/cip/api_content_BeginFolderAsyncImport.go @@ -103,10 +103,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..24a98a6 100644 --- a/service/cip/api_content_BeginLookTableAsyncImport.go +++ b/service/cip/api_content_BeginLookTableAsyncImport.go @@ -103,10 +103,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..c64c1b1 100644 --- a/service/cip/api_content_BeginMetricsSavedSearchAsyncImport.go +++ b/service/cip/api_content_BeginMetricsSavedSearchAsyncImport.go @@ -103,10 +103,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..cb3c466 100644 --- a/service/cip/api_content_BeginMetricsSearchAsyncImport.go +++ b/service/cip/api_content_BeginMetricsSearchAsyncImport.go @@ -103,10 +103,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..c72456a 100644 --- a/service/cip/api_content_BeginMewboardAsyncImport.go +++ b/service/cip/api_content_BeginMewboardAsyncImport.go @@ -103,10 +103,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..04748f8 100644 --- a/service/cip/api_content_BeginSavedSearchAsyncImport.go +++ b/service/cip/api_content_BeginSavedSearchAsyncImport.go @@ -103,10 +103,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..65a7a88 100644 --- a/service/cip/api_content_GetAsyncDeleteStatus.go +++ b/service/cip/api_content_GetAsyncDeleteStatus.go @@ -98,10 +98,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..5d50851 100644 --- a/service/cip/api_content_GetAsyncExportResult.go +++ b/service/cip/api_content_GetAsyncExportResult.go @@ -100,10 +100,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..127b99e 100644 --- a/service/cip/api_content_GetAsyncExportStatus.go +++ b/service/cip/api_content_GetAsyncExportStatus.go @@ -98,10 +98,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..7e19e26 100644 --- a/service/cip/api_content_GetAsyncImportStatus.go +++ b/service/cip/api_content_GetAsyncImportStatus.go @@ -98,10 +98,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..345f8fb 100644 --- a/service/cip/api_content_GetDashboardAsyncExportResult.go +++ b/service/cip/api_content_GetDashboardAsyncExportResult.go @@ -98,10 +98,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..9177819 100644 --- a/service/cip/api_content_GetFolderAsyncExportResult.go +++ b/service/cip/api_content_GetFolderAsyncExportResult.go @@ -98,10 +98,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..c70da1e 100644 --- a/service/cip/api_content_GetItemByPath.go +++ b/service/cip/api_content_GetItemByPath.go @@ -90,10 +90,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..988d928 100644 --- a/service/cip/api_content_GetLookupTableAsyncExportResult.go +++ b/service/cip/api_content_GetLookupTableAsyncExportResult.go @@ -98,10 +98,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..556222a 100644 --- a/service/cip/api_content_GetMetricsSavedSearchAsyncExportResult.go +++ b/service/cip/api_content_GetMetricsSavedSearchAsyncExportResult.go @@ -98,10 +98,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..95e4616 100644 --- a/service/cip/api_content_GetMetricsSearchAsyncExportResult.go +++ b/service/cip/api_content_GetMetricsSearchAsyncExportResult.go @@ -98,10 +98,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..8fa87a1 100644 --- a/service/cip/api_content_GetMewboardAsyncExportResult.go +++ b/service/cip/api_content_GetMewboardAsyncExportResult.go @@ -98,10 +98,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..e4fb1a9 100644 --- a/service/cip/api_content_GetPathById.go +++ b/service/cip/api_content_GetPathById.go @@ -91,10 +91,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..2e29130 100644 --- a/service/cip/api_content_GetSavedSearchAsyncExportResult.go +++ b/service/cip/api_content_GetSavedSearchAsyncExportResult.go @@ -98,10 +98,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..ce48576 100644 --- a/service/cip/api_content_MoveItem.go +++ b/service/cip/api_content_MoveItem.go @@ -82,10 +82,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..7c832c6 100644 --- a/service/cip/api_content_permissions_AddContentPermissions.go +++ b/service/cip/api_content_permissions_AddContentPermissions.go @@ -99,10 +99,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..6654e3c 100644 --- a/service/cip/api_content_permissions_GetContentPermissions.go +++ b/service/cip/api_content_permissions_GetContentPermissions.go @@ -100,10 +100,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..9ddd9bb 100644 --- a/service/cip/api_content_permissions_RemoveContentPermissions.go +++ b/service/cip/api_content_permissions_RemoveContentPermissions.go @@ -99,10 +99,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..91b7a25 100644 --- a/service/cip/api_dashboard_CreateDashboard.go +++ b/service/cip/api_dashboard_CreateDashboard.go @@ -91,10 +91,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..1e5c995 100644 --- a/service/cip/api_dashboard_DeleteDashboard.go +++ b/service/cip/api_dashboard_DeleteDashboard.go @@ -75,10 +75,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..1fc1ed7 100644 --- a/service/cip/api_dashboard_GetDashboard.go +++ b/service/cip/api_dashboard_GetDashboard.go @@ -99,10 +99,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..aef34c3 100644 --- a/service/cip/api_dashboard_UpdateDashboard.go +++ b/service/cip/api_dashboard_UpdateDashboard.go @@ -94,10 +94,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..4296daf 100644 --- a/service/cip/api_dynamic_parsing_CreateDynamicParsingRule.go +++ b/service/cip/api_dynamic_parsing_CreateDynamicParsingRule.go @@ -91,10 +91,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..5ea3ea9 100644 --- a/service/cip/api_dynamic_parsing_DeleteDynamicParsingRule.go +++ b/service/cip/api_dynamic_parsing_DeleteDynamicParsingRule.go @@ -75,10 +75,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..8edf14c 100644 --- a/service/cip/api_dynamic_parsing_GetDynamicParsingRule.go +++ b/service/cip/api_dynamic_parsing_GetDynamicParsingRule.go @@ -91,10 +91,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..8322ef3 100644 --- a/service/cip/api_dynamic_parsing_ListDynamicParsingRules.go +++ b/service/cip/api_dynamic_parsing_ListDynamicParsingRules.go @@ -97,10 +97,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..b553094 100644 --- a/service/cip/api_dynamic_parsing_UpdateDynamicParsingRule.go +++ b/service/cip/api_dynamic_parsing_UpdateDynamicParsingRule.go @@ -94,10 +94,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..617b7cf 100644 --- a/service/cip/api_extraction_rule_CreateExtractionRule.go +++ b/service/cip/api_extraction_rule_CreateExtractionRule.go @@ -91,10 +91,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..8e4920b 100644 --- a/service/cip/api_extraction_rule_DeleteExtractionRule.go +++ b/service/cip/api_extraction_rule_DeleteExtractionRule.go @@ -75,10 +75,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..d4bd3d9 100644 --- a/service/cip/api_extraction_rule_GetExtractionRule.go +++ b/service/cip/api_extraction_rule_GetExtractionRule.go @@ -91,10 +91,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..0faa28f 100644 --- a/service/cip/api_extraction_rule_ListExtractionRule.go +++ b/service/cip/api_extraction_rule_ListExtractionRule.go @@ -97,10 +97,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..dddab16 100644 --- a/service/cip/api_extraction_rule_UpdateExtractionRule.go +++ b/service/cip/api_extraction_rule_UpdateExtractionRule.go @@ -94,10 +94,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..44e1351 100644 --- a/service/cip/api_field_management_CreateField.go +++ b/service/cip/api_field_management_CreateField.go @@ -91,10 +91,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..bb42223 100644 --- a/service/cip/api_field_management_DeleteField.go +++ b/service/cip/api_field_management_DeleteField.go @@ -75,10 +75,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..88d46dc 100644 --- a/service/cip/api_field_management_DisableField.go +++ b/service/cip/api_field_management_DisableField.go @@ -75,10 +75,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..25ef8b2 100644 --- a/service/cip/api_field_management_EnableField.go +++ b/service/cip/api_field_management_EnableField.go @@ -75,10 +75,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..6d2e958 100644 --- a/service/cip/api_field_management_GetBuiltInField.go +++ b/service/cip/api_field_management_GetBuiltInField.go @@ -91,10 +91,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..e5a4c57 100644 --- a/service/cip/api_field_management_GetCustomField.go +++ b/service/cip/api_field_management_GetCustomField.go @@ -91,10 +91,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..e279a3f 100644 --- a/service/cip/api_field_management_GetFieldQuota.go +++ b/service/cip/api_field_management_GetFieldQuota.go @@ -88,10 +88,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..0230093 100644 --- a/service/cip/api_field_management_ListBuiltInFields.go +++ b/service/cip/api_field_management_ListBuiltInFields.go @@ -88,10 +88,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..0c55e20 100644 --- a/service/cip/api_field_management_ListCustomFields.go +++ b/service/cip/api_field_management_ListCustomFields.go @@ -88,10 +88,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..1c4a485 100644 --- a/service/cip/api_field_management_ListDroppedFields.go +++ b/service/cip/api_field_management_ListDroppedFields.go @@ -88,10 +88,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..3f46e65 100644 --- a/service/cip/api_folder_CreateFolder.go +++ b/service/cip/api_folder_CreateFolder.go @@ -96,10 +96,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..d4f9f5f 100644 --- a/service/cip/api_folder_GetAdminRecommendedFolderAsync.go +++ b/service/cip/api_folder_GetAdminRecommendedFolderAsync.go @@ -93,10 +93,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..255baf7 100644 --- a/service/cip/api_folder_GetAdminRecommendedFolderResult.go +++ b/service/cip/api_folder_GetAdminRecommendedFolderResult.go @@ -91,10 +91,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..5c5b0af 100644 --- a/service/cip/api_folder_GetAdminRecommendedFolderStatus.go +++ b/service/cip/api_folder_GetAdminRecommendedFolderStatus.go @@ -91,10 +91,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..3c4ad68 100644 --- a/service/cip/api_folder_GetFolder.go +++ b/service/cip/api_folder_GetFolder.go @@ -96,10 +96,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..8f4e567 100644 --- a/service/cip/api_folder_GetGlobalFolderAsync.go +++ b/service/cip/api_folder_GetGlobalFolderAsync.go @@ -93,10 +93,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..cc2e20a 100644 --- a/service/cip/api_folder_GetGlobalFolderAsyncResult.go +++ b/service/cip/api_folder_GetGlobalFolderAsyncResult.go @@ -91,10 +91,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..5ec3e4b 100644 --- a/service/cip/api_folder_GetGlobalFolderAsyncStatus.go +++ b/service/cip/api_folder_GetGlobalFolderAsyncStatus.go @@ -91,10 +91,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..8491624 100644 --- a/service/cip/api_folder_GetPersonalFolder.go +++ b/service/cip/api_folder_GetPersonalFolder.go @@ -88,10 +88,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..2c44c7e 100644 --- a/service/cip/api_folder_UpdateFolder.go +++ b/service/cip/api_folder_UpdateFolder.go @@ -99,10 +99,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_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 } diff --git a/service/cip/api_health_events_ListAllHealthEventsForResources.go b/service/cip/api_health_events_ListAllHealthEventsForResources.go index 27d8ddd..282b9f4 100644 --- a/service/cip/api_health_events_ListAllHealthEventsForResources.go +++ b/service/cip/api_health_events_ListAllHealthEventsForResources.go @@ -101,10 +101,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..4654047 100644 --- a/service/cip/api_ingest_budget_v1_AssignCollectorToBudget.go +++ b/service/cip/api_ingest_budget_v1_AssignCollectorToBudget.go @@ -93,10 +93,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..0a10dd7 100644 --- a/service/cip/api_ingest_budget_v1_CreateIngestBudget.go +++ b/service/cip/api_ingest_budget_v1_CreateIngestBudget.go @@ -91,10 +91,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..94fc7df 100644 --- a/service/cip/api_ingest_budget_v1_DeleteIngestBudget.go +++ b/service/cip/api_ingest_budget_v1_DeleteIngestBudget.go @@ -75,10 +75,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..3d2493c 100644 --- a/service/cip/api_ingest_budget_v1_GetAssignedCollectors.go +++ b/service/cip/api_ingest_budget_v1_GetAssignedCollectors.go @@ -100,10 +100,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..c1bb37a 100644 --- a/service/cip/api_ingest_budget_v1_GetIngestBudget.go +++ b/service/cip/api_ingest_budget_v1_GetIngestBudget.go @@ -91,10 +91,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..43751b5 100644 --- a/service/cip/api_ingest_budget_v1_ListIngestBudgets.go +++ b/service/cip/api_ingest_budget_v1_ListIngestBudgets.go @@ -97,10 +97,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..30649b8 100644 --- a/service/cip/api_ingest_budget_v1_RemoveCollectorFromBudget.go +++ b/service/cip/api_ingest_budget_v1_RemoveCollectorFromBudget.go @@ -93,10 +93,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..806186b 100644 --- a/service/cip/api_ingest_budget_v1_ResetUsage.go +++ b/service/cip/api_ingest_budget_v1_ResetUsage.go @@ -75,10 +75,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..edc3997 100644 --- a/service/cip/api_ingest_budget_v1_UpdateIngestBudget.go +++ b/service/cip/api_ingest_budget_v1_UpdateIngestBudget.go @@ -94,10 +94,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..9edfa07 100644 --- a/service/cip/api_ingest_budget_v2_CreateIngestBudget.go +++ b/service/cip/api_ingest_budget_v2_CreateIngestBudget.go @@ -91,10 +91,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..efd52a6 100644 --- a/service/cip/api_ingest_budget_v2_DeleteIngestBudget.go +++ b/service/cip/api_ingest_budget_v2_DeleteIngestBudget.go @@ -75,10 +75,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..0196d50 100644 --- a/service/cip/api_ingest_budget_v2_GetIngestBudget.go +++ b/service/cip/api_ingest_budget_v2_GetIngestBudget.go @@ -91,10 +91,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..15094d3 100644 --- a/service/cip/api_ingest_budget_v2_ListIngestBudgets.go +++ b/service/cip/api_ingest_budget_v2_ListIngestBudgets.go @@ -97,10 +97,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..98754cc 100644 --- a/service/cip/api_ingest_budget_v2_ResetUsage.go +++ b/service/cip/api_ingest_budget_v2_ResetUsage.go @@ -75,10 +75,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..927b0a5 100644 --- a/service/cip/api_ingest_budget_v2_UpdateIngestBudget.go +++ b/service/cip/api_ingest_budget_v2_UpdateIngestBudget.go @@ -94,10 +94,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..a316d28 100644 --- a/service/cip/api_log_searches_estimated_usage_GetLogSearchEstimatedUsage.go +++ b/service/cip/api_log_searches_estimated_usage_GetLogSearchEstimatedUsage.go @@ -91,10 +91,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..48f7bee 100644 --- a/service/cip/api_log_searches_estimated_usage_GetLogSearchEstimatedUsageByTier.go +++ b/service/cip/api_log_searches_estimated_usage_GetLogSearchEstimatedUsageByTier.go @@ -91,10 +91,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..7854e45 100644 --- a/service/cip/api_lookup_CreateTable.go +++ b/service/cip/api_lookup_CreateTable.go @@ -91,10 +91,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..3c8afc0 100644 --- a/service/cip/api_lookup_DeleteTable.go +++ b/service/cip/api_lookup_DeleteTable.go @@ -75,10 +75,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..e63c942 100644 --- a/service/cip/api_lookup_DeleteTableRow.go +++ b/service/cip/api_lookup_DeleteTableRow.go @@ -78,10 +78,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..6f3eb63 100644 --- a/service/cip/api_lookup_LookupTableById.go +++ b/service/cip/api_lookup_LookupTableById.go @@ -91,10 +91,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..2db742f 100644 --- a/service/cip/api_lookup_RequestJobStatus.go +++ b/service/cip/api_lookup_RequestJobStatus.go @@ -91,10 +91,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..3c4f764 100644 --- a/service/cip/api_lookup_TruncateTable.go +++ b/service/cip/api_lookup_TruncateTable.go @@ -91,10 +91,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..4e2f536 100644 --- a/service/cip/api_lookup_UpdateTable.go +++ b/service/cip/api_lookup_UpdateTable.go @@ -94,10 +94,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..a79ddbe 100644 --- a/service/cip/api_lookup_UpdateTableRow.go +++ b/service/cip/api_lookup_UpdateTableRow.go @@ -78,10 +78,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..5240973 100644 --- a/service/cip/api_lookup_UploadFile.go +++ b/service/cip/api_lookup_UploadFile.go @@ -113,10 +113,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..53442aa 100644 --- a/service/cip/api_metrics_query_RunMetricsQueries.go +++ b/service/cip/api_metrics_query_RunMetricsQueries.go @@ -91,10 +91,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..627fe82 100644 --- a/service/cip/api_metrics_searches_CreateMetricsSearch.go +++ b/service/cip/api_metrics_searches_CreateMetricsSearch.go @@ -91,10 +91,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..41597d0 100644 --- a/service/cip/api_metrics_searches_DeleteMetricsSearch.go +++ b/service/cip/api_metrics_searches_DeleteMetricsSearch.go @@ -75,10 +75,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..f66c704 100644 --- a/service/cip/api_metrics_searches_GetMetricsSearch.go +++ b/service/cip/api_metrics_searches_GetMetricsSearch.go @@ -91,10 +91,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..5fabeb1 100644 --- a/service/cip/api_metrics_searches_UpdateMetricsSearch.go +++ b/service/cip/api_metrics_searches_UpdateMetricsSearch.go @@ -94,10 +94,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..2aeb178 100644 --- a/service/cip/api_monitors_CopyMonitors.go +++ b/service/cip/api_monitors_CopyMonitors.go @@ -94,10 +94,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..29ccb39 100644 --- a/service/cip/api_monitors_CreateMonitors.go +++ b/service/cip/api_monitors_CreateMonitors.go @@ -87,10 +87,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..909d6ea 100644 --- a/service/cip/api_monitors_DeleteMonitorsById.go +++ b/service/cip/api_monitors_DeleteMonitorsById.go @@ -75,10 +75,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..cef01cc 100644 --- a/service/cip/api_monitors_DeleteMonitorsByIds.go +++ b/service/cip/api_monitors_DeleteMonitorsByIds.go @@ -90,10 +90,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..36da6e2 100644 --- a/service/cip/api_monitors_ExportMonitorsItem.go +++ b/service/cip/api_monitors_ExportMonitorsItem.go @@ -91,10 +91,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..b83829b 100644 --- a/service/cip/api_monitors_GetMonitorUsageInfo.go +++ b/service/cip/api_monitors_GetMonitorUsageInfo.go @@ -88,10 +88,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..bac226e 100644 --- a/service/cip/api_monitors_GetMonitorsById.go +++ b/service/cip/api_monitors_GetMonitorsById.go @@ -91,10 +91,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..0a70925 100644 --- a/service/cip/api_monitors_GetMonitorsByIds.go +++ b/service/cip/api_monitors_GetMonitorsByIds.go @@ -90,10 +90,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..de6dc96 100644 --- a/service/cip/api_monitors_GetMonitorsByPath.go +++ b/service/cip/api_monitors_GetMonitorsByPath.go @@ -90,10 +90,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..1a3b6fe 100644 --- a/service/cip/api_monitors_GetMonitorsFullPath.go +++ b/service/cip/api_monitors_GetMonitorsFullPath.go @@ -91,10 +91,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..28275cf 100644 --- a/service/cip/api_monitors_GetMonitorsLibraryRoot.go +++ b/service/cip/api_monitors_GetMonitorsLibraryRoot.go @@ -88,10 +88,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..2b7c72d 100644 --- a/service/cip/api_monitors_ImportMonitorsItem.go +++ b/service/cip/api_monitors_ImportMonitorsItem.go @@ -94,10 +94,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..c1c4d80 100644 --- a/service/cip/api_monitors_MoveMonitors.go +++ b/service/cip/api_monitors_MoveMonitors.go @@ -93,10 +93,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..57066f1 100644 --- a/service/cip/api_monitors_SearchMonitors.go +++ b/service/cip/api_monitors_SearchMonitors.go @@ -107,10 +107,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..99c32cc 100644 --- a/service/cip/api_monitors_UpdateMonitorsById.go +++ b/service/cip/api_monitors_UpdateMonitorsById.go @@ -94,10 +94,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..01f56b6 100644 --- a/service/cip/api_monitors_ValidateMonitorQueries.go +++ b/service/cip/api_monitors_ValidateMonitorQueries.go @@ -91,10 +91,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..06801af 100644 --- a/service/cip/api_organizations_CreateOrganization.go +++ b/service/cip/api_organizations_CreateOrganization.go @@ -93,10 +93,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..7cdc5a2 100644 --- a/service/cip/api_organizations_CreateOrganizationAccessKey.go +++ b/service/cip/api_organizations_CreateOrganizationAccessKey.go @@ -96,10 +96,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..d10ac5f 100644 --- a/service/cip/api_organizations_DeleteOrganization.go +++ b/service/cip/api_organizations_DeleteOrganization.go @@ -93,10 +93,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..f05aa31 100644 --- a/service/cip/api_organizations_GetDeployments.go +++ b/service/cip/api_organizations_GetDeployments.go @@ -90,10 +90,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..f9bc496 100644 --- a/service/cip/api_organizations_GetOrganization.go +++ b/service/cip/api_organizations_GetOrganization.go @@ -93,10 +93,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..f3e93e2 100644 --- a/service/cip/api_organizations_GetOrganizationUsage.go +++ b/service/cip/api_organizations_GetOrganizationUsage.go @@ -93,10 +93,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..5fb7b05 100644 --- a/service/cip/api_organizations_GetOrganizationUsages.go +++ b/service/cip/api_organizations_GetOrganizationUsages.go @@ -103,10 +103,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..ae00dae 100644 --- a/service/cip/api_organizations_GetParentOrganizationDetails.go +++ b/service/cip/api_organizations_GetParentOrganizationDetails.go @@ -90,10 +90,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..076789d 100644 --- a/service/cip/api_organizations_GetParentOrganizationInfo.go +++ b/service/cip/api_organizations_GetParentOrganizationInfo.go @@ -90,10 +90,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..8296841 100644 --- a/service/cip/api_organizations_GetSubdomainLoginUrl.go +++ b/service/cip/api_organizations_GetSubdomainLoginUrl.go @@ -93,10 +93,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..8f046e5 100644 --- a/service/cip/api_organizations_ListOrganizations.go +++ b/service/cip/api_organizations_ListOrganizations.go @@ -103,10 +103,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..bd3578f 100644 --- a/service/cip/api_organizations_UpdateOrganization.go +++ b/service/cip/api_organizations_UpdateOrganization.go @@ -96,10 +96,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..9db3778 100644 --- a/service/cip/api_partition_CancelRetentionUpdate.go +++ b/service/cip/api_partition_CancelRetentionUpdate.go @@ -75,10 +75,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..abf74b6 100644 --- a/service/cip/api_partition_CreatePartition.go +++ b/service/cip/api_partition_CreatePartition.go @@ -93,10 +93,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..167a563 100644 --- a/service/cip/api_partition_DecommissionPartition.go +++ b/service/cip/api_partition_DecommissionPartition.go @@ -75,10 +75,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..99fb308 100644 --- a/service/cip/api_partition_GetPartition.go +++ b/service/cip/api_partition_GetPartition.go @@ -91,10 +91,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..9827058 100644 --- a/service/cip/api_partition_ListPartitions.go +++ b/service/cip/api_partition_ListPartitions.go @@ -104,10 +104,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..c4436f7 100644 --- a/service/cip/api_partition_UpdatePartition.go +++ b/service/cip/api_partition_UpdatePartition.go @@ -94,10 +94,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..b3720ac 100644 --- a/service/cip/api_password_policy_GetPasswordPolicy.go +++ b/service/cip/api_password_policy_GetPasswordPolicy.go @@ -88,10 +88,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..f7dd4b5 100644 --- a/service/cip/api_password_policy_SetPasswordPolicy.go +++ b/service/cip/api_password_policy_SetPasswordPolicy.go @@ -91,10 +91,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..0e4cdff 100644 --- a/service/cip/api_policies_GetAuditPolicy.go +++ b/service/cip/api_policies_GetAuditPolicy.go @@ -88,10 +88,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..03543b5 100644 --- a/service/cip/api_policies_GetDataAccessLevelPolicy.go +++ b/service/cip/api_policies_GetDataAccessLevelPolicy.go @@ -88,10 +88,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..4dde712 100644 --- a/service/cip/api_policies_GetMaxUserSessionTimeoutPolicy.go +++ b/service/cip/api_policies_GetMaxUserSessionTimeoutPolicy.go @@ -88,10 +88,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..6594f3d 100644 --- a/service/cip/api_policies_GetSearchAuditPolicy.go +++ b/service/cip/api_policies_GetSearchAuditPolicy.go @@ -88,10 +88,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..783a52e 100644 --- a/service/cip/api_policies_GetShareDashboardsOutsideOrganizationPolicy.go +++ b/service/cip/api_policies_GetShareDashboardsOutsideOrganizationPolicy.go @@ -88,10 +88,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..4707b3a 100644 --- a/service/cip/api_policies_GetUserConcurrentSessionsLimitPolicy.go +++ b/service/cip/api_policies_GetUserConcurrentSessionsLimitPolicy.go @@ -88,10 +88,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..64d7974 100644 --- a/service/cip/api_policies_SetAuditPolicy.go +++ b/service/cip/api_policies_SetAuditPolicy.go @@ -91,10 +91,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..b6d21aa 100644 --- a/service/cip/api_policies_SetDataAccessLevelPolicy.go +++ b/service/cip/api_policies_SetDataAccessLevelPolicy.go @@ -91,10 +91,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..bf338e8 100644 --- a/service/cip/api_policies_SetMaxUserSessionTimeoutPolicy.go +++ b/service/cip/api_policies_SetMaxUserSessionTimeoutPolicy.go @@ -91,10 +91,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..151e420 100644 --- a/service/cip/api_policies_SetSearchAuditPolicy.go +++ b/service/cip/api_policies_SetSearchAuditPolicy.go @@ -91,10 +91,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..89283c3 100644 --- a/service/cip/api_policies_SetShareDashboardsOutsideOrganizationPolicy.go +++ b/service/cip/api_policies_SetShareDashboardsOutsideOrganizationPolicy.go @@ -91,10 +91,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..7609315 100644 --- a/service/cip/api_policies_SetUserConcurrentSessionsLimitPolicy.go +++ b/service/cip/api_policies_SetUserConcurrentSessionsLimitPolicy.go @@ -91,10 +91,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..6c1f3f4 100644 --- a/service/cip/api_role_AssignRoleToUser.go +++ b/service/cip/api_role_AssignRoleToUser.go @@ -93,10 +93,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..667e4b3 100644 --- a/service/cip/api_role_CreateRole.go +++ b/service/cip/api_role_CreateRole.go @@ -91,10 +91,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..d03c7d4 100644 --- a/service/cip/api_role_DeleteRole.go +++ b/service/cip/api_role_DeleteRole.go @@ -75,10 +75,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..c289393 100644 --- a/service/cip/api_role_GetRole.go +++ b/service/cip/api_role_GetRole.go @@ -91,10 +91,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..16f7ea5 100644 --- a/service/cip/api_role_ListRoles.go +++ b/service/cip/api_role_ListRoles.go @@ -105,10 +105,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..9166d07 100644 --- a/service/cip/api_role_RemoveRoleFromUser.go +++ b/service/cip/api_role_RemoveRoleFromUser.go @@ -77,10 +77,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..c91c7d5 100644 --- a/service/cip/api_role_UpdateRole.go +++ b/service/cip/api_role_UpdateRole.go @@ -94,10 +94,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..5fe241c 100644 --- a/service/cip/api_saml_configuration_CreateAllowlistedUser.go +++ b/service/cip/api_saml_configuration_CreateAllowlistedUser.go @@ -91,10 +91,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..8d6a06c 100644 --- a/service/cip/api_saml_configuration_CreateIdentityProvider.go +++ b/service/cip/api_saml_configuration_CreateIdentityProvider.go @@ -91,10 +91,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..caea2ac 100644 --- a/service/cip/api_saml_configuration_DeleteAllowlistedUser.go +++ b/service/cip/api_saml_configuration_DeleteAllowlistedUser.go @@ -75,10 +75,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..a1e8761 100644 --- a/service/cip/api_saml_configuration_DeleteIdentityProvider.go +++ b/service/cip/api_saml_configuration_DeleteIdentityProvider.go @@ -75,10 +75,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..46aaaf4 100644 --- a/service/cip/api_saml_configuration_DisableSamlLockdown.go +++ b/service/cip/api_saml_configuration_DisableSamlLockdown.go @@ -72,10 +72,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..b56e7e3 100644 --- a/service/cip/api_saml_configuration_EnableSamlLockdown.go +++ b/service/cip/api_saml_configuration_EnableSamlLockdown.go @@ -72,10 +72,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..b9cff3b 100644 --- a/service/cip/api_saml_configuration_GetAllowlistedUsers.go +++ b/service/cip/api_saml_configuration_GetAllowlistedUsers.go @@ -88,10 +88,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..fb3ee1e 100644 --- a/service/cip/api_saml_configuration_GetIdentityProviders.go +++ b/service/cip/api_saml_configuration_GetIdentityProviders.go @@ -88,10 +88,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..1bb710e 100644 --- a/service/cip/api_saml_configuration_UpdateIdentityProvider.go +++ b/service/cip/api_saml_configuration_UpdateIdentityProvider.go @@ -94,10 +94,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..9992066 100644 --- a/service/cip/api_scheduled_view_CreateScheduledView.go +++ b/service/cip/api_scheduled_view_CreateScheduledView.go @@ -91,10 +91,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..9fcea41 100644 --- a/service/cip/api_scheduled_view_DisableScheduledView.go +++ b/service/cip/api_scheduled_view_DisableScheduledView.go @@ -75,10 +75,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..f250acd 100644 --- a/service/cip/api_scheduled_view_GetScheduledView.go +++ b/service/cip/api_scheduled_view_GetScheduledView.go @@ -91,10 +91,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..19eb5d3 100644 --- a/service/cip/api_scheduled_view_ListScheduledViews.go +++ b/service/cip/api_scheduled_view_ListScheduledViews.go @@ -97,10 +97,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..c3f3da7 100644 --- a/service/cip/api_scheduled_view_PauseScheduledView.go +++ b/service/cip/api_scheduled_view_PauseScheduledView.go @@ -91,10 +91,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..6cce75d 100644 --- a/service/cip/api_scheduled_view_StartScheduledView.go +++ b/service/cip/api_scheduled_view_StartScheduledView.go @@ -91,10 +91,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..a919924 100644 --- a/service/cip/api_scheduled_view_UpdateScheduledView.go +++ b/service/cip/api_scheduled_view_UpdateScheduledView.go @@ -94,10 +94,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..c0e50af 100644 --- a/service/cip/api_service_allowlist_AddAllowlistedCidrs.go +++ b/service/cip/api_service_allowlist_AddAllowlistedCidrs.go @@ -91,10 +91,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..7b1db1f 100644 --- a/service/cip/api_service_allowlist_DeleteAllowlistedCidrs.go +++ b/service/cip/api_service_allowlist_DeleteAllowlistedCidrs.go @@ -91,10 +91,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..f864467 100644 --- a/service/cip/api_service_allowlist_DisableAllowlisting.go +++ b/service/cip/api_service_allowlist_DisableAllowlisting.go @@ -74,10 +74,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..39100c6 100644 --- a/service/cip/api_service_allowlist_EnableAllowlisting.go +++ b/service/cip/api_service_allowlist_EnableAllowlisting.go @@ -74,10 +74,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..d3e2182 100644 --- a/service/cip/api_service_allowlist_GetAllowlistingStatus.go +++ b/service/cip/api_service_allowlist_GetAllowlistingStatus.go @@ -88,10 +88,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..75d8f66 100644 --- a/service/cip/api_service_allowlist_ListAllowlistedCidrs.go +++ b/service/cip/api_service_allowlist_ListAllowlistedCidrs.go @@ -88,10 +88,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_tokens_CreateToken.go b/service/cip/api_tokens_CreateToken.go index 7aa9b4f..a9e5821 100644 --- a/service/cip/api_tokens_CreateToken.go +++ b/service/cip/api_tokens_CreateToken.go @@ -91,10 +91,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..815652a 100644 --- a/service/cip/api_tokens_DeleteToken.go +++ b/service/cip/api_tokens_DeleteToken.go @@ -75,10 +75,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..f9e6e81 100644 --- a/service/cip/api_tokens_GetToken.go +++ b/service/cip/api_tokens_GetToken.go @@ -91,10 +91,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..f311d7b 100644 --- a/service/cip/api_tokens_ListTokens.go +++ b/service/cip/api_tokens_ListTokens.go @@ -88,10 +88,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..3b52dc8 100644 --- a/service/cip/api_tokens_UpdateToken.go +++ b/service/cip/api_tokens_UpdateToken.go @@ -94,10 +94,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..0a2bafa 100644 --- a/service/cip/api_transformation_rule_CreateTransformationRule.go +++ b/service/cip/api_transformation_rule_CreateTransformationRule.go @@ -91,10 +91,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..84b62f1 100644 --- a/service/cip/api_transformation_rule_DeleteTransformationRule.go +++ b/service/cip/api_transformation_rule_DeleteTransformationRule.go @@ -75,10 +75,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..d54996e 100644 --- a/service/cip/api_transformation_rule_GetTransformationRule.go +++ b/service/cip/api_transformation_rule_GetTransformationRule.go @@ -91,10 +91,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..a8a84f5 100644 --- a/service/cip/api_transformation_rule_ListTransformationRules.go +++ b/service/cip/api_transformation_rule_ListTransformationRules.go @@ -97,10 +97,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..c478c06 100644 --- a/service/cip/api_transformation_rule_UpdateTransformationRule.go +++ b/service/cip/api_transformation_rule_UpdateTransformationRule.go @@ -94,10 +94,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..c4cb582 100644 --- a/service/cip/api_user_CreateUser.go +++ b/service/cip/api_user_CreateUser.go @@ -91,10 +91,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..a3e0a43 100644 --- a/service/cip/api_user_DeleteUser.go +++ b/service/cip/api_user_DeleteUser.go @@ -80,10 +80,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..08304e3 100644 --- a/service/cip/api_user_DisableMfa.go +++ b/service/cip/api_user_DisableMfa.go @@ -78,10 +78,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..96cda77 100644 --- a/service/cip/api_user_GetUser.go +++ b/service/cip/api_user_GetUser.go @@ -91,10 +91,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..1db8fb5 100644 --- a/service/cip/api_user_ListUsers.go +++ b/service/cip/api_user_ListUsers.go @@ -105,10 +105,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..d0d269c 100644 --- a/service/cip/api_user_RequestChangeEmail.go +++ b/service/cip/api_user_RequestChangeEmail.go @@ -78,10 +78,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..88012f2 100644 --- a/service/cip/api_user_ResetPassword.go +++ b/service/cip/api_user_ResetPassword.go @@ -75,10 +75,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..5bd7a1e 100644 --- a/service/cip/api_user_UnlockUser.go +++ b/service/cip/api_user_UnlockUser.go @@ -75,10 +75,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..c50bf3f 100644 --- a/service/cip/api_user_UpdateUser.go +++ b/service/cip/api_user_UpdateUser.go @@ -94,12 +94,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 }