diff --git a/elasticsearch.go b/elasticsearch.go index 06a8fdbde3..afd9999a02 100644 --- a/elasticsearch.go +++ b/elasticsearch.go @@ -96,6 +96,38 @@ func NewDefaultClient() (*Client, error) { // It's an error to set both cfg.Addresses and cfg.CloudID. // func NewClient(cfg Config) (*Client, error) { + tp, err := NewTransportClient(cfg) + if err != nil { + return nil, err + } + + client := &Client{Transport: tp, API: esapi.New(tp)} + + if cfg.DiscoverNodesOnStart { + go client.DiscoverNodes() + } + + return client, nil +} + +// NewTransportClient creates a new low-level transport client +// with configuration from cfg. Generally, you'll only want to +// use this if you want to be selective of the APIs your client +// uses. In most cases use NewClient, which attempts to discover +// additional Elasticsearch nodes and automatically instantiates +// all Elasticsearch API clients for you. +// +// It will use http://localhost:9200 as the default address. +// +// It will use the ELASTICSEARCH_URL environment variable, if set, +// to configure the addresses; use a comma to separate multiple URLs. +// +// If either cfg.Addresses or cfg.CloudID is set, the ELASTICSEARCH_URL +// environment variable is ignored. +// +// It's an error to set both cfg.Addresses and cfg.CloudID. +// +func NewTransportClient(cfg Config) (*estransport.Client, error) { var addrs []string if len(cfg.Addresses) == 0 && cfg.CloudID == "" { @@ -163,14 +195,7 @@ func NewClient(cfg Config) (*Client, error) { if err != nil { return nil, fmt.Errorf("error creating transport: %s", err) } - - client := &Client{Transport: tp, API: esapi.New(tp)} - - if cfg.DiscoverNodesOnStart { - go client.DiscoverNodes() - } - - return client, nil + return tp, nil } // Perform delegates to Transport to execute a request and return a response. diff --git a/esapi/api._.go b/esapi/api._.go index cb68f6798d..6e5f6edca9 100755 --- a/esapi/api._.go +++ b/esapi/api._.go @@ -1,4 +1,4 @@ -// Code generated from specification version 8.0.0 (785a91c1e3f): DO NOT EDIT +// Code generated from specification version 8.0.0 (0fd6a17aa17f73a9f981394b0a224c3afec57e90): DO NOT EDIT package esapi @@ -141,6 +141,38 @@ type Cat struct { Transforms CatTransforms } +// NewCat creates a new API client for Cat APIs +// +func NewCat(t Transport) *Cat { + return &Cat{ + Aliases: NewCatAliases(t), + Allocation: NewCatAllocation(t), + Count: NewCatCount(t), + Fielddata: NewCatFielddata(t), + Health: NewCatHealth(t), + Help: NewCatHelp(t), + Indices: NewCatIndices(t), + MLDataFrameAnalytics: NewCatMLDataFrameAnalytics(t), + MLDatafeeds: NewCatMLDatafeeds(t), + MLJobs: NewCatMLJobs(t), + MLTrainedModels: NewCatMLTrainedModels(t), + Master: NewCatMaster(t), + Nodeattrs: NewCatNodeattrs(t), + Nodes: NewCatNodes(t), + PendingTasks: NewCatPendingTasks(t), + Plugins: NewCatPlugins(t), + Recovery: NewCatRecovery(t), + Repositories: NewCatRepositories(t), + Segments: NewCatSegments(t), + Shards: NewCatShards(t), + Snapshots: NewCatSnapshots(t), + Tasks: NewCatTasks(t), + Templates: NewCatTemplates(t), + ThreadPool: NewCatThreadPool(t), + Transforms: NewCatTransforms(t), + } +} + // Cluster contains the Cluster APIs type Cluster struct { AllocationExplain ClusterAllocationExplain @@ -160,6 +192,28 @@ type Cluster struct { Stats ClusterStats } +// NewCluster creates a new API client for Cluster APIs +// +func NewCluster(t Transport) *Cluster { + return &Cluster{ + AllocationExplain: NewClusterAllocationExplain(t), + DeleteComponentTemplate: NewClusterDeleteComponentTemplate(t), + DeleteVotingConfigExclusions: NewClusterDeleteVotingConfigExclusions(t), + ExistsComponentTemplate: NewClusterExistsComponentTemplate(t), + GetComponentTemplate: NewClusterGetComponentTemplate(t), + GetSettings: NewClusterGetSettings(t), + Health: NewClusterHealth(t), + PendingTasks: NewClusterPendingTasks(t), + PostVotingConfigExclusions: NewClusterPostVotingConfigExclusions(t), + PutComponentTemplate: NewClusterPutComponentTemplate(t), + PutSettings: NewClusterPutSettings(t), + RemoteInfo: NewClusterRemoteInfo(t), + Reroute: NewClusterReroute(t), + State: NewClusterState(t), + Stats: NewClusterStats(t), + } +} + // Indices contains the Indices APIs type Indices struct { AddBlock IndicesAddBlock @@ -216,6 +270,65 @@ type Indices struct { ValidateQuery IndicesValidateQuery } +// NewIndices creates a new API client for Indices APIs +// +func NewIndices(t Transport) *Indices { + return &Indices{ + AddBlock: NewIndicesAddBlock(t), + Analyze: NewIndicesAnalyze(t), + ClearCache: NewIndicesClearCache(t), + Clone: NewIndicesClone(t), + Close: NewIndicesClose(t), + CreateDataStream: NewIndicesCreateDataStream(t), + Create: NewIndicesCreate(t), + DataStreamsStats: NewIndicesDataStreamsStats(t), + DeleteAlias: NewIndicesDeleteAlias(t), + DeleteDataStream: NewIndicesDeleteDataStream(t), + DeleteIndexTemplate: NewIndicesDeleteIndexTemplate(t), + Delete: NewIndicesDelete(t), + DeleteTemplate: NewIndicesDeleteTemplate(t), + ExistsAlias: NewIndicesExistsAlias(t), + ExistsDocumentType: NewIndicesExistsDocumentType(t), + ExistsIndexTemplate: NewIndicesExistsIndexTemplate(t), + Exists: NewIndicesExists(t), + ExistsTemplate: NewIndicesExistsTemplate(t), + Flush: NewIndicesFlush(t), + Forcemerge: NewIndicesForcemerge(t), + Freeze: NewIndicesFreeze(t), + GetAlias: NewIndicesGetAlias(t), + GetDataStream: NewIndicesGetDataStream(t), + GetFieldMapping: NewIndicesGetFieldMapping(t), + GetIndexTemplate: NewIndicesGetIndexTemplate(t), + GetMapping: NewIndicesGetMapping(t), + Get: NewIndicesGet(t), + GetSettings: NewIndicesGetSettings(t), + GetTemplate: NewIndicesGetTemplate(t), + GetUpgrade: NewIndicesGetUpgrade(t), + Open: NewIndicesOpen(t), + PutAlias: NewIndicesPutAlias(t), + PutIndexTemplate: NewIndicesPutIndexTemplate(t), + PutMapping: NewIndicesPutMapping(t), + PutSettings: NewIndicesPutSettings(t), + PutTemplate: NewIndicesPutTemplate(t), + Recovery: NewIndicesRecovery(t), + Refresh: NewIndicesRefresh(t), + ReloadSearchAnalyzers: NewIndicesReloadSearchAnalyzers(t), + ResolveIndex: NewIndicesResolveIndex(t), + Rollover: NewIndicesRollover(t), + Segments: NewIndicesSegments(t), + ShardStores: NewIndicesShardStores(t), + Shrink: NewIndicesShrink(t), + SimulateIndexTemplate: NewIndicesSimulateIndexTemplate(t), + SimulateTemplate: NewIndicesSimulateTemplate(t), + Split: NewIndicesSplit(t), + Stats: NewIndicesStats(t), + Unfreeze: NewIndicesUnfreeze(t), + UpdateAliases: NewIndicesUpdateAliases(t), + Upgrade: NewIndicesUpgrade(t), + ValidateQuery: NewIndicesValidateQuery(t), + } +} + // Ingest contains the Ingest APIs type Ingest struct { DeletePipeline IngestDeletePipeline @@ -225,6 +338,18 @@ type Ingest struct { Simulate IngestSimulate } +// NewIngest creates a new API client for Ingest APIs +// +func NewIngest(t Transport) *Ingest { + return &Ingest{ + DeletePipeline: NewIngestDeletePipeline(t), + GetPipeline: NewIngestGetPipeline(t), + ProcessorGrok: NewIngestProcessorGrok(t), + PutPipeline: NewIngestPutPipeline(t), + Simulate: NewIngestSimulate(t), + } +} + // Nodes contains the Nodes APIs type Nodes struct { HotThreads NodesHotThreads @@ -234,10 +359,28 @@ type Nodes struct { Usage NodesUsage } +// NewNodes creates a new API client for Nodes APIs +// +func NewNodes(t Transport) *Nodes { + return &Nodes{ + HotThreads: NewNodesHotThreads(t), + Info: NewNodesInfo(t), + ReloadSecureSettings: NewNodesReloadSecureSettings(t), + Stats: NewNodesStats(t), + Usage: NewNodesUsage(t), + } +} + // Remote contains the Remote APIs type Remote struct { } +// NewRemote creates a new API client for Remote APIs +// +func NewRemote(t Transport) *Remote { + return &Remote{} +} + // Snapshot contains the Snapshot APIs type Snapshot struct { CleanupRepository SnapshotCleanupRepository @@ -252,6 +395,23 @@ type Snapshot struct { VerifyRepository SnapshotVerifyRepository } +// NewSnapshot creates a new API client for Snapshot APIs +// +func NewSnapshot(t Transport) *Snapshot { + return &Snapshot{ + CleanupRepository: NewSnapshotCleanupRepository(t), + CreateRepository: NewSnapshotCreateRepository(t), + Create: NewSnapshotCreate(t), + DeleteRepository: NewSnapshotDeleteRepository(t), + Delete: NewSnapshotDelete(t), + GetRepository: NewSnapshotGetRepository(t), + Get: NewSnapshotGet(t), + Restore: NewSnapshotRestore(t), + Status: NewSnapshotStatus(t), + VerifyRepository: NewSnapshotVerifyRepository(t), + } +} + // Tasks contains the Tasks APIs type Tasks struct { Cancel TasksCancel @@ -259,6 +419,16 @@ type Tasks struct { List TasksList } +// NewTasks creates a new API client for Tasks APIs +// +func NewTasks(t Transport) *Tasks { + return &Tasks{ + Cancel: NewTasksCancel(t), + Get: NewTasksGet(t), + List: NewTasksList(t), + } +} + // AsyncSearch contains the AsyncSearch APIs type AsyncSearch struct { Delete AsyncSearchDelete @@ -266,6 +436,16 @@ type AsyncSearch struct { Submit AsyncSearchSubmit } +// NewAsyncSearch creates a new API client for AsyncSearch APIs +// +func NewAsyncSearch(t Transport) *AsyncSearch { + return &AsyncSearch{ + Delete: NewAsyncSearchDelete(t), + Get: NewAsyncSearchGet(t), + Submit: NewAsyncSearchSubmit(t), + } +} + // CCR contains the CCR APIs type CCR struct { DeleteAutoFollowPattern CCRDeleteAutoFollowPattern @@ -283,6 +463,26 @@ type CCR struct { Unfollow CCRUnfollow } +// NewCCR creates a new API client for CCR APIs +// +func NewCCR(t Transport) *CCR { + return &CCR{ + DeleteAutoFollowPattern: NewCCRDeleteAutoFollowPattern(t), + FollowInfo: NewCCRFollowInfo(t), + Follow: NewCCRFollow(t), + FollowStats: NewCCRFollowStats(t), + ForgetFollower: NewCCRForgetFollower(t), + GetAutoFollowPattern: NewCCRGetAutoFollowPattern(t), + PauseAutoFollowPattern: NewCCRPauseAutoFollowPattern(t), + PauseFollow: NewCCRPauseFollow(t), + PutAutoFollowPattern: NewCCRPutAutoFollowPattern(t), + ResumeAutoFollowPattern: NewCCRResumeAutoFollowPattern(t), + ResumeFollow: NewCCRResumeFollow(t), + Stats: NewCCRStats(t), + Unfollow: NewCCRUnfollow(t), + } +} + // ILM contains the ILM APIs type ILM struct { DeleteLifecycle ILMDeleteLifecycle @@ -297,6 +497,23 @@ type ILM struct { Stop ILMStop } +// NewILM creates a new API client for ILM APIs +// +func NewILM(t Transport) *ILM { + return &ILM{ + DeleteLifecycle: NewILMDeleteLifecycle(t), + ExplainLifecycle: NewILMExplainLifecycle(t), + GetLifecycle: NewILMGetLifecycle(t), + GetStatus: NewILMGetStatus(t), + MoveToStep: NewILMMoveToStep(t), + PutLifecycle: NewILMPutLifecycle(t), + RemovePolicy: NewILMRemovePolicy(t), + Retry: NewILMRetry(t), + Start: NewILMStart(t), + Stop: NewILMStop(t), + } +} + // License contains the License APIs type License struct { Delete LicenseDelete @@ -308,11 +525,33 @@ type License struct { PostStartTrial LicensePostStartTrial } +// NewLicense creates a new API client for License APIs +// +func NewLicense(t Transport) *License { + return &License{ + Delete: NewLicenseDelete(t), + GetBasicStatus: NewLicenseGetBasicStatus(t), + Get: NewLicenseGet(t), + GetTrialStatus: NewLicenseGetTrialStatus(t), + Post: NewLicensePost(t), + PostStartBasic: NewLicensePostStartBasic(t), + PostStartTrial: NewLicensePostStartTrial(t), + } +} + // Migration contains the Migration APIs type Migration struct { Deprecations MigrationDeprecations } +// NewMigration creates a new API client for Migration APIs +// +func NewMigration(t Transport) *Migration { + return &Migration{ + Deprecations: NewMigrationDeprecations(t), + } +} + // ML contains the ML APIs type ML struct { CloseJob MLCloseJob @@ -377,11 +616,86 @@ type ML struct { Validate MLValidate } +// NewML creates a new API client for ML APIs +// +func NewML(t Transport) *ML { + return &ML{ + CloseJob: NewMLCloseJob(t), + DeleteCalendarEvent: NewMLDeleteCalendarEvent(t), + DeleteCalendarJob: NewMLDeleteCalendarJob(t), + DeleteCalendar: NewMLDeleteCalendar(t), + DeleteDataFrameAnalytics: NewMLDeleteDataFrameAnalytics(t), + DeleteDatafeed: NewMLDeleteDatafeed(t), + DeleteExpiredData: NewMLDeleteExpiredData(t), + DeleteFilter: NewMLDeleteFilter(t), + DeleteForecast: NewMLDeleteForecast(t), + DeleteJob: NewMLDeleteJob(t), + DeleteModelSnapshot: NewMLDeleteModelSnapshot(t), + DeleteTrainedModel: NewMLDeleteTrainedModel(t), + EstimateModelMemory: NewMLEstimateModelMemory(t), + EvaluateDataFrame: NewMLEvaluateDataFrame(t), + ExplainDataFrameAnalytics: NewMLExplainDataFrameAnalytics(t), + FindFileStructure: NewMLFindFileStructure(t), + FlushJob: NewMLFlushJob(t), + Forecast: NewMLForecast(t), + GetBuckets: NewMLGetBuckets(t), + GetCalendarEvents: NewMLGetCalendarEvents(t), + GetCalendars: NewMLGetCalendars(t), + GetCategories: NewMLGetCategories(t), + GetDataFrameAnalytics: NewMLGetDataFrameAnalytics(t), + GetDataFrameAnalyticsStats: NewMLGetDataFrameAnalyticsStats(t), + GetDatafeedStats: NewMLGetDatafeedStats(t), + GetDatafeeds: NewMLGetDatafeeds(t), + GetFilters: NewMLGetFilters(t), + GetInfluencers: NewMLGetInfluencers(t), + GetJobStats: NewMLGetJobStats(t), + GetJobs: NewMLGetJobs(t), + GetModelSnapshots: NewMLGetModelSnapshots(t), + GetOverallBuckets: NewMLGetOverallBuckets(t), + GetRecords: NewMLGetRecords(t), + GetTrainedModels: NewMLGetTrainedModels(t), + GetTrainedModelsStats: NewMLGetTrainedModelsStats(t), + Info: NewMLInfo(t), + OpenJob: NewMLOpenJob(t), + PostCalendarEvents: NewMLPostCalendarEvents(t), + PostData: NewMLPostData(t), + PreviewDatafeed: NewMLPreviewDatafeed(t), + PutCalendarJob: NewMLPutCalendarJob(t), + PutCalendar: NewMLPutCalendar(t), + PutDataFrameAnalytics: NewMLPutDataFrameAnalytics(t), + PutDatafeed: NewMLPutDatafeed(t), + PutFilter: NewMLPutFilter(t), + PutJob: NewMLPutJob(t), + PutTrainedModel: NewMLPutTrainedModel(t), + RevertModelSnapshot: NewMLRevertModelSnapshot(t), + SetUpgradeMode: NewMLSetUpgradeMode(t), + StartDataFrameAnalytics: NewMLStartDataFrameAnalytics(t), + StartDatafeed: NewMLStartDatafeed(t), + StopDataFrameAnalytics: NewMLStopDataFrameAnalytics(t), + StopDatafeed: NewMLStopDatafeed(t), + UpdateDataFrameAnalytics: NewMLUpdateDataFrameAnalytics(t), + UpdateDatafeed: NewMLUpdateDatafeed(t), + UpdateFilter: NewMLUpdateFilter(t), + UpdateJob: NewMLUpdateJob(t), + UpdateModelSnapshot: NewMLUpdateModelSnapshot(t), + ValidateDetector: NewMLValidateDetector(t), + Validate: NewMLValidate(t), + } +} + // Monitoring contains the Monitoring APIs type Monitoring struct { Bulk MonitoringBulk } +// NewMonitoring creates a new API client for Monitoring APIs +// +func NewMonitoring(t Transport) *Monitoring { + return &Monitoring{ + Bulk: NewMonitoringBulk(t), + } +} + // Rollup contains the Rollup APIs type Rollup struct { DeleteJob RollupDeleteJob @@ -394,6 +708,21 @@ type Rollup struct { StopJob RollupStopJob } +// NewRollup creates a new API client for Rollup APIs +// +func NewRollup(t Transport) *Rollup { + return &Rollup{ + DeleteJob: NewRollupDeleteJob(t), + GetJobs: NewRollupGetJobs(t), + GetCaps: NewRollupGetRollupCaps(t), + GetIndexCaps: NewRollupGetRollupIndexCaps(t), + PutJob: NewRollupPutJob(t), + Search: NewRollupRollupSearch(t), + StartJob: NewRollupStartJob(t), + StopJob: NewRollupStopJob(t), + } +} + // Security contains the Security APIs type Security struct { Authenticate SecurityAuthenticate @@ -425,6 +754,40 @@ type Security struct { PutUser SecurityPutUser } +// NewSecurity creates a new API client for Security APIs +// +func NewSecurity(t Transport) *Security { + return &Security{ + Authenticate: NewSecurityAuthenticate(t), + ChangePassword: NewSecurityChangePassword(t), + ClearCachedPrivileges: NewSecurityClearCachedPrivileges(t), + ClearCachedRealms: NewSecurityClearCachedRealms(t), + ClearCachedRoles: NewSecurityClearCachedRoles(t), + CreateAPIKey: NewSecurityCreateAPIKey(t), + DeletePrivileges: NewSecurityDeletePrivileges(t), + DeleteRoleMapping: NewSecurityDeleteRoleMapping(t), + DeleteRole: NewSecurityDeleteRole(t), + DeleteUser: NewSecurityDeleteUser(t), + DisableUser: NewSecurityDisableUser(t), + EnableUser: NewSecurityEnableUser(t), + GetAPIKey: NewSecurityGetAPIKey(t), + GetBuiltinPrivileges: NewSecurityGetBuiltinPrivileges(t), + GetPrivileges: NewSecurityGetPrivileges(t), + GetRoleMapping: NewSecurityGetRoleMapping(t), + GetRole: NewSecurityGetRole(t), + GetToken: NewSecurityGetToken(t), + GetUserPrivileges: NewSecurityGetUserPrivileges(t), + GetUser: NewSecurityGetUser(t), + HasPrivileges: NewSecurityHasPrivileges(t), + InvalidateAPIKey: NewSecurityInvalidateAPIKey(t), + InvalidateToken: NewSecurityInvalidateToken(t), + PutPrivileges: NewSecurityPutPrivileges(t), + PutRoleMapping: NewSecurityPutRoleMapping(t), + PutRole: NewSecurityPutRole(t), + PutUser: NewSecurityPutUser(t), + } +} + // SQL contains the SQL APIs type SQL struct { ClearCursor SQLClearCursor @@ -432,11 +795,29 @@ type SQL struct { Translate SQLTranslate } +// NewSQL creates a new API client for SQL APIs +// +func NewSQL(t Transport) *SQL { + return &SQL{ + ClearCursor: NewSQLClearCursor(t), + Query: NewSQLQuery(t), + Translate: NewSQLTranslate(t), + } +} + // SSL contains the SSL APIs type SSL struct { Certificates SSLCertificates } +// NewSSL creates a new API client for SSL APIs +// +func NewSSL(t Transport) *SSL { + return &SSL{ + Certificates: NewSSLCertificates(t), + } +} + // Watcher contains the Watcher APIs type Watcher struct { AckWatch WatcherAckWatch @@ -451,400 +832,145 @@ type Watcher struct { Stop WatcherStop } +// NewWatcher creates a new API client for Watcher APIs +// +func NewWatcher(t Transport) *Watcher { + return &Watcher{ + AckWatch: NewWatcherAckWatch(t), + ActivateWatch: NewWatcherActivateWatch(t), + DeactivateWatch: NewWatcherDeactivateWatch(t), + DeleteWatch: NewWatcherDeleteWatch(t), + ExecuteWatch: NewWatcherExecuteWatch(t), + GetWatch: NewWatcherGetWatch(t), + PutWatch: NewWatcherPutWatch(t), + Start: NewWatcherStart(t), + Stats: NewWatcherStats(t), + Stop: NewWatcherStop(t), + } +} + // XPack contains the XPack APIs type XPack struct { Info XPackInfo Usage XPackUsage } +// NewXPack creates a new API client for XPack APIs +// +func NewXPack(t Transport) *XPack { + return &XPack{ + Info: NewXPackInfo(t), + Usage: NewXPackUsage(t), + } +} + // New creates new API // func New(t Transport) *API { return &API{ - AutoscalingDeleteAutoscalingPolicy: newAutoscalingDeleteAutoscalingPolicyFunc(t), - AutoscalingGetAutoscalingDecision: newAutoscalingGetAutoscalingDecisionFunc(t), - AutoscalingGetAutoscalingPolicy: newAutoscalingGetAutoscalingPolicyFunc(t), - AutoscalingPutAutoscalingPolicy: newAutoscalingPutAutoscalingPolicyFunc(t), - Bulk: newBulkFunc(t), - ClearScroll: newClearScrollFunc(t), - Count: newCountFunc(t), - Create: newCreateFunc(t), - DanglingIndicesDeleteDanglingIndex: newDanglingIndicesDeleteDanglingIndexFunc(t), - DanglingIndicesImportDanglingIndex: newDanglingIndicesImportDanglingIndexFunc(t), - DanglingIndicesListDanglingIndices: newDanglingIndicesListDanglingIndicesFunc(t), - DataFrameTransformDeprecatedDeleteTransform: newDataFrameTransformDeprecatedDeleteTransformFunc(t), - DataFrameTransformDeprecatedGetTransform: newDataFrameTransformDeprecatedGetTransformFunc(t), - DataFrameTransformDeprecatedGetTransformStats: newDataFrameTransformDeprecatedGetTransformStatsFunc(t), - DataFrameTransformDeprecatedPreviewTransform: newDataFrameTransformDeprecatedPreviewTransformFunc(t), - DataFrameTransformDeprecatedPutTransform: newDataFrameTransformDeprecatedPutTransformFunc(t), - DataFrameTransformDeprecatedStartTransform: newDataFrameTransformDeprecatedStartTransformFunc(t), - DataFrameTransformDeprecatedStopTransform: newDataFrameTransformDeprecatedStopTransformFunc(t), - DataFrameTransformDeprecatedUpdateTransform: newDataFrameTransformDeprecatedUpdateTransformFunc(t), - DeleteByQuery: newDeleteByQueryFunc(t), - DeleteByQueryRethrottle: newDeleteByQueryRethrottleFunc(t), - Delete: newDeleteFunc(t), - DeleteScript: newDeleteScriptFunc(t), - EnrichDeletePolicy: newEnrichDeletePolicyFunc(t), - EnrichExecutePolicy: newEnrichExecutePolicyFunc(t), - EnrichGetPolicy: newEnrichGetPolicyFunc(t), - EnrichPutPolicy: newEnrichPutPolicyFunc(t), - EnrichStats: newEnrichStatsFunc(t), - EqlDelete: newEqlDeleteFunc(t), - EqlGet: newEqlGetFunc(t), - EqlSearch: newEqlSearchFunc(t), - Exists: newExistsFunc(t), - ExistsSource: newExistsSourceFunc(t), - Explain: newExplainFunc(t), - FieldCaps: newFieldCapsFunc(t), - Get: newGetFunc(t), - GetScriptContext: newGetScriptContextFunc(t), - GetScriptLanguages: newGetScriptLanguagesFunc(t), - GetScript: newGetScriptFunc(t), - GetSource: newGetSourceFunc(t), - GraphExplore: newGraphExploreFunc(t), - Index: newIndexFunc(t), - Info: newInfoFunc(t), - Mget: newMgetFunc(t), - Msearch: newMsearchFunc(t), - MsearchTemplate: newMsearchTemplateFunc(t), - Mtermvectors: newMtermvectorsFunc(t), - Ping: newPingFunc(t), - PutScript: newPutScriptFunc(t), - RankEval: newRankEvalFunc(t), - Reindex: newReindexFunc(t), - ReindexRethrottle: newReindexRethrottleFunc(t), - RenderSearchTemplate: newRenderSearchTemplateFunc(t), - ScriptsPainlessExecute: newScriptsPainlessExecuteFunc(t), - Scroll: newScrollFunc(t), - Search: newSearchFunc(t), - SearchShards: newSearchShardsFunc(t), - SearchTemplate: newSearchTemplateFunc(t), - SearchableSnapshotsClearCache: newSearchableSnapshotsClearCacheFunc(t), - SearchableSnapshotsMount: newSearchableSnapshotsMountFunc(t), - SearchableSnapshotsRepositoryStats: newSearchableSnapshotsRepositoryStatsFunc(t), - SearchableSnapshotsStats: newSearchableSnapshotsStatsFunc(t), - SlmDeleteLifecycle: newSlmDeleteLifecycleFunc(t), - SlmExecuteLifecycle: newSlmExecuteLifecycleFunc(t), - SlmExecuteRetention: newSlmExecuteRetentionFunc(t), - SlmGetLifecycle: newSlmGetLifecycleFunc(t), - SlmGetStats: newSlmGetStatsFunc(t), - SlmGetStatus: newSlmGetStatusFunc(t), - SlmPutLifecycle: newSlmPutLifecycleFunc(t), - SlmStart: newSlmStartFunc(t), - SlmStop: newSlmStopFunc(t), - Termvectors: newTermvectorsFunc(t), - TransformDeleteTransform: newTransformDeleteTransformFunc(t), - TransformGetTransform: newTransformGetTransformFunc(t), - TransformGetTransformStats: newTransformGetTransformStatsFunc(t), - TransformPreviewTransform: newTransformPreviewTransformFunc(t), - TransformPutTransform: newTransformPutTransformFunc(t), - TransformStartTransform: newTransformStartTransformFunc(t), - TransformStopTransform: newTransformStopTransformFunc(t), - TransformUpdateTransform: newTransformUpdateTransformFunc(t), - UpdateByQuery: newUpdateByQueryFunc(t), - UpdateByQueryRethrottle: newUpdateByQueryRethrottleFunc(t), - Update: newUpdateFunc(t), - Cat: &Cat{ - Aliases: newCatAliasesFunc(t), - Allocation: newCatAllocationFunc(t), - Count: newCatCountFunc(t), - Fielddata: newCatFielddataFunc(t), - Health: newCatHealthFunc(t), - Help: newCatHelpFunc(t), - Indices: newCatIndicesFunc(t), - MLDataFrameAnalytics: newCatMLDataFrameAnalyticsFunc(t), - MLDatafeeds: newCatMLDatafeedsFunc(t), - MLJobs: newCatMLJobsFunc(t), - MLTrainedModels: newCatMLTrainedModelsFunc(t), - Master: newCatMasterFunc(t), - Nodeattrs: newCatNodeattrsFunc(t), - Nodes: newCatNodesFunc(t), - PendingTasks: newCatPendingTasksFunc(t), - Plugins: newCatPluginsFunc(t), - Recovery: newCatRecoveryFunc(t), - Repositories: newCatRepositoriesFunc(t), - Segments: newCatSegmentsFunc(t), - Shards: newCatShardsFunc(t), - Snapshots: newCatSnapshotsFunc(t), - Tasks: newCatTasksFunc(t), - Templates: newCatTemplatesFunc(t), - ThreadPool: newCatThreadPoolFunc(t), - Transforms: newCatTransformsFunc(t), - }, - Cluster: &Cluster{ - AllocationExplain: newClusterAllocationExplainFunc(t), - DeleteComponentTemplate: newClusterDeleteComponentTemplateFunc(t), - DeleteVotingConfigExclusions: newClusterDeleteVotingConfigExclusionsFunc(t), - ExistsComponentTemplate: newClusterExistsComponentTemplateFunc(t), - GetComponentTemplate: newClusterGetComponentTemplateFunc(t), - GetSettings: newClusterGetSettingsFunc(t), - Health: newClusterHealthFunc(t), - PendingTasks: newClusterPendingTasksFunc(t), - PostVotingConfigExclusions: newClusterPostVotingConfigExclusionsFunc(t), - PutComponentTemplate: newClusterPutComponentTemplateFunc(t), - PutSettings: newClusterPutSettingsFunc(t), - RemoteInfo: newClusterRemoteInfoFunc(t), - Reroute: newClusterRerouteFunc(t), - State: newClusterStateFunc(t), - Stats: newClusterStatsFunc(t), - }, - Indices: &Indices{ - AddBlock: newIndicesAddBlockFunc(t), - Analyze: newIndicesAnalyzeFunc(t), - ClearCache: newIndicesClearCacheFunc(t), - Clone: newIndicesCloneFunc(t), - Close: newIndicesCloseFunc(t), - CreateDataStream: newIndicesCreateDataStreamFunc(t), - Create: newIndicesCreateFunc(t), - DataStreamsStats: newIndicesDataStreamsStatsFunc(t), - DeleteAlias: newIndicesDeleteAliasFunc(t), - DeleteDataStream: newIndicesDeleteDataStreamFunc(t), - DeleteIndexTemplate: newIndicesDeleteIndexTemplateFunc(t), - Delete: newIndicesDeleteFunc(t), - DeleteTemplate: newIndicesDeleteTemplateFunc(t), - ExistsAlias: newIndicesExistsAliasFunc(t), - ExistsDocumentType: newIndicesExistsDocumentTypeFunc(t), - ExistsIndexTemplate: newIndicesExistsIndexTemplateFunc(t), - Exists: newIndicesExistsFunc(t), - ExistsTemplate: newIndicesExistsTemplateFunc(t), - Flush: newIndicesFlushFunc(t), - Forcemerge: newIndicesForcemergeFunc(t), - Freeze: newIndicesFreezeFunc(t), - GetAlias: newIndicesGetAliasFunc(t), - GetDataStream: newIndicesGetDataStreamFunc(t), - GetFieldMapping: newIndicesGetFieldMappingFunc(t), - GetIndexTemplate: newIndicesGetIndexTemplateFunc(t), - GetMapping: newIndicesGetMappingFunc(t), - Get: newIndicesGetFunc(t), - GetSettings: newIndicesGetSettingsFunc(t), - GetTemplate: newIndicesGetTemplateFunc(t), - GetUpgrade: newIndicesGetUpgradeFunc(t), - Open: newIndicesOpenFunc(t), - PutAlias: newIndicesPutAliasFunc(t), - PutIndexTemplate: newIndicesPutIndexTemplateFunc(t), - PutMapping: newIndicesPutMappingFunc(t), - PutSettings: newIndicesPutSettingsFunc(t), - PutTemplate: newIndicesPutTemplateFunc(t), - Recovery: newIndicesRecoveryFunc(t), - Refresh: newIndicesRefreshFunc(t), - ReloadSearchAnalyzers: newIndicesReloadSearchAnalyzersFunc(t), - ResolveIndex: newIndicesResolveIndexFunc(t), - Rollover: newIndicesRolloverFunc(t), - Segments: newIndicesSegmentsFunc(t), - ShardStores: newIndicesShardStoresFunc(t), - Shrink: newIndicesShrinkFunc(t), - SimulateIndexTemplate: newIndicesSimulateIndexTemplateFunc(t), - SimulateTemplate: newIndicesSimulateTemplateFunc(t), - Split: newIndicesSplitFunc(t), - Stats: newIndicesStatsFunc(t), - Unfreeze: newIndicesUnfreezeFunc(t), - UpdateAliases: newIndicesUpdateAliasesFunc(t), - Upgrade: newIndicesUpgradeFunc(t), - ValidateQuery: newIndicesValidateQueryFunc(t), - }, - Ingest: &Ingest{ - DeletePipeline: newIngestDeletePipelineFunc(t), - GetPipeline: newIngestGetPipelineFunc(t), - ProcessorGrok: newIngestProcessorGrokFunc(t), - PutPipeline: newIngestPutPipelineFunc(t), - Simulate: newIngestSimulateFunc(t), - }, - Nodes: &Nodes{ - HotThreads: newNodesHotThreadsFunc(t), - Info: newNodesInfoFunc(t), - ReloadSecureSettings: newNodesReloadSecureSettingsFunc(t), - Stats: newNodesStatsFunc(t), - Usage: newNodesUsageFunc(t), - }, - Remote: &Remote{}, - Snapshot: &Snapshot{ - CleanupRepository: newSnapshotCleanupRepositoryFunc(t), - CreateRepository: newSnapshotCreateRepositoryFunc(t), - Create: newSnapshotCreateFunc(t), - DeleteRepository: newSnapshotDeleteRepositoryFunc(t), - Delete: newSnapshotDeleteFunc(t), - GetRepository: newSnapshotGetRepositoryFunc(t), - Get: newSnapshotGetFunc(t), - Restore: newSnapshotRestoreFunc(t), - Status: newSnapshotStatusFunc(t), - VerifyRepository: newSnapshotVerifyRepositoryFunc(t), - }, - Tasks: &Tasks{ - Cancel: newTasksCancelFunc(t), - Get: newTasksGetFunc(t), - List: newTasksListFunc(t), - }, - AsyncSearch: &AsyncSearch{ - Delete: newAsyncSearchDeleteFunc(t), - Get: newAsyncSearchGetFunc(t), - Submit: newAsyncSearchSubmitFunc(t), - }, - CCR: &CCR{ - DeleteAutoFollowPattern: newCCRDeleteAutoFollowPatternFunc(t), - FollowInfo: newCCRFollowInfoFunc(t), - Follow: newCCRFollowFunc(t), - FollowStats: newCCRFollowStatsFunc(t), - ForgetFollower: newCCRForgetFollowerFunc(t), - GetAutoFollowPattern: newCCRGetAutoFollowPatternFunc(t), - PauseAutoFollowPattern: newCCRPauseAutoFollowPatternFunc(t), - PauseFollow: newCCRPauseFollowFunc(t), - PutAutoFollowPattern: newCCRPutAutoFollowPatternFunc(t), - ResumeAutoFollowPattern: newCCRResumeAutoFollowPatternFunc(t), - ResumeFollow: newCCRResumeFollowFunc(t), - Stats: newCCRStatsFunc(t), - Unfollow: newCCRUnfollowFunc(t), - }, - ILM: &ILM{ - DeleteLifecycle: newILMDeleteLifecycleFunc(t), - ExplainLifecycle: newILMExplainLifecycleFunc(t), - GetLifecycle: newILMGetLifecycleFunc(t), - GetStatus: newILMGetStatusFunc(t), - MoveToStep: newILMMoveToStepFunc(t), - PutLifecycle: newILMPutLifecycleFunc(t), - RemovePolicy: newILMRemovePolicyFunc(t), - Retry: newILMRetryFunc(t), - Start: newILMStartFunc(t), - Stop: newILMStopFunc(t), - }, - License: &License{ - Delete: newLicenseDeleteFunc(t), - GetBasicStatus: newLicenseGetBasicStatusFunc(t), - Get: newLicenseGetFunc(t), - GetTrialStatus: newLicenseGetTrialStatusFunc(t), - Post: newLicensePostFunc(t), - PostStartBasic: newLicensePostStartBasicFunc(t), - PostStartTrial: newLicensePostStartTrialFunc(t), - }, - Migration: &Migration{ - Deprecations: newMigrationDeprecationsFunc(t), - }, - ML: &ML{ - CloseJob: newMLCloseJobFunc(t), - DeleteCalendarEvent: newMLDeleteCalendarEventFunc(t), - DeleteCalendarJob: newMLDeleteCalendarJobFunc(t), - DeleteCalendar: newMLDeleteCalendarFunc(t), - DeleteDataFrameAnalytics: newMLDeleteDataFrameAnalyticsFunc(t), - DeleteDatafeed: newMLDeleteDatafeedFunc(t), - DeleteExpiredData: newMLDeleteExpiredDataFunc(t), - DeleteFilter: newMLDeleteFilterFunc(t), - DeleteForecast: newMLDeleteForecastFunc(t), - DeleteJob: newMLDeleteJobFunc(t), - DeleteModelSnapshot: newMLDeleteModelSnapshotFunc(t), - DeleteTrainedModel: newMLDeleteTrainedModelFunc(t), - EstimateModelMemory: newMLEstimateModelMemoryFunc(t), - EvaluateDataFrame: newMLEvaluateDataFrameFunc(t), - ExplainDataFrameAnalytics: newMLExplainDataFrameAnalyticsFunc(t), - FindFileStructure: newMLFindFileStructureFunc(t), - FlushJob: newMLFlushJobFunc(t), - Forecast: newMLForecastFunc(t), - GetBuckets: newMLGetBucketsFunc(t), - GetCalendarEvents: newMLGetCalendarEventsFunc(t), - GetCalendars: newMLGetCalendarsFunc(t), - GetCategories: newMLGetCategoriesFunc(t), - GetDataFrameAnalytics: newMLGetDataFrameAnalyticsFunc(t), - GetDataFrameAnalyticsStats: newMLGetDataFrameAnalyticsStatsFunc(t), - GetDatafeedStats: newMLGetDatafeedStatsFunc(t), - GetDatafeeds: newMLGetDatafeedsFunc(t), - GetFilters: newMLGetFiltersFunc(t), - GetInfluencers: newMLGetInfluencersFunc(t), - GetJobStats: newMLGetJobStatsFunc(t), - GetJobs: newMLGetJobsFunc(t), - GetModelSnapshots: newMLGetModelSnapshotsFunc(t), - GetOverallBuckets: newMLGetOverallBucketsFunc(t), - GetRecords: newMLGetRecordsFunc(t), - GetTrainedModels: newMLGetTrainedModelsFunc(t), - GetTrainedModelsStats: newMLGetTrainedModelsStatsFunc(t), - Info: newMLInfoFunc(t), - OpenJob: newMLOpenJobFunc(t), - PostCalendarEvents: newMLPostCalendarEventsFunc(t), - PostData: newMLPostDataFunc(t), - PreviewDatafeed: newMLPreviewDatafeedFunc(t), - PutCalendarJob: newMLPutCalendarJobFunc(t), - PutCalendar: newMLPutCalendarFunc(t), - PutDataFrameAnalytics: newMLPutDataFrameAnalyticsFunc(t), - PutDatafeed: newMLPutDatafeedFunc(t), - PutFilter: newMLPutFilterFunc(t), - PutJob: newMLPutJobFunc(t), - PutTrainedModel: newMLPutTrainedModelFunc(t), - RevertModelSnapshot: newMLRevertModelSnapshotFunc(t), - SetUpgradeMode: newMLSetUpgradeModeFunc(t), - StartDataFrameAnalytics: newMLStartDataFrameAnalyticsFunc(t), - StartDatafeed: newMLStartDatafeedFunc(t), - StopDataFrameAnalytics: newMLStopDataFrameAnalyticsFunc(t), - StopDatafeed: newMLStopDatafeedFunc(t), - UpdateDataFrameAnalytics: newMLUpdateDataFrameAnalyticsFunc(t), - UpdateDatafeed: newMLUpdateDatafeedFunc(t), - UpdateFilter: newMLUpdateFilterFunc(t), - UpdateJob: newMLUpdateJobFunc(t), - UpdateModelSnapshot: newMLUpdateModelSnapshotFunc(t), - ValidateDetector: newMLValidateDetectorFunc(t), - Validate: newMLValidateFunc(t), - }, - Monitoring: &Monitoring{ - Bulk: newMonitoringBulkFunc(t), - }, - Rollup: &Rollup{ - DeleteJob: newRollupDeleteJobFunc(t), - GetJobs: newRollupGetJobsFunc(t), - GetCaps: newRollupGetRollupCapsFunc(t), - GetIndexCaps: newRollupGetRollupIndexCapsFunc(t), - PutJob: newRollupPutJobFunc(t), - Search: newRollupRollupSearchFunc(t), - StartJob: newRollupStartJobFunc(t), - StopJob: newRollupStopJobFunc(t), - }, - Security: &Security{ - Authenticate: newSecurityAuthenticateFunc(t), - ChangePassword: newSecurityChangePasswordFunc(t), - ClearCachedPrivileges: newSecurityClearCachedPrivilegesFunc(t), - ClearCachedRealms: newSecurityClearCachedRealmsFunc(t), - ClearCachedRoles: newSecurityClearCachedRolesFunc(t), - CreateAPIKey: newSecurityCreateAPIKeyFunc(t), - DeletePrivileges: newSecurityDeletePrivilegesFunc(t), - DeleteRoleMapping: newSecurityDeleteRoleMappingFunc(t), - DeleteRole: newSecurityDeleteRoleFunc(t), - DeleteUser: newSecurityDeleteUserFunc(t), - DisableUser: newSecurityDisableUserFunc(t), - EnableUser: newSecurityEnableUserFunc(t), - GetAPIKey: newSecurityGetAPIKeyFunc(t), - GetBuiltinPrivileges: newSecurityGetBuiltinPrivilegesFunc(t), - GetPrivileges: newSecurityGetPrivilegesFunc(t), - GetRoleMapping: newSecurityGetRoleMappingFunc(t), - GetRole: newSecurityGetRoleFunc(t), - GetToken: newSecurityGetTokenFunc(t), - GetUserPrivileges: newSecurityGetUserPrivilegesFunc(t), - GetUser: newSecurityGetUserFunc(t), - HasPrivileges: newSecurityHasPrivilegesFunc(t), - InvalidateAPIKey: newSecurityInvalidateAPIKeyFunc(t), - InvalidateToken: newSecurityInvalidateTokenFunc(t), - PutPrivileges: newSecurityPutPrivilegesFunc(t), - PutRoleMapping: newSecurityPutRoleMappingFunc(t), - PutRole: newSecurityPutRoleFunc(t), - PutUser: newSecurityPutUserFunc(t), - }, - SQL: &SQL{ - ClearCursor: newSQLClearCursorFunc(t), - Query: newSQLQueryFunc(t), - Translate: newSQLTranslateFunc(t), - }, - SSL: &SSL{ - Certificates: newSSLCertificatesFunc(t), - }, - Watcher: &Watcher{ - AckWatch: newWatcherAckWatchFunc(t), - ActivateWatch: newWatcherActivateWatchFunc(t), - DeactivateWatch: newWatcherDeactivateWatchFunc(t), - DeleteWatch: newWatcherDeleteWatchFunc(t), - ExecuteWatch: newWatcherExecuteWatchFunc(t), - GetWatch: newWatcherGetWatchFunc(t), - PutWatch: newWatcherPutWatchFunc(t), - Start: newWatcherStartFunc(t), - Stats: newWatcherStatsFunc(t), - Stop: newWatcherStopFunc(t), - }, - XPack: &XPack{ - Info: newXPackInfoFunc(t), - Usage: newXPackUsageFunc(t), - }, + AutoscalingDeleteAutoscalingPolicy: NewAutoscalingDeleteAutoscalingPolicy(t), + AutoscalingGetAutoscalingDecision: NewAutoscalingGetAutoscalingDecision(t), + AutoscalingGetAutoscalingPolicy: NewAutoscalingGetAutoscalingPolicy(t), + AutoscalingPutAutoscalingPolicy: NewAutoscalingPutAutoscalingPolicy(t), + Bulk: NewBulk(t), + ClearScroll: NewClearScroll(t), + Count: NewCount(t), + Create: NewCreate(t), + DanglingIndicesDeleteDanglingIndex: NewDanglingIndicesDeleteDanglingIndex(t), + DanglingIndicesImportDanglingIndex: NewDanglingIndicesImportDanglingIndex(t), + DanglingIndicesListDanglingIndices: NewDanglingIndicesListDanglingIndices(t), + DataFrameTransformDeprecatedDeleteTransform: NewDataFrameTransformDeprecatedDeleteTransform(t), + DataFrameTransformDeprecatedGetTransform: NewDataFrameTransformDeprecatedGetTransform(t), + DataFrameTransformDeprecatedGetTransformStats: NewDataFrameTransformDeprecatedGetTransformStats(t), + DataFrameTransformDeprecatedPreviewTransform: NewDataFrameTransformDeprecatedPreviewTransform(t), + DataFrameTransformDeprecatedPutTransform: NewDataFrameTransformDeprecatedPutTransform(t), + DataFrameTransformDeprecatedStartTransform: NewDataFrameTransformDeprecatedStartTransform(t), + DataFrameTransformDeprecatedStopTransform: NewDataFrameTransformDeprecatedStopTransform(t), + DataFrameTransformDeprecatedUpdateTransform: NewDataFrameTransformDeprecatedUpdateTransform(t), + DeleteByQuery: NewDeleteByQuery(t), + DeleteByQueryRethrottle: NewDeleteByQueryRethrottle(t), + Delete: NewDelete(t), + DeleteScript: NewDeleteScript(t), + EnrichDeletePolicy: NewEnrichDeletePolicy(t), + EnrichExecutePolicy: NewEnrichExecutePolicy(t), + EnrichGetPolicy: NewEnrichGetPolicy(t), + EnrichPutPolicy: NewEnrichPutPolicy(t), + EnrichStats: NewEnrichStats(t), + EqlDelete: NewEqlDelete(t), + EqlGet: NewEqlGet(t), + EqlSearch: NewEqlSearch(t), + Exists: NewExists(t), + ExistsSource: NewExistsSource(t), + Explain: NewExplain(t), + FieldCaps: NewFieldCaps(t), + Get: NewGet(t), + GetScriptContext: NewGetScriptContext(t), + GetScriptLanguages: NewGetScriptLanguages(t), + GetScript: NewGetScript(t), + GetSource: NewGetSource(t), + GraphExplore: NewGraphExplore(t), + Index: NewIndex(t), + Info: NewInfo(t), + Mget: NewMget(t), + Msearch: NewMsearch(t), + MsearchTemplate: NewMsearchTemplate(t), + Mtermvectors: NewMtermvectors(t), + Ping: NewPing(t), + PutScript: NewPutScript(t), + RankEval: NewRankEval(t), + Reindex: NewReindex(t), + ReindexRethrottle: NewReindexRethrottle(t), + RenderSearchTemplate: NewRenderSearchTemplate(t), + ScriptsPainlessExecute: NewScriptsPainlessExecute(t), + Scroll: NewScroll(t), + Search: NewSearch(t), + SearchShards: NewSearchShards(t), + SearchTemplate: NewSearchTemplate(t), + SearchableSnapshotsClearCache: NewSearchableSnapshotsClearCache(t), + SearchableSnapshotsMount: NewSearchableSnapshotsMount(t), + SearchableSnapshotsRepositoryStats: NewSearchableSnapshotsRepositoryStats(t), + SearchableSnapshotsStats: NewSearchableSnapshotsStats(t), + SlmDeleteLifecycle: NewSlmDeleteLifecycle(t), + SlmExecuteLifecycle: NewSlmExecuteLifecycle(t), + SlmExecuteRetention: NewSlmExecuteRetention(t), + SlmGetLifecycle: NewSlmGetLifecycle(t), + SlmGetStats: NewSlmGetStats(t), + SlmGetStatus: NewSlmGetStatus(t), + SlmPutLifecycle: NewSlmPutLifecycle(t), + SlmStart: NewSlmStart(t), + SlmStop: NewSlmStop(t), + Termvectors: NewTermvectors(t), + TransformDeleteTransform: NewTransformDeleteTransform(t), + TransformGetTransform: NewTransformGetTransform(t), + TransformGetTransformStats: NewTransformGetTransformStats(t), + TransformPreviewTransform: NewTransformPreviewTransform(t), + TransformPutTransform: NewTransformPutTransform(t), + TransformStartTransform: NewTransformStartTransform(t), + TransformStopTransform: NewTransformStopTransform(t), + TransformUpdateTransform: NewTransformUpdateTransform(t), + UpdateByQuery: NewUpdateByQuery(t), + UpdateByQueryRethrottle: NewUpdateByQueryRethrottle(t), + Update: NewUpdate(t), + Cat: NewCat(t), + Cluster: NewCluster(t), + Indices: NewIndices(t), + Ingest: NewIngest(t), + Nodes: NewNodes(t), + Remote: NewRemote(t), + Snapshot: NewSnapshot(t), + Tasks: NewTasks(t), + AsyncSearch: NewAsyncSearch(t), + CCR: NewCCR(t), + ILM: NewILM(t), + License: NewLicense(t), + Migration: NewMigration(t), + ML: NewML(t), + Monitoring: NewMonitoring(t), + Rollup: NewRollup(t), + Security: NewSecurity(t), + SQL: NewSQL(t), + SSL: NewSSL(t), + Watcher: NewWatcher(t), + XPack: NewXPack(t), } } diff --git a/esapi/api.bulk.go b/esapi/api.bulk.go index 25307cebdf..60e4144791 100644 --- a/esapi/api.bulk.go +++ b/esapi/api.bulk.go @@ -15,7 +15,9 @@ import ( "time" ) -func newBulkFunc(t Transport) Bulk { +// NewBulk creates a new API client for the Bulk endpoint +// +func NewBulk(t Transport) Bulk { return func(body io.Reader, o ...func(*BulkRequest)) (*Response, error) { var r = BulkRequest{Body: body} for _, f := range o { diff --git a/esapi/api.cat.aliases.go b/esapi/api.cat.aliases.go index ccfada3bbd..c8879c2363 100644 --- a/esapi/api.cat.aliases.go +++ b/esapi/api.cat.aliases.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newCatAliasesFunc(t Transport) CatAliases { +// NewCatAliases creates a new API client for the CatAliases endpoint +// +func NewCatAliases(t Transport) CatAliases { return func(o ...func(*CatAliasesRequest)) (*Response, error) { var r = CatAliasesRequest{} for _, f := range o { diff --git a/esapi/api.cat.allocation.go b/esapi/api.cat.allocation.go index eed8fc6092..8d103f4933 100644 --- a/esapi/api.cat.allocation.go +++ b/esapi/api.cat.allocation.go @@ -14,7 +14,9 @@ import ( "time" ) -func newCatAllocationFunc(t Transport) CatAllocation { +// NewCatAllocation creates a new API client for the CatAllocation endpoint +// +func NewCatAllocation(t Transport) CatAllocation { return func(o ...func(*CatAllocationRequest)) (*Response, error) { var r = CatAllocationRequest{} for _, f := range o { diff --git a/esapi/api.cat.count.go b/esapi/api.cat.count.go index e95a25f5c7..623ac1f2d5 100644 --- a/esapi/api.cat.count.go +++ b/esapi/api.cat.count.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newCatCountFunc(t Transport) CatCount { +// NewCatCount creates a new API client for the CatCount endpoint +// +func NewCatCount(t Transport) CatCount { return func(o ...func(*CatCountRequest)) (*Response, error) { var r = CatCountRequest{} for _, f := range o { diff --git a/esapi/api.cat.fielddata.go b/esapi/api.cat.fielddata.go index a41c869839..0860d43e6d 100644 --- a/esapi/api.cat.fielddata.go +++ b/esapi/api.cat.fielddata.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newCatFielddataFunc(t Transport) CatFielddata { +// NewCatFielddata creates a new API client for the CatFielddata endpoint +// +func NewCatFielddata(t Transport) CatFielddata { return func(o ...func(*CatFielddataRequest)) (*Response, error) { var r = CatFielddataRequest{} for _, f := range o { diff --git a/esapi/api.cat.health.go b/esapi/api.cat.health.go index d7276ede3e..df0aa67f00 100644 --- a/esapi/api.cat.health.go +++ b/esapi/api.cat.health.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newCatHealthFunc(t Transport) CatHealth { +// NewCatHealth creates a new API client for the CatHealth endpoint +// +func NewCatHealth(t Transport) CatHealth { return func(o ...func(*CatHealthRequest)) (*Response, error) { var r = CatHealthRequest{} for _, f := range o { diff --git a/esapi/api.cat.help.go b/esapi/api.cat.help.go index 9232b895f2..b95723181b 100644 --- a/esapi/api.cat.help.go +++ b/esapi/api.cat.help.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newCatHelpFunc(t Transport) CatHelp { +// NewCatHelp creates a new API client for the CatHelp endpoint +// +func NewCatHelp(t Transport) CatHelp { return func(o ...func(*CatHelpRequest)) (*Response, error) { var r = CatHelpRequest{} for _, f := range o { diff --git a/esapi/api.cat.indices.go b/esapi/api.cat.indices.go index 5d0499f2b2..5850373edf 100644 --- a/esapi/api.cat.indices.go +++ b/esapi/api.cat.indices.go @@ -14,7 +14,9 @@ import ( "time" ) -func newCatIndicesFunc(t Transport) CatIndices { +// NewCatIndices creates a new API client for the CatIndices endpoint +// +func NewCatIndices(t Transport) CatIndices { return func(o ...func(*CatIndicesRequest)) (*Response, error) { var r = CatIndicesRequest{} for _, f := range o { diff --git a/esapi/api.cat.master.go b/esapi/api.cat.master.go index f42c1fb018..32f8741ec3 100644 --- a/esapi/api.cat.master.go +++ b/esapi/api.cat.master.go @@ -14,7 +14,9 @@ import ( "time" ) -func newCatMasterFunc(t Transport) CatMaster { +// NewCatMaster creates a new API client for the CatMaster endpoint +// +func NewCatMaster(t Transport) CatMaster { return func(o ...func(*CatMasterRequest)) (*Response, error) { var r = CatMasterRequest{} for _, f := range o { diff --git a/esapi/api.cat.nodeattrs.go b/esapi/api.cat.nodeattrs.go index ba2c670035..21fc6abb94 100644 --- a/esapi/api.cat.nodeattrs.go +++ b/esapi/api.cat.nodeattrs.go @@ -14,7 +14,9 @@ import ( "time" ) -func newCatNodeattrsFunc(t Transport) CatNodeattrs { +// NewCatNodeattrs creates a new API client for the CatNodeattrs endpoint +// +func NewCatNodeattrs(t Transport) CatNodeattrs { return func(o ...func(*CatNodeattrsRequest)) (*Response, error) { var r = CatNodeattrsRequest{} for _, f := range o { diff --git a/esapi/api.cat.nodes.go b/esapi/api.cat.nodes.go index 3cb96c7a2a..1937ff2264 100644 --- a/esapi/api.cat.nodes.go +++ b/esapi/api.cat.nodes.go @@ -14,7 +14,9 @@ import ( "time" ) -func newCatNodesFunc(t Transport) CatNodes { +// NewCatNodes creates a new API client for the CatNodes endpoint +// +func NewCatNodes(t Transport) CatNodes { return func(o ...func(*CatNodesRequest)) (*Response, error) { var r = CatNodesRequest{} for _, f := range o { diff --git a/esapi/api.cat.pending_tasks.go b/esapi/api.cat.pending_tasks.go index 7cdedd0fd8..7c7608de89 100644 --- a/esapi/api.cat.pending_tasks.go +++ b/esapi/api.cat.pending_tasks.go @@ -14,7 +14,9 @@ import ( "time" ) -func newCatPendingTasksFunc(t Transport) CatPendingTasks { +// NewCatPendingTasks creates a new API client for the CatPendingTasks endpoint +// +func NewCatPendingTasks(t Transport) CatPendingTasks { return func(o ...func(*CatPendingTasksRequest)) (*Response, error) { var r = CatPendingTasksRequest{} for _, f := range o { diff --git a/esapi/api.cat.plugins.go b/esapi/api.cat.plugins.go index fc2c92c4f2..0bb4def177 100644 --- a/esapi/api.cat.plugins.go +++ b/esapi/api.cat.plugins.go @@ -14,7 +14,9 @@ import ( "time" ) -func newCatPluginsFunc(t Transport) CatPlugins { +// NewCatPlugins creates a new API client for the CatPlugins endpoint +// +func NewCatPlugins(t Transport) CatPlugins { return func(o ...func(*CatPluginsRequest)) (*Response, error) { var r = CatPluginsRequest{} for _, f := range o { diff --git a/esapi/api.cat.recovery.go b/esapi/api.cat.recovery.go index 2af7694c16..26502eb899 100644 --- a/esapi/api.cat.recovery.go +++ b/esapi/api.cat.recovery.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newCatRecoveryFunc(t Transport) CatRecovery { +// NewCatRecovery creates a new API client for the CatRecovery endpoint +// +func NewCatRecovery(t Transport) CatRecovery { return func(o ...func(*CatRecoveryRequest)) (*Response, error) { var r = CatRecoveryRequest{} for _, f := range o { diff --git a/esapi/api.cat.repositories.go b/esapi/api.cat.repositories.go index 9ad925e396..204fd157af 100644 --- a/esapi/api.cat.repositories.go +++ b/esapi/api.cat.repositories.go @@ -14,7 +14,9 @@ import ( "time" ) -func newCatRepositoriesFunc(t Transport) CatRepositories { +// NewCatRepositories creates a new API client for the CatRepositories endpoint +// +func NewCatRepositories(t Transport) CatRepositories { return func(o ...func(*CatRepositoriesRequest)) (*Response, error) { var r = CatRepositoriesRequest{} for _, f := range o { diff --git a/esapi/api.cat.segments.go b/esapi/api.cat.segments.go index 126259df86..f9983b982b 100644 --- a/esapi/api.cat.segments.go +++ b/esapi/api.cat.segments.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newCatSegmentsFunc(t Transport) CatSegments { +// NewCatSegments creates a new API client for the CatSegments endpoint +// +func NewCatSegments(t Transport) CatSegments { return func(o ...func(*CatSegmentsRequest)) (*Response, error) { var r = CatSegmentsRequest{} for _, f := range o { diff --git a/esapi/api.cat.shards.go b/esapi/api.cat.shards.go index 548106ab19..f68a99a3e7 100644 --- a/esapi/api.cat.shards.go +++ b/esapi/api.cat.shards.go @@ -14,7 +14,9 @@ import ( "time" ) -func newCatShardsFunc(t Transport) CatShards { +// NewCatShards creates a new API client for the CatShards endpoint +// +func NewCatShards(t Transport) CatShards { return func(o ...func(*CatShardsRequest)) (*Response, error) { var r = CatShardsRequest{} for _, f := range o { diff --git a/esapi/api.cat.snapshots.go b/esapi/api.cat.snapshots.go index 947e44ee95..309ea991fe 100644 --- a/esapi/api.cat.snapshots.go +++ b/esapi/api.cat.snapshots.go @@ -14,7 +14,9 @@ import ( "time" ) -func newCatSnapshotsFunc(t Transport) CatSnapshots { +// NewCatSnapshots creates a new API client for the CatSnapshots endpoint +// +func NewCatSnapshots(t Transport) CatSnapshots { return func(o ...func(*CatSnapshotsRequest)) (*Response, error) { var r = CatSnapshotsRequest{} for _, f := range o { diff --git a/esapi/api.cat.tasks.go b/esapi/api.cat.tasks.go index 5d9f95affb..ff5c5939c8 100644 --- a/esapi/api.cat.tasks.go +++ b/esapi/api.cat.tasks.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newCatTasksFunc(t Transport) CatTasks { +// NewCatTasks creates a new API client for the CatTasks endpoint +// +func NewCatTasks(t Transport) CatTasks { return func(o ...func(*CatTasksRequest)) (*Response, error) { var r = CatTasksRequest{} for _, f := range o { diff --git a/esapi/api.cat.templates.go b/esapi/api.cat.templates.go index e42d5eba3d..0be4f2130e 100644 --- a/esapi/api.cat.templates.go +++ b/esapi/api.cat.templates.go @@ -14,7 +14,9 @@ import ( "time" ) -func newCatTemplatesFunc(t Transport) CatTemplates { +// NewCatTemplates creates a new API client for the CatTemplates endpoint +// +func NewCatTemplates(t Transport) CatTemplates { return func(o ...func(*CatTemplatesRequest)) (*Response, error) { var r = CatTemplatesRequest{} for _, f := range o { diff --git a/esapi/api.cat.thread_pool.go b/esapi/api.cat.thread_pool.go index 2ea35299ae..e5af16f3e9 100644 --- a/esapi/api.cat.thread_pool.go +++ b/esapi/api.cat.thread_pool.go @@ -14,7 +14,9 @@ import ( "time" ) -func newCatThreadPoolFunc(t Transport) CatThreadPool { +// NewCatThreadPool creates a new API client for the CatThreadPool endpoint +// +func NewCatThreadPool(t Transport) CatThreadPool { return func(o ...func(*CatThreadPoolRequest)) (*Response, error) { var r = CatThreadPoolRequest{} for _, f := range o { diff --git a/esapi/api.clear_scroll.go b/esapi/api.clear_scroll.go index 609257f5f3..b27874704c 100644 --- a/esapi/api.clear_scroll.go +++ b/esapi/api.clear_scroll.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newClearScrollFunc(t Transport) ClearScroll { +// NewClearScroll creates a new API client for the ClearScroll endpoint +// +func NewClearScroll(t Transport) ClearScroll { return func(o ...func(*ClearScrollRequest)) (*Response, error) { var r = ClearScrollRequest{} for _, f := range o { @@ -27,7 +29,7 @@ func newClearScrollFunc(t Transport) ClearScroll { // ClearScroll explicitly clears the search context for a scroll. // -// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#_clear_scroll_api. +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-scroll-api.html. // type ClearScroll func(o ...func(*ClearScrollRequest)) (*Response, error) diff --git a/esapi/api.cluster.allocation_explain.go b/esapi/api.cluster.allocation_explain.go index d441a68f07..7c9afec14a 100644 --- a/esapi/api.cluster.allocation_explain.go +++ b/esapi/api.cluster.allocation_explain.go @@ -14,7 +14,9 @@ import ( "strings" ) -func newClusterAllocationExplainFunc(t Transport) ClusterAllocationExplain { +// NewClusterAllocationExplain creates a new API client for the ClusterAllocationExplain endpoint +// +func NewClusterAllocationExplain(t Transport) ClusterAllocationExplain { return func(o ...func(*ClusterAllocationExplainRequest)) (*Response, error) { var r = ClusterAllocationExplainRequest{} for _, f := range o { diff --git a/esapi/api.cluster.delete_component_template.go b/esapi/api.cluster.delete_component_template.go index d9c7ccbbfd..bd8797e9be 100644 --- a/esapi/api.cluster.delete_component_template.go +++ b/esapi/api.cluster.delete_component_template.go @@ -13,7 +13,9 @@ import ( "time" ) -func newClusterDeleteComponentTemplateFunc(t Transport) ClusterDeleteComponentTemplate { +// NewClusterDeleteComponentTemplate creates a new API client for the ClusterDeleteComponentTemplate endpoint +// +func NewClusterDeleteComponentTemplate(t Transport) ClusterDeleteComponentTemplate { return func(name string, o ...func(*ClusterDeleteComponentTemplateRequest)) (*Response, error) { var r = ClusterDeleteComponentTemplateRequest{Name: name} for _, f := range o { diff --git a/esapi/api.cluster.delete_voting_config_exclusions.go b/esapi/api.cluster.delete_voting_config_exclusions.go index 73a56755a5..b910e34160 100644 --- a/esapi/api.cluster.delete_voting_config_exclusions.go +++ b/esapi/api.cluster.delete_voting_config_exclusions.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newClusterDeleteVotingConfigExclusionsFunc(t Transport) ClusterDeleteVotingConfigExclusions { +// NewClusterDeleteVotingConfigExclusions creates a new API client for the ClusterDeleteVotingConfigExclusions endpoint +// +func NewClusterDeleteVotingConfigExclusions(t Transport) ClusterDeleteVotingConfigExclusions { return func(o ...func(*ClusterDeleteVotingConfigExclusionsRequest)) (*Response, error) { var r = ClusterDeleteVotingConfigExclusionsRequest{} for _, f := range o { diff --git a/esapi/api.cluster.exists_component_template.go b/esapi/api.cluster.exists_component_template.go index ec5d4cfdd5..3e3885bb48 100644 --- a/esapi/api.cluster.exists_component_template.go +++ b/esapi/api.cluster.exists_component_template.go @@ -14,7 +14,9 @@ import ( "time" ) -func newClusterExistsComponentTemplateFunc(t Transport) ClusterExistsComponentTemplate { +// NewClusterExistsComponentTemplate creates a new API client for the ClusterExistsComponentTemplate endpoint +// +func NewClusterExistsComponentTemplate(t Transport) ClusterExistsComponentTemplate { return func(name string, o ...func(*ClusterExistsComponentTemplateRequest)) (*Response, error) { var r = ClusterExistsComponentTemplateRequest{Name: name} for _, f := range o { diff --git a/esapi/api.cluster.get_component_template.go b/esapi/api.cluster.get_component_template.go index 1f95e1f864..75beb7a447 100644 --- a/esapi/api.cluster.get_component_template.go +++ b/esapi/api.cluster.get_component_template.go @@ -14,7 +14,9 @@ import ( "time" ) -func newClusterGetComponentTemplateFunc(t Transport) ClusterGetComponentTemplate { +// NewClusterGetComponentTemplate creates a new API client for the ClusterGetComponentTemplate endpoint +// +func NewClusterGetComponentTemplate(t Transport) ClusterGetComponentTemplate { return func(o ...func(*ClusterGetComponentTemplateRequest)) (*Response, error) { var r = ClusterGetComponentTemplateRequest{} for _, f := range o { diff --git a/esapi/api.cluster.get_settings.go b/esapi/api.cluster.get_settings.go index 6a89b46967..4e7a5db0b7 100644 --- a/esapi/api.cluster.get_settings.go +++ b/esapi/api.cluster.get_settings.go @@ -14,7 +14,9 @@ import ( "time" ) -func newClusterGetSettingsFunc(t Transport) ClusterGetSettings { +// NewClusterGetSettings creates a new API client for the ClusterGetSettings endpoint +// +func NewClusterGetSettings(t Transport) ClusterGetSettings { return func(o ...func(*ClusterGetSettingsRequest)) (*Response, error) { var r = ClusterGetSettingsRequest{} for _, f := range o { diff --git a/esapi/api.cluster.health.go b/esapi/api.cluster.health.go index a579b0b21b..db895e4dd7 100644 --- a/esapi/api.cluster.health.go +++ b/esapi/api.cluster.health.go @@ -14,7 +14,9 @@ import ( "time" ) -func newClusterHealthFunc(t Transport) ClusterHealth { +// NewClusterHealth creates a new API client for the ClusterHealth endpoint +// +func NewClusterHealth(t Transport) ClusterHealth { return func(o ...func(*ClusterHealthRequest)) (*Response, error) { var r = ClusterHealthRequest{} for _, f := range o { diff --git a/esapi/api.cluster.pending_tasks.go b/esapi/api.cluster.pending_tasks.go index 33fa789ed2..3e2c73fab4 100644 --- a/esapi/api.cluster.pending_tasks.go +++ b/esapi/api.cluster.pending_tasks.go @@ -14,7 +14,9 @@ import ( "time" ) -func newClusterPendingTasksFunc(t Transport) ClusterPendingTasks { +// NewClusterPendingTasks creates a new API client for the ClusterPendingTasks endpoint +// +func NewClusterPendingTasks(t Transport) ClusterPendingTasks { return func(o ...func(*ClusterPendingTasksRequest)) (*Response, error) { var r = ClusterPendingTasksRequest{} for _, f := range o { diff --git a/esapi/api.cluster.post_voting_config_exclusions.go b/esapi/api.cluster.post_voting_config_exclusions.go index 5470b39e5f..ca0e80818d 100644 --- a/esapi/api.cluster.post_voting_config_exclusions.go +++ b/esapi/api.cluster.post_voting_config_exclusions.go @@ -13,7 +13,9 @@ import ( "time" ) -func newClusterPostVotingConfigExclusionsFunc(t Transport) ClusterPostVotingConfigExclusions { +// NewClusterPostVotingConfigExclusions creates a new API client for the ClusterPostVotingConfigExclusions endpoint +// +func NewClusterPostVotingConfigExclusions(t Transport) ClusterPostVotingConfigExclusions { return func(o ...func(*ClusterPostVotingConfigExclusionsRequest)) (*Response, error) { var r = ClusterPostVotingConfigExclusionsRequest{} for _, f := range o { diff --git a/esapi/api.cluster.put_component_template.go b/esapi/api.cluster.put_component_template.go index e595f23f58..90bda58447 100644 --- a/esapi/api.cluster.put_component_template.go +++ b/esapi/api.cluster.put_component_template.go @@ -15,7 +15,9 @@ import ( "time" ) -func newClusterPutComponentTemplateFunc(t Transport) ClusterPutComponentTemplate { +// NewClusterPutComponentTemplate creates a new API client for the ClusterPutComponentTemplate endpoint +// +func NewClusterPutComponentTemplate(t Transport) ClusterPutComponentTemplate { return func(name string, body io.Reader, o ...func(*ClusterPutComponentTemplateRequest)) (*Response, error) { var r = ClusterPutComponentTemplateRequest{Name: name, Body: body} for _, f := range o { diff --git a/esapi/api.cluster.put_settings.go b/esapi/api.cluster.put_settings.go index 75ebca4f23..04dc1a4a29 100644 --- a/esapi/api.cluster.put_settings.go +++ b/esapi/api.cluster.put_settings.go @@ -15,7 +15,9 @@ import ( "time" ) -func newClusterPutSettingsFunc(t Transport) ClusterPutSettings { +// NewClusterPutSettings creates a new API client for the ClusterPutSettings endpoint +// +func NewClusterPutSettings(t Transport) ClusterPutSettings { return func(body io.Reader, o ...func(*ClusterPutSettingsRequest)) (*Response, error) { var r = ClusterPutSettingsRequest{Body: body} for _, f := range o { diff --git a/esapi/api.cluster.remote_info.go b/esapi/api.cluster.remote_info.go index 4f7979f77c..c22481a140 100644 --- a/esapi/api.cluster.remote_info.go +++ b/esapi/api.cluster.remote_info.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newClusterRemoteInfoFunc(t Transport) ClusterRemoteInfo { +// NewClusterRemoteInfo creates a new API client for the ClusterRemoteInfo endpoint +// +func NewClusterRemoteInfo(t Transport) ClusterRemoteInfo { return func(o ...func(*ClusterRemoteInfoRequest)) (*Response, error) { var r = ClusterRemoteInfoRequest{} for _, f := range o { diff --git a/esapi/api.cluster.reroute.go b/esapi/api.cluster.reroute.go index 34772e2de9..c43b875e6d 100644 --- a/esapi/api.cluster.reroute.go +++ b/esapi/api.cluster.reroute.go @@ -15,7 +15,9 @@ import ( "time" ) -func newClusterRerouteFunc(t Transport) ClusterReroute { +// NewClusterReroute creates a new API client for the ClusterReroute endpoint +// +func NewClusterReroute(t Transport) ClusterReroute { return func(o ...func(*ClusterRerouteRequest)) (*Response, error) { var r = ClusterRerouteRequest{} for _, f := range o { diff --git a/esapi/api.cluster.state.go b/esapi/api.cluster.state.go index 2a1161e727..8359a7c17e 100644 --- a/esapi/api.cluster.state.go +++ b/esapi/api.cluster.state.go @@ -14,7 +14,9 @@ import ( "time" ) -func newClusterStateFunc(t Transport) ClusterState { +// NewClusterState creates a new API client for the ClusterState endpoint +// +func NewClusterState(t Transport) ClusterState { return func(o ...func(*ClusterStateRequest)) (*Response, error) { var r = ClusterStateRequest{} for _, f := range o { diff --git a/esapi/api.cluster.stats.go b/esapi/api.cluster.stats.go index f0dcc6a94a..bedb9bfc61 100644 --- a/esapi/api.cluster.stats.go +++ b/esapi/api.cluster.stats.go @@ -14,7 +14,9 @@ import ( "time" ) -func newClusterStatsFunc(t Transport) ClusterStats { +// NewClusterStats creates a new API client for the ClusterStats endpoint +// +func NewClusterStats(t Transport) ClusterStats { return func(o ...func(*ClusterStatsRequest)) (*Response, error) { var r = ClusterStatsRequest{} for _, f := range o { diff --git a/esapi/api.count.go b/esapi/api.count.go index f37a808337..1cff7bed01 100644 --- a/esapi/api.count.go +++ b/esapi/api.count.go @@ -14,7 +14,9 @@ import ( "strings" ) -func newCountFunc(t Transport) Count { +// NewCount creates a new API client for the Count endpoint +// +func NewCount(t Transport) Count { return func(o ...func(*CountRequest)) (*Response, error) { var r = CountRequest{} for _, f := range o { diff --git a/esapi/api.create.go b/esapi/api.create.go index d76f20a99a..5355119277 100644 --- a/esapi/api.create.go +++ b/esapi/api.create.go @@ -15,7 +15,9 @@ import ( "time" ) -func newCreateFunc(t Transport) Create { +// NewCreate creates a new API client for the Create endpoint +// +func NewCreate(t Transport) Create { return func(index string, id string, body io.Reader, o ...func(*CreateRequest)) (*Response, error) { var r = CreateRequest{Index: index, DocumentID: id, Body: body} for _, f := range o { diff --git a/esapi/api.dangling_indices.delete_dangling_index.go b/esapi/api.dangling_indices.delete_dangling_index.go index a4bd64b8a7..8ccdeb0736 100644 --- a/esapi/api.dangling_indices.delete_dangling_index.go +++ b/esapi/api.dangling_indices.delete_dangling_index.go @@ -14,7 +14,9 @@ import ( "time" ) -func newDanglingIndicesDeleteDanglingIndexFunc(t Transport) DanglingIndicesDeleteDanglingIndex { +// NewDanglingIndicesDeleteDanglingIndex creates a new API client for the DanglingIndicesDeleteDanglingIndex endpoint +// +func NewDanglingIndicesDeleteDanglingIndex(t Transport) DanglingIndicesDeleteDanglingIndex { return func(index_uuid string, o ...func(*DanglingIndicesDeleteDanglingIndexRequest)) (*Response, error) { var r = DanglingIndicesDeleteDanglingIndexRequest{IndexUuid: index_uuid} for _, f := range o { diff --git a/esapi/api.dangling_indices.import_dangling_index.go b/esapi/api.dangling_indices.import_dangling_index.go index b408adbbf1..fc606c87be 100644 --- a/esapi/api.dangling_indices.import_dangling_index.go +++ b/esapi/api.dangling_indices.import_dangling_index.go @@ -14,7 +14,9 @@ import ( "time" ) -func newDanglingIndicesImportDanglingIndexFunc(t Transport) DanglingIndicesImportDanglingIndex { +// NewDanglingIndicesImportDanglingIndex creates a new API client for the DanglingIndicesImportDanglingIndex endpoint +// +func NewDanglingIndicesImportDanglingIndex(t Transport) DanglingIndicesImportDanglingIndex { return func(index_uuid string, o ...func(*DanglingIndicesImportDanglingIndexRequest)) (*Response, error) { var r = DanglingIndicesImportDanglingIndexRequest{IndexUuid: index_uuid} for _, f := range o { diff --git a/esapi/api.dangling_indices.list_dangling_indices.go b/esapi/api.dangling_indices.list_dangling_indices.go index 34a7633d97..1eb1d73381 100644 --- a/esapi/api.dangling_indices.list_dangling_indices.go +++ b/esapi/api.dangling_indices.list_dangling_indices.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newDanglingIndicesListDanglingIndicesFunc(t Transport) DanglingIndicesListDanglingIndices { +// NewDanglingIndicesListDanglingIndices creates a new API client for the DanglingIndicesListDanglingIndices endpoint +// +func NewDanglingIndicesListDanglingIndices(t Transport) DanglingIndicesListDanglingIndices { return func(o ...func(*DanglingIndicesListDanglingIndicesRequest)) (*Response, error) { var r = DanglingIndicesListDanglingIndicesRequest{} for _, f := range o { diff --git a/esapi/api.delete.go b/esapi/api.delete.go index 935d1b381c..cfa1eea56b 100644 --- a/esapi/api.delete.go +++ b/esapi/api.delete.go @@ -14,7 +14,9 @@ import ( "time" ) -func newDeleteFunc(t Transport) Delete { +// NewDelete creates a new API client for the Delete endpoint +// +func NewDelete(t Transport) Delete { return func(index string, id string, o ...func(*DeleteRequest)) (*Response, error) { var r = DeleteRequest{Index: index, DocumentID: id} for _, f := range o { diff --git a/esapi/api.delete_by_query.go b/esapi/api.delete_by_query.go index 1c9be67e5b..ca54558c8f 100644 --- a/esapi/api.delete_by_query.go +++ b/esapi/api.delete_by_query.go @@ -16,7 +16,9 @@ import ( "time" ) -func newDeleteByQueryFunc(t Transport) DeleteByQuery { +// NewDeleteByQuery creates a new API client for the DeleteByQuery endpoint +// +func NewDeleteByQuery(t Transport) DeleteByQuery { return func(index []string, body io.Reader, o ...func(*DeleteByQueryRequest)) (*Response, error) { var r = DeleteByQueryRequest{Index: index, Body: body} for _, f := range o { diff --git a/esapi/api.delete_by_query_rethrottle.go b/esapi/api.delete_by_query_rethrottle.go index 8a29305360..505f254444 100644 --- a/esapi/api.delete_by_query_rethrottle.go +++ b/esapi/api.delete_by_query_rethrottle.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newDeleteByQueryRethrottleFunc(t Transport) DeleteByQueryRethrottle { +// NewDeleteByQueryRethrottle creates a new API client for the DeleteByQueryRethrottle endpoint +// +func NewDeleteByQueryRethrottle(t Transport) DeleteByQueryRethrottle { return func(task_id string, requests_per_second *int, o ...func(*DeleteByQueryRethrottleRequest)) (*Response, error) { var r = DeleteByQueryRethrottleRequest{TaskID: task_id, RequestsPerSecond: requests_per_second} for _, f := range o { diff --git a/esapi/api.delete_script.go b/esapi/api.delete_script.go index a53fdafb32..4f97c342de 100644 --- a/esapi/api.delete_script.go +++ b/esapi/api.delete_script.go @@ -13,7 +13,9 @@ import ( "time" ) -func newDeleteScriptFunc(t Transport) DeleteScript { +// NewDeleteScript creates a new API client for the DeleteScript endpoint +// +func NewDeleteScript(t Transport) DeleteScript { return func(id string, o ...func(*DeleteScriptRequest)) (*Response, error) { var r = DeleteScriptRequest{ScriptID: id} for _, f := range o { diff --git a/esapi/api.exists.go b/esapi/api.exists.go index ce7d6da685..a40f968cdb 100644 --- a/esapi/api.exists.go +++ b/esapi/api.exists.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newExistsFunc(t Transport) Exists { +// NewExists creates a new API client for the Exists endpoint +// +func NewExists(t Transport) Exists { return func(index string, id string, o ...func(*ExistsRequest)) (*Response, error) { var r = ExistsRequest{Index: index, DocumentID: id} for _, f := range o { diff --git a/esapi/api.exists_source.go b/esapi/api.exists_source.go index dbae037153..782823a15f 100644 --- a/esapi/api.exists_source.go +++ b/esapi/api.exists_source.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newExistsSourceFunc(t Transport) ExistsSource { +// NewExistsSource creates a new API client for the ExistsSource endpoint +// +func NewExistsSource(t Transport) ExistsSource { return func(index string, id string, o ...func(*ExistsSourceRequest)) (*Response, error) { var r = ExistsSourceRequest{Index: index, DocumentID: id} for _, f := range o { diff --git a/esapi/api.explain.go b/esapi/api.explain.go index cdf1c3774e..bdf5490a1e 100644 --- a/esapi/api.explain.go +++ b/esapi/api.explain.go @@ -14,7 +14,9 @@ import ( "strings" ) -func newExplainFunc(t Transport) Explain { +// NewExplain creates a new API client for the Explain endpoint +// +func NewExplain(t Transport) Explain { return func(index string, id string, o ...func(*ExplainRequest)) (*Response, error) { var r = ExplainRequest{Index: index, DocumentID: id} for _, f := range o { diff --git a/esapi/api.field_caps.go b/esapi/api.field_caps.go index 7aa6a2bc5a..ec8c74e7dd 100644 --- a/esapi/api.field_caps.go +++ b/esapi/api.field_caps.go @@ -14,7 +14,9 @@ import ( "strings" ) -func newFieldCapsFunc(t Transport) FieldCaps { +// NewFieldCaps creates a new API client for the FieldCaps endpoint +// +func NewFieldCaps(t Transport) FieldCaps { return func(o ...func(*FieldCapsRequest)) (*Response, error) { var r = FieldCapsRequest{} for _, f := range o { diff --git a/esapi/api.get.go b/esapi/api.get.go index 2851f2bbb1..5bd0a3ef40 100644 --- a/esapi/api.get.go +++ b/esapi/api.get.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newGetFunc(t Transport) Get { +// NewGet creates a new API client for the Get endpoint +// +func NewGet(t Transport) Get { return func(index string, id string, o ...func(*GetRequest)) (*Response, error) { var r = GetRequest{Index: index, DocumentID: id} for _, f := range o { diff --git a/esapi/api.get_script.go b/esapi/api.get_script.go index c092c72c93..3968cf011e 100644 --- a/esapi/api.get_script.go +++ b/esapi/api.get_script.go @@ -13,7 +13,9 @@ import ( "time" ) -func newGetScriptFunc(t Transport) GetScript { +// NewGetScript creates a new API client for the GetScript endpoint +// +func NewGetScript(t Transport) GetScript { return func(id string, o ...func(*GetScriptRequest)) (*Response, error) { var r = GetScriptRequest{ScriptID: id} for _, f := range o { diff --git a/esapi/api.get_script_context.go b/esapi/api.get_script_context.go index 2f8f2d5b2f..1dae18ef90 100644 --- a/esapi/api.get_script_context.go +++ b/esapi/api.get_script_context.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newGetScriptContextFunc(t Transport) GetScriptContext { +// NewGetScriptContext creates a new API client for the GetScriptContext endpoint +// +func NewGetScriptContext(t Transport) GetScriptContext { return func(o ...func(*GetScriptContextRequest)) (*Response, error) { var r = GetScriptContextRequest{} for _, f := range o { diff --git a/esapi/api.get_script_languages.go b/esapi/api.get_script_languages.go index 68a3f4b981..f9afd07d45 100644 --- a/esapi/api.get_script_languages.go +++ b/esapi/api.get_script_languages.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newGetScriptLanguagesFunc(t Transport) GetScriptLanguages { +// NewGetScriptLanguages creates a new API client for the GetScriptLanguages endpoint +// +func NewGetScriptLanguages(t Transport) GetScriptLanguages { return func(o ...func(*GetScriptLanguagesRequest)) (*Response, error) { var r = GetScriptLanguagesRequest{} for _, f := range o { diff --git a/esapi/api.get_source.go b/esapi/api.get_source.go index fb2ce2aad1..4a0882d68d 100644 --- a/esapi/api.get_source.go +++ b/esapi/api.get_source.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newGetSourceFunc(t Transport) GetSource { +// NewGetSource creates a new API client for the GetSource endpoint +// +func NewGetSource(t Transport) GetSource { return func(index string, id string, o ...func(*GetSourceRequest)) (*Response, error) { var r = GetSourceRequest{Index: index, DocumentID: id} for _, f := range o { diff --git a/esapi/api.index.go b/esapi/api.index.go index 865dbefdb6..2f3a8329ee 100644 --- a/esapi/api.index.go +++ b/esapi/api.index.go @@ -15,7 +15,9 @@ import ( "time" ) -func newIndexFunc(t Transport) Index { +// NewIndex creates a new API client for the Index endpoint +// +func NewIndex(t Transport) Index { return func(index string, body io.Reader, o ...func(*IndexRequest)) (*Response, error) { var r = IndexRequest{Index: index, Body: body} for _, f := range o { diff --git a/esapi/api.indices.add_block.go b/esapi/api.indices.add_block.go index 19a992eabc..23d50f7619 100644 --- a/esapi/api.indices.add_block.go +++ b/esapi/api.indices.add_block.go @@ -14,7 +14,9 @@ import ( "time" ) -func newIndicesAddBlockFunc(t Transport) IndicesAddBlock { +// NewIndicesAddBlock creates a new API client for the IndicesAddBlock endpoint +// +func NewIndicesAddBlock(t Transport) IndicesAddBlock { return func(index []string, block string, o ...func(*IndicesAddBlockRequest)) (*Response, error) { var r = IndicesAddBlockRequest{Index: index, Block: block} for _, f := range o { diff --git a/esapi/api.indices.analyze.go b/esapi/api.indices.analyze.go index 3dea9ef73b..e73a90524d 100644 --- a/esapi/api.indices.analyze.go +++ b/esapi/api.indices.analyze.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newIndicesAnalyzeFunc(t Transport) IndicesAnalyze { +// NewIndicesAnalyze creates a new API client for the IndicesAnalyze endpoint +// +func NewIndicesAnalyze(t Transport) IndicesAnalyze { return func(o ...func(*IndicesAnalyzeRequest)) (*Response, error) { var r = IndicesAnalyzeRequest{} for _, f := range o { diff --git a/esapi/api.indices.clear_cache.go b/esapi/api.indices.clear_cache.go index 5607f18df3..2302e1c86f 100644 --- a/esapi/api.indices.clear_cache.go +++ b/esapi/api.indices.clear_cache.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newIndicesClearCacheFunc(t Transport) IndicesClearCache { +// NewIndicesClearCache creates a new API client for the IndicesClearCache endpoint +// +func NewIndicesClearCache(t Transport) IndicesClearCache { return func(o ...func(*IndicesClearCacheRequest)) (*Response, error) { var r = IndicesClearCacheRequest{} for _, f := range o { diff --git a/esapi/api.indices.clone.go b/esapi/api.indices.clone.go index deed9ace4f..bdbfdc3b25 100644 --- a/esapi/api.indices.clone.go +++ b/esapi/api.indices.clone.go @@ -14,7 +14,9 @@ import ( "time" ) -func newIndicesCloneFunc(t Transport) IndicesClone { +// NewIndicesClone creates a new API client for the IndicesClone endpoint +// +func NewIndicesClone(t Transport) IndicesClone { return func(index string, target string, o ...func(*IndicesCloneRequest)) (*Response, error) { var r = IndicesCloneRequest{Index: index, Target: target} for _, f := range o { diff --git a/esapi/api.indices.close.go b/esapi/api.indices.close.go index 5ed67a53c0..1717100f22 100644 --- a/esapi/api.indices.close.go +++ b/esapi/api.indices.close.go @@ -14,7 +14,9 @@ import ( "time" ) -func newIndicesCloseFunc(t Transport) IndicesClose { +// NewIndicesClose creates a new API client for the IndicesClose endpoint +// +func NewIndicesClose(t Transport) IndicesClose { return func(index []string, o ...func(*IndicesCloseRequest)) (*Response, error) { var r = IndicesCloseRequest{Index: index} for _, f := range o { diff --git a/esapi/api.indices.create.go b/esapi/api.indices.create.go index 0616b53983..8dbe586156 100644 --- a/esapi/api.indices.create.go +++ b/esapi/api.indices.create.go @@ -14,7 +14,9 @@ import ( "time" ) -func newIndicesCreateFunc(t Transport) IndicesCreate { +// NewIndicesCreate creates a new API client for the IndicesCreate endpoint +// +func NewIndicesCreate(t Transport) IndicesCreate { return func(index string, o ...func(*IndicesCreateRequest)) (*Response, error) { var r = IndicesCreateRequest{Index: index} for _, f := range o { diff --git a/esapi/api.indices.delete.go b/esapi/api.indices.delete.go index 0e40112367..4485eb1036 100644 --- a/esapi/api.indices.delete.go +++ b/esapi/api.indices.delete.go @@ -14,7 +14,9 @@ import ( "time" ) -func newIndicesDeleteFunc(t Transport) IndicesDelete { +// NewIndicesDelete creates a new API client for the IndicesDelete endpoint +// +func NewIndicesDelete(t Transport) IndicesDelete { return func(index []string, o ...func(*IndicesDeleteRequest)) (*Response, error) { var r = IndicesDeleteRequest{Index: index} for _, f := range o { diff --git a/esapi/api.indices.delete_alias.go b/esapi/api.indices.delete_alias.go index 56ab9f6152..8ddf889cc7 100644 --- a/esapi/api.indices.delete_alias.go +++ b/esapi/api.indices.delete_alias.go @@ -13,7 +13,9 @@ import ( "time" ) -func newIndicesDeleteAliasFunc(t Transport) IndicesDeleteAlias { +// NewIndicesDeleteAlias creates a new API client for the IndicesDeleteAlias endpoint +// +func NewIndicesDeleteAlias(t Transport) IndicesDeleteAlias { return func(index []string, name []string, o ...func(*IndicesDeleteAliasRequest)) (*Response, error) { var r = IndicesDeleteAliasRequest{Index: index, Name: name} for _, f := range o { diff --git a/esapi/api.indices.delete_index_template.go b/esapi/api.indices.delete_index_template.go index 6c9ea749c7..8972a9ae11 100644 --- a/esapi/api.indices.delete_index_template.go +++ b/esapi/api.indices.delete_index_template.go @@ -13,7 +13,9 @@ import ( "time" ) -func newIndicesDeleteIndexTemplateFunc(t Transport) IndicesDeleteIndexTemplate { +// NewIndicesDeleteIndexTemplate creates a new API client for the IndicesDeleteIndexTemplate endpoint +// +func NewIndicesDeleteIndexTemplate(t Transport) IndicesDeleteIndexTemplate { return func(name string, o ...func(*IndicesDeleteIndexTemplateRequest)) (*Response, error) { var r = IndicesDeleteIndexTemplateRequest{Name: name} for _, f := range o { diff --git a/esapi/api.indices.delete_template.go b/esapi/api.indices.delete_template.go index 7d2f5ea5a7..cc5f39098e 100644 --- a/esapi/api.indices.delete_template.go +++ b/esapi/api.indices.delete_template.go @@ -13,7 +13,9 @@ import ( "time" ) -func newIndicesDeleteTemplateFunc(t Transport) IndicesDeleteTemplate { +// NewIndicesDeleteTemplate creates a new API client for the IndicesDeleteTemplate endpoint +// +func NewIndicesDeleteTemplate(t Transport) IndicesDeleteTemplate { return func(name string, o ...func(*IndicesDeleteTemplateRequest)) (*Response, error) { var r = IndicesDeleteTemplateRequest{Name: name} for _, f := range o { diff --git a/esapi/api.indices.exists.go b/esapi/api.indices.exists.go index 1e328d7897..1acf2535bf 100644 --- a/esapi/api.indices.exists.go +++ b/esapi/api.indices.exists.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newIndicesExistsFunc(t Transport) IndicesExists { +// NewIndicesExists creates a new API client for the IndicesExists endpoint +// +func NewIndicesExists(t Transport) IndicesExists { return func(index []string, o ...func(*IndicesExistsRequest)) (*Response, error) { var r = IndicesExistsRequest{Index: index} for _, f := range o { diff --git a/esapi/api.indices.exists_alias.go b/esapi/api.indices.exists_alias.go index 485339ab81..92bfae9219 100644 --- a/esapi/api.indices.exists_alias.go +++ b/esapi/api.indices.exists_alias.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newIndicesExistsAliasFunc(t Transport) IndicesExistsAlias { +// NewIndicesExistsAlias creates a new API client for the IndicesExistsAlias endpoint +// +func NewIndicesExistsAlias(t Transport) IndicesExistsAlias { return func(name []string, o ...func(*IndicesExistsAliasRequest)) (*Response, error) { var r = IndicesExistsAliasRequest{Name: name} for _, f := range o { diff --git a/esapi/api.indices.exists_index_template.go b/esapi/api.indices.exists_index_template.go index 541caf8344..a026d13419 100644 --- a/esapi/api.indices.exists_index_template.go +++ b/esapi/api.indices.exists_index_template.go @@ -14,7 +14,9 @@ import ( "time" ) -func newIndicesExistsIndexTemplateFunc(t Transport) IndicesExistsIndexTemplate { +// NewIndicesExistsIndexTemplate creates a new API client for the IndicesExistsIndexTemplate endpoint +// +func NewIndicesExistsIndexTemplate(t Transport) IndicesExistsIndexTemplate { return func(name string, o ...func(*IndicesExistsIndexTemplateRequest)) (*Response, error) { var r = IndicesExistsIndexTemplateRequest{Name: name} for _, f := range o { diff --git a/esapi/api.indices.exists_template.go b/esapi/api.indices.exists_template.go index 946be6c6bf..e2d35d0a11 100644 --- a/esapi/api.indices.exists_template.go +++ b/esapi/api.indices.exists_template.go @@ -14,7 +14,9 @@ import ( "time" ) -func newIndicesExistsTemplateFunc(t Transport) IndicesExistsTemplate { +// NewIndicesExistsTemplate creates a new API client for the IndicesExistsTemplate endpoint +// +func NewIndicesExistsTemplate(t Transport) IndicesExistsTemplate { return func(name []string, o ...func(*IndicesExistsTemplateRequest)) (*Response, error) { var r = IndicesExistsTemplateRequest{Name: name} for _, f := range o { diff --git a/esapi/api.indices.exists_type.go b/esapi/api.indices.exists_type.go index a8842e7dc8..b9c2733739 100644 --- a/esapi/api.indices.exists_type.go +++ b/esapi/api.indices.exists_type.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newIndicesExistsDocumentTypeFunc(t Transport) IndicesExistsDocumentType { +// NewIndicesExistsDocumentType creates a new API client for the IndicesExistsDocumentType endpoint +// +func NewIndicesExistsDocumentType(t Transport) IndicesExistsDocumentType { return func(index []string, o ...func(*IndicesExistsDocumentTypeRequest)) (*Response, error) { var r = IndicesExistsDocumentTypeRequest{Index: index} for _, f := range o { diff --git a/esapi/api.indices.flush.go b/esapi/api.indices.flush.go index 38ff48c924..e6e81bcb9d 100644 --- a/esapi/api.indices.flush.go +++ b/esapi/api.indices.flush.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newIndicesFlushFunc(t Transport) IndicesFlush { +// NewIndicesFlush creates a new API client for the IndicesFlush endpoint +// +func NewIndicesFlush(t Transport) IndicesFlush { return func(o ...func(*IndicesFlushRequest)) (*Response, error) { var r = IndicesFlushRequest{} for _, f := range o { diff --git a/esapi/api.indices.forcemerge.go b/esapi/api.indices.forcemerge.go index a130f92e3f..fc4d73e99a 100644 --- a/esapi/api.indices.forcemerge.go +++ b/esapi/api.indices.forcemerge.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newIndicesForcemergeFunc(t Transport) IndicesForcemerge { +// NewIndicesForcemerge creates a new API client for the IndicesForcemerge endpoint +// +func NewIndicesForcemerge(t Transport) IndicesForcemerge { return func(o ...func(*IndicesForcemergeRequest)) (*Response, error) { var r = IndicesForcemergeRequest{} for _, f := range o { diff --git a/esapi/api.indices.get.go b/esapi/api.indices.get.go index 7c59e1b544..f9d708f599 100644 --- a/esapi/api.indices.get.go +++ b/esapi/api.indices.get.go @@ -14,7 +14,9 @@ import ( "time" ) -func newIndicesGetFunc(t Transport) IndicesGet { +// NewIndicesGet creates a new API client for the IndicesGet endpoint +// +func NewIndicesGet(t Transport) IndicesGet { return func(index []string, o ...func(*IndicesGetRequest)) (*Response, error) { var r = IndicesGetRequest{Index: index} for _, f := range o { diff --git a/esapi/api.indices.get_alias.go b/esapi/api.indices.get_alias.go index 004d330837..510a06cd48 100644 --- a/esapi/api.indices.get_alias.go +++ b/esapi/api.indices.get_alias.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newIndicesGetAliasFunc(t Transport) IndicesGetAlias { +// NewIndicesGetAlias creates a new API client for the IndicesGetAlias endpoint +// +func NewIndicesGetAlias(t Transport) IndicesGetAlias { return func(o ...func(*IndicesGetAliasRequest)) (*Response, error) { var r = IndicesGetAliasRequest{} for _, f := range o { diff --git a/esapi/api.indices.get_field_mapping.go b/esapi/api.indices.get_field_mapping.go index 868d28385a..8063b93c7e 100644 --- a/esapi/api.indices.get_field_mapping.go +++ b/esapi/api.indices.get_field_mapping.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newIndicesGetFieldMappingFunc(t Transport) IndicesGetFieldMapping { +// NewIndicesGetFieldMapping creates a new API client for the IndicesGetFieldMapping endpoint +// +func NewIndicesGetFieldMapping(t Transport) IndicesGetFieldMapping { return func(fields []string, o ...func(*IndicesGetFieldMappingRequest)) (*Response, error) { var r = IndicesGetFieldMappingRequest{Fields: fields} for _, f := range o { diff --git a/esapi/api.indices.get_index_template.go b/esapi/api.indices.get_index_template.go index 297a88d6ba..0b29513dfe 100644 --- a/esapi/api.indices.get_index_template.go +++ b/esapi/api.indices.get_index_template.go @@ -14,7 +14,9 @@ import ( "time" ) -func newIndicesGetIndexTemplateFunc(t Transport) IndicesGetIndexTemplate { +// NewIndicesGetIndexTemplate creates a new API client for the IndicesGetIndexTemplate endpoint +// +func NewIndicesGetIndexTemplate(t Transport) IndicesGetIndexTemplate { return func(o ...func(*IndicesGetIndexTemplateRequest)) (*Response, error) { var r = IndicesGetIndexTemplateRequest{} for _, f := range o { diff --git a/esapi/api.indices.get_mapping.go b/esapi/api.indices.get_mapping.go index 0fe32f1faa..2d07bf14de 100644 --- a/esapi/api.indices.get_mapping.go +++ b/esapi/api.indices.get_mapping.go @@ -14,7 +14,9 @@ import ( "time" ) -func newIndicesGetMappingFunc(t Transport) IndicesGetMapping { +// NewIndicesGetMapping creates a new API client for the IndicesGetMapping endpoint +// +func NewIndicesGetMapping(t Transport) IndicesGetMapping { return func(o ...func(*IndicesGetMappingRequest)) (*Response, error) { var r = IndicesGetMappingRequest{} for _, f := range o { diff --git a/esapi/api.indices.get_settings.go b/esapi/api.indices.get_settings.go index ec27d5228b..a92504b02e 100644 --- a/esapi/api.indices.get_settings.go +++ b/esapi/api.indices.get_settings.go @@ -14,7 +14,9 @@ import ( "time" ) -func newIndicesGetSettingsFunc(t Transport) IndicesGetSettings { +// NewIndicesGetSettings creates a new API client for the IndicesGetSettings endpoint +// +func NewIndicesGetSettings(t Transport) IndicesGetSettings { return func(o ...func(*IndicesGetSettingsRequest)) (*Response, error) { var r = IndicesGetSettingsRequest{} for _, f := range o { diff --git a/esapi/api.indices.get_template.go b/esapi/api.indices.get_template.go index d815bbc4d0..d501afc88d 100644 --- a/esapi/api.indices.get_template.go +++ b/esapi/api.indices.get_template.go @@ -14,7 +14,9 @@ import ( "time" ) -func newIndicesGetTemplateFunc(t Transport) IndicesGetTemplate { +// NewIndicesGetTemplate creates a new API client for the IndicesGetTemplate endpoint +// +func NewIndicesGetTemplate(t Transport) IndicesGetTemplate { return func(o ...func(*IndicesGetTemplateRequest)) (*Response, error) { var r = IndicesGetTemplateRequest{} for _, f := range o { diff --git a/esapi/api.indices.get_upgrade.go b/esapi/api.indices.get_upgrade.go index a42dac403f..9db28c3d2e 100644 --- a/esapi/api.indices.get_upgrade.go +++ b/esapi/api.indices.get_upgrade.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newIndicesGetUpgradeFunc(t Transport) IndicesGetUpgrade { +// NewIndicesGetUpgrade creates a new API client for the IndicesGetUpgrade endpoint +// +func NewIndicesGetUpgrade(t Transport) IndicesGetUpgrade { return func(o ...func(*IndicesGetUpgradeRequest)) (*Response, error) { var r = IndicesGetUpgradeRequest{} for _, f := range o { diff --git a/esapi/api.indices.open.go b/esapi/api.indices.open.go index 9994f55bc8..a9f1db1f0b 100644 --- a/esapi/api.indices.open.go +++ b/esapi/api.indices.open.go @@ -14,7 +14,9 @@ import ( "time" ) -func newIndicesOpenFunc(t Transport) IndicesOpen { +// NewIndicesOpen creates a new API client for the IndicesOpen endpoint +// +func NewIndicesOpen(t Transport) IndicesOpen { return func(index []string, o ...func(*IndicesOpenRequest)) (*Response, error) { var r = IndicesOpenRequest{Index: index} for _, f := range o { diff --git a/esapi/api.indices.put_alias.go b/esapi/api.indices.put_alias.go index 021d33130e..256d68a251 100644 --- a/esapi/api.indices.put_alias.go +++ b/esapi/api.indices.put_alias.go @@ -14,7 +14,9 @@ import ( "time" ) -func newIndicesPutAliasFunc(t Transport) IndicesPutAlias { +// NewIndicesPutAlias creates a new API client for the IndicesPutAlias endpoint +// +func NewIndicesPutAlias(t Transport) IndicesPutAlias { return func(index []string, name string, o ...func(*IndicesPutAliasRequest)) (*Response, error) { var r = IndicesPutAliasRequest{Index: index, Name: name} for _, f := range o { diff --git a/esapi/api.indices.put_index_template.go b/esapi/api.indices.put_index_template.go index 10c3b24755..b237881326 100644 --- a/esapi/api.indices.put_index_template.go +++ b/esapi/api.indices.put_index_template.go @@ -15,7 +15,9 @@ import ( "time" ) -func newIndicesPutIndexTemplateFunc(t Transport) IndicesPutIndexTemplate { +// NewIndicesPutIndexTemplate creates a new API client for the IndicesPutIndexTemplate endpoint +// +func NewIndicesPutIndexTemplate(t Transport) IndicesPutIndexTemplate { return func(name string, body io.Reader, o ...func(*IndicesPutIndexTemplateRequest)) (*Response, error) { var r = IndicesPutIndexTemplateRequest{Name: name, Body: body} for _, f := range o { diff --git a/esapi/api.indices.put_mapping.go b/esapi/api.indices.put_mapping.go index 0c91165dfe..bb57d49ebf 100644 --- a/esapi/api.indices.put_mapping.go +++ b/esapi/api.indices.put_mapping.go @@ -15,7 +15,9 @@ import ( "time" ) -func newIndicesPutMappingFunc(t Transport) IndicesPutMapping { +// NewIndicesPutMapping creates a new API client for the IndicesPutMapping endpoint +// +func NewIndicesPutMapping(t Transport) IndicesPutMapping { return func(index []string, body io.Reader, o ...func(*IndicesPutMappingRequest)) (*Response, error) { var r = IndicesPutMappingRequest{Index: index, Body: body} for _, f := range o { diff --git a/esapi/api.indices.put_settings.go b/esapi/api.indices.put_settings.go index a3406e40d2..bffe1c083a 100644 --- a/esapi/api.indices.put_settings.go +++ b/esapi/api.indices.put_settings.go @@ -15,7 +15,9 @@ import ( "time" ) -func newIndicesPutSettingsFunc(t Transport) IndicesPutSettings { +// NewIndicesPutSettings creates a new API client for the IndicesPutSettings endpoint +// +func NewIndicesPutSettings(t Transport) IndicesPutSettings { return func(body io.Reader, o ...func(*IndicesPutSettingsRequest)) (*Response, error) { var r = IndicesPutSettingsRequest{Body: body} for _, f := range o { diff --git a/esapi/api.indices.put_template.go b/esapi/api.indices.put_template.go index ea1ced35a9..33e4065c27 100644 --- a/esapi/api.indices.put_template.go +++ b/esapi/api.indices.put_template.go @@ -15,7 +15,9 @@ import ( "time" ) -func newIndicesPutTemplateFunc(t Transport) IndicesPutTemplate { +// NewIndicesPutTemplate creates a new API client for the IndicesPutTemplate endpoint +// +func NewIndicesPutTemplate(t Transport) IndicesPutTemplate { return func(name string, body io.Reader, o ...func(*IndicesPutTemplateRequest)) (*Response, error) { var r = IndicesPutTemplateRequest{Name: name, Body: body} for _, f := range o { diff --git a/esapi/api.indices.recovery.go b/esapi/api.indices.recovery.go index ee39ece399..a9ca92f3d7 100644 --- a/esapi/api.indices.recovery.go +++ b/esapi/api.indices.recovery.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newIndicesRecoveryFunc(t Transport) IndicesRecovery { +// NewIndicesRecovery creates a new API client for the IndicesRecovery endpoint +// +func NewIndicesRecovery(t Transport) IndicesRecovery { return func(o ...func(*IndicesRecoveryRequest)) (*Response, error) { var r = IndicesRecoveryRequest{} for _, f := range o { diff --git a/esapi/api.indices.refresh.go b/esapi/api.indices.refresh.go index ee40a41ff5..d8a550b4cf 100644 --- a/esapi/api.indices.refresh.go +++ b/esapi/api.indices.refresh.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newIndicesRefreshFunc(t Transport) IndicesRefresh { +// NewIndicesRefresh creates a new API client for the IndicesRefresh endpoint +// +func NewIndicesRefresh(t Transport) IndicesRefresh { return func(o ...func(*IndicesRefreshRequest)) (*Response, error) { var r = IndicesRefreshRequest{} for _, f := range o { diff --git a/esapi/api.indices.resolve_index.go b/esapi/api.indices.resolve_index.go index 4047396c5a..65bb93b708 100644 --- a/esapi/api.indices.resolve_index.go +++ b/esapi/api.indices.resolve_index.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newIndicesResolveIndexFunc(t Transport) IndicesResolveIndex { +// NewIndicesResolveIndex creates a new API client for the IndicesResolveIndex endpoint +// +func NewIndicesResolveIndex(t Transport) IndicesResolveIndex { return func(name []string, o ...func(*IndicesResolveIndexRequest)) (*Response, error) { var r = IndicesResolveIndexRequest{Name: name} for _, f := range o { diff --git a/esapi/api.indices.rollover.go b/esapi/api.indices.rollover.go index 449334bb08..75eab69b5a 100644 --- a/esapi/api.indices.rollover.go +++ b/esapi/api.indices.rollover.go @@ -15,7 +15,9 @@ import ( "time" ) -func newIndicesRolloverFunc(t Transport) IndicesRollover { +// NewIndicesRollover creates a new API client for the IndicesRollover endpoint +// +func NewIndicesRollover(t Transport) IndicesRollover { return func(alias string, o ...func(*IndicesRolloverRequest)) (*Response, error) { var r = IndicesRolloverRequest{Alias: alias} for _, f := range o { diff --git a/esapi/api.indices.segments.go b/esapi/api.indices.segments.go index 6e96fce060..1aa5c1bcbc 100644 --- a/esapi/api.indices.segments.go +++ b/esapi/api.indices.segments.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newIndicesSegmentsFunc(t Transport) IndicesSegments { +// NewIndicesSegments creates a new API client for the IndicesSegments endpoint +// +func NewIndicesSegments(t Transport) IndicesSegments { return func(o ...func(*IndicesSegmentsRequest)) (*Response, error) { var r = IndicesSegmentsRequest{} for _, f := range o { diff --git a/esapi/api.indices.shard_stores.go b/esapi/api.indices.shard_stores.go index 834f4eec66..908e5c6818 100644 --- a/esapi/api.indices.shard_stores.go +++ b/esapi/api.indices.shard_stores.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newIndicesShardStoresFunc(t Transport) IndicesShardStores { +// NewIndicesShardStores creates a new API client for the IndicesShardStores endpoint +// +func NewIndicesShardStores(t Transport) IndicesShardStores { return func(o ...func(*IndicesShardStoresRequest)) (*Response, error) { var r = IndicesShardStoresRequest{} for _, f := range o { diff --git a/esapi/api.indices.shrink.go b/esapi/api.indices.shrink.go index 733dc535c8..8a6a23ad5d 100644 --- a/esapi/api.indices.shrink.go +++ b/esapi/api.indices.shrink.go @@ -14,7 +14,9 @@ import ( "time" ) -func newIndicesShrinkFunc(t Transport) IndicesShrink { +// NewIndicesShrink creates a new API client for the IndicesShrink endpoint +// +func NewIndicesShrink(t Transport) IndicesShrink { return func(index string, target string, o ...func(*IndicesShrinkRequest)) (*Response, error) { var r = IndicesShrinkRequest{Index: index, Target: target} for _, f := range o { diff --git a/esapi/api.indices.simulate_index_template.go b/esapi/api.indices.simulate_index_template.go index 418f2aa097..0cf95962de 100644 --- a/esapi/api.indices.simulate_index_template.go +++ b/esapi/api.indices.simulate_index_template.go @@ -15,7 +15,9 @@ import ( "time" ) -func newIndicesSimulateIndexTemplateFunc(t Transport) IndicesSimulateIndexTemplate { +// NewIndicesSimulateIndexTemplate creates a new API client for the IndicesSimulateIndexTemplate endpoint +// +func NewIndicesSimulateIndexTemplate(t Transport) IndicesSimulateIndexTemplate { return func(name string, o ...func(*IndicesSimulateIndexTemplateRequest)) (*Response, error) { var r = IndicesSimulateIndexTemplateRequest{Name: name} for _, f := range o { diff --git a/esapi/api.indices.simulate_template.go b/esapi/api.indices.simulate_template.go index 472860c7a3..2ecdb79e29 100644 --- a/esapi/api.indices.simulate_template.go +++ b/esapi/api.indices.simulate_template.go @@ -15,7 +15,9 @@ import ( "time" ) -func newIndicesSimulateTemplateFunc(t Transport) IndicesSimulateTemplate { +// NewIndicesSimulateTemplate creates a new API client for the IndicesSimulateTemplate endpoint +// +func NewIndicesSimulateTemplate(t Transport) IndicesSimulateTemplate { return func(o ...func(*IndicesSimulateTemplateRequest)) (*Response, error) { var r = IndicesSimulateTemplateRequest{} for _, f := range o { diff --git a/esapi/api.indices.split.go b/esapi/api.indices.split.go index dbbb46b46a..b5abeb187e 100644 --- a/esapi/api.indices.split.go +++ b/esapi/api.indices.split.go @@ -14,7 +14,9 @@ import ( "time" ) -func newIndicesSplitFunc(t Transport) IndicesSplit { +// NewIndicesSplit creates a new API client for the IndicesSplit endpoint +// +func NewIndicesSplit(t Transport) IndicesSplit { return func(index string, target string, o ...func(*IndicesSplitRequest)) (*Response, error) { var r = IndicesSplitRequest{Index: index, Target: target} for _, f := range o { diff --git a/esapi/api.indices.stats.go b/esapi/api.indices.stats.go index 9ca2bb904f..552379ebe7 100644 --- a/esapi/api.indices.stats.go +++ b/esapi/api.indices.stats.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newIndicesStatsFunc(t Transport) IndicesStats { +// NewIndicesStats creates a new API client for the IndicesStats endpoint +// +func NewIndicesStats(t Transport) IndicesStats { return func(o ...func(*IndicesStatsRequest)) (*Response, error) { var r = IndicesStatsRequest{} for _, f := range o { diff --git a/esapi/api.indices.update_aliases.go b/esapi/api.indices.update_aliases.go index 75612d9573..13c67d4684 100644 --- a/esapi/api.indices.update_aliases.go +++ b/esapi/api.indices.update_aliases.go @@ -14,7 +14,9 @@ import ( "time" ) -func newIndicesUpdateAliasesFunc(t Transport) IndicesUpdateAliases { +// NewIndicesUpdateAliases creates a new API client for the IndicesUpdateAliases endpoint +// +func NewIndicesUpdateAliases(t Transport) IndicesUpdateAliases { return func(body io.Reader, o ...func(*IndicesUpdateAliasesRequest)) (*Response, error) { var r = IndicesUpdateAliasesRequest{Body: body} for _, f := range o { diff --git a/esapi/api.indices.upgrade.go b/esapi/api.indices.upgrade.go index 0bf44d22e0..c98fb37f3c 100644 --- a/esapi/api.indices.upgrade.go +++ b/esapi/api.indices.upgrade.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newIndicesUpgradeFunc(t Transport) IndicesUpgrade { +// NewIndicesUpgrade creates a new API client for the IndicesUpgrade endpoint +// +func NewIndicesUpgrade(t Transport) IndicesUpgrade { return func(o ...func(*IndicesUpgradeRequest)) (*Response, error) { var r = IndicesUpgradeRequest{} for _, f := range o { diff --git a/esapi/api.indices.validate_query.go b/esapi/api.indices.validate_query.go index 8afb259d6b..45cfe70c52 100644 --- a/esapi/api.indices.validate_query.go +++ b/esapi/api.indices.validate_query.go @@ -14,7 +14,9 @@ import ( "strings" ) -func newIndicesValidateQueryFunc(t Transport) IndicesValidateQuery { +// NewIndicesValidateQuery creates a new API client for the IndicesValidateQuery endpoint +// +func NewIndicesValidateQuery(t Transport) IndicesValidateQuery { return func(o ...func(*IndicesValidateQueryRequest)) (*Response, error) { var r = IndicesValidateQueryRequest{} for _, f := range o { diff --git a/esapi/api.info.go b/esapi/api.info.go index 5bfb61c225..0e9e4a6485 100644 --- a/esapi/api.info.go +++ b/esapi/api.info.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newInfoFunc(t Transport) Info { +// NewInfo creates a new API client for the Info endpoint +// +func NewInfo(t Transport) Info { return func(o ...func(*InfoRequest)) (*Response, error) { var r = InfoRequest{} for _, f := range o { diff --git a/esapi/api.ingest.delete_pipeline.go b/esapi/api.ingest.delete_pipeline.go index cdc7d25bc7..6b625a8f79 100644 --- a/esapi/api.ingest.delete_pipeline.go +++ b/esapi/api.ingest.delete_pipeline.go @@ -13,7 +13,9 @@ import ( "time" ) -func newIngestDeletePipelineFunc(t Transport) IngestDeletePipeline { +// NewIngestDeletePipeline creates a new API client for the IngestDeletePipeline endpoint +// +func NewIngestDeletePipeline(t Transport) IngestDeletePipeline { return func(id string, o ...func(*IngestDeletePipelineRequest)) (*Response, error) { var r = IngestDeletePipelineRequest{PipelineID: id} for _, f := range o { diff --git a/esapi/api.ingest.get_pipeline.go b/esapi/api.ingest.get_pipeline.go index b65a867ba2..2a1ef258c0 100644 --- a/esapi/api.ingest.get_pipeline.go +++ b/esapi/api.ingest.get_pipeline.go @@ -13,7 +13,9 @@ import ( "time" ) -func newIngestGetPipelineFunc(t Transport) IngestGetPipeline { +// NewIngestGetPipeline creates a new API client for the IngestGetPipeline endpoint +// +func NewIngestGetPipeline(t Transport) IngestGetPipeline { return func(o ...func(*IngestGetPipelineRequest)) (*Response, error) { var r = IngestGetPipelineRequest{} for _, f := range o { diff --git a/esapi/api.ingest.processor_grok.go b/esapi/api.ingest.processor_grok.go index a5d325af19..a9efccabd7 100644 --- a/esapi/api.ingest.processor_grok.go +++ b/esapi/api.ingest.processor_grok.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newIngestProcessorGrokFunc(t Transport) IngestProcessorGrok { +// NewIngestProcessorGrok creates a new API client for the IngestProcessorGrok endpoint +// +func NewIngestProcessorGrok(t Transport) IngestProcessorGrok { return func(o ...func(*IngestProcessorGrokRequest)) (*Response, error) { var r = IngestProcessorGrokRequest{} for _, f := range o { diff --git a/esapi/api.ingest.put_pipeline.go b/esapi/api.ingest.put_pipeline.go index 175af3e73c..0ccb5bae9c 100644 --- a/esapi/api.ingest.put_pipeline.go +++ b/esapi/api.ingest.put_pipeline.go @@ -14,7 +14,9 @@ import ( "time" ) -func newIngestPutPipelineFunc(t Transport) IngestPutPipeline { +// NewIngestPutPipeline creates a new API client for the IngestPutPipeline endpoint +// +func NewIngestPutPipeline(t Transport) IngestPutPipeline { return func(id string, body io.Reader, o ...func(*IngestPutPipelineRequest)) (*Response, error) { var r = IngestPutPipelineRequest{PipelineID: id, Body: body} for _, f := range o { diff --git a/esapi/api.ingest.simulate.go b/esapi/api.ingest.simulate.go index 02bae0591f..48a1c613e2 100644 --- a/esapi/api.ingest.simulate.go +++ b/esapi/api.ingest.simulate.go @@ -14,7 +14,9 @@ import ( "strings" ) -func newIngestSimulateFunc(t Transport) IngestSimulate { +// NewIngestSimulate creates a new API client for the IngestSimulate endpoint +// +func NewIngestSimulate(t Transport) IngestSimulate { return func(body io.Reader, o ...func(*IngestSimulateRequest)) (*Response, error) { var r = IngestSimulateRequest{Body: body} for _, f := range o { diff --git a/esapi/api.mget.go b/esapi/api.mget.go index 5a4a54cb8c..b357f15923 100644 --- a/esapi/api.mget.go +++ b/esapi/api.mget.go @@ -14,7 +14,9 @@ import ( "strings" ) -func newMgetFunc(t Transport) Mget { +// NewMget creates a new API client for the Mget endpoint +// +func NewMget(t Transport) Mget { return func(body io.Reader, o ...func(*MgetRequest)) (*Response, error) { var r = MgetRequest{Body: body} for _, f := range o { diff --git a/esapi/api.msearch.go b/esapi/api.msearch.go index c059d3fa9b..b4aed83868 100644 --- a/esapi/api.msearch.go +++ b/esapi/api.msearch.go @@ -14,7 +14,9 @@ import ( "strings" ) -func newMsearchFunc(t Transport) Msearch { +// NewMsearch creates a new API client for the Msearch endpoint +// +func NewMsearch(t Transport) Msearch { return func(body io.Reader, o ...func(*MsearchRequest)) (*Response, error) { var r = MsearchRequest{Body: body} for _, f := range o { diff --git a/esapi/api.msearch_template.go b/esapi/api.msearch_template.go index e52608840e..0e5ffb0a6d 100644 --- a/esapi/api.msearch_template.go +++ b/esapi/api.msearch_template.go @@ -14,7 +14,9 @@ import ( "strings" ) -func newMsearchTemplateFunc(t Transport) MsearchTemplate { +// NewMsearchTemplate creates a new API client for the MsearchTemplate endpoint +// +func NewMsearchTemplate(t Transport) MsearchTemplate { return func(body io.Reader, o ...func(*MsearchTemplateRequest)) (*Response, error) { var r = MsearchTemplateRequest{Body: body} for _, f := range o { diff --git a/esapi/api.mtermvectors.go b/esapi/api.mtermvectors.go index 5127c5f897..5cea79dde8 100644 --- a/esapi/api.mtermvectors.go +++ b/esapi/api.mtermvectors.go @@ -14,7 +14,9 @@ import ( "strings" ) -func newMtermvectorsFunc(t Transport) Mtermvectors { +// NewMtermvectors creates a new API client for the Mtermvectors endpoint +// +func NewMtermvectors(t Transport) Mtermvectors { return func(o ...func(*MtermvectorsRequest)) (*Response, error) { var r = MtermvectorsRequest{} for _, f := range o { diff --git a/esapi/api.nodes.hot_threads.go b/esapi/api.nodes.hot_threads.go index 7b5f160c77..b72eeb3f61 100644 --- a/esapi/api.nodes.hot_threads.go +++ b/esapi/api.nodes.hot_threads.go @@ -14,7 +14,9 @@ import ( "time" ) -func newNodesHotThreadsFunc(t Transport) NodesHotThreads { +// NewNodesHotThreads creates a new API client for the NodesHotThreads endpoint +// +func NewNodesHotThreads(t Transport) NodesHotThreads { return func(o ...func(*NodesHotThreadsRequest)) (*Response, error) { var r = NodesHotThreadsRequest{} for _, f := range o { diff --git a/esapi/api.nodes.info.go b/esapi/api.nodes.info.go index 159ed3c886..01b5a43540 100644 --- a/esapi/api.nodes.info.go +++ b/esapi/api.nodes.info.go @@ -14,7 +14,9 @@ import ( "time" ) -func newNodesInfoFunc(t Transport) NodesInfo { +// NewNodesInfo creates a new API client for the NodesInfo endpoint +// +func NewNodesInfo(t Transport) NodesInfo { return func(o ...func(*NodesInfoRequest)) (*Response, error) { var r = NodesInfoRequest{} for _, f := range o { diff --git a/esapi/api.nodes.reload_secure_settings.go b/esapi/api.nodes.reload_secure_settings.go index 043da91bfe..7577deaa11 100644 --- a/esapi/api.nodes.reload_secure_settings.go +++ b/esapi/api.nodes.reload_secure_settings.go @@ -14,7 +14,9 @@ import ( "time" ) -func newNodesReloadSecureSettingsFunc(t Transport) NodesReloadSecureSettings { +// NewNodesReloadSecureSettings creates a new API client for the NodesReloadSecureSettings endpoint +// +func NewNodesReloadSecureSettings(t Transport) NodesReloadSecureSettings { return func(o ...func(*NodesReloadSecureSettingsRequest)) (*Response, error) { var r = NodesReloadSecureSettingsRequest{} for _, f := range o { diff --git a/esapi/api.nodes.stats.go b/esapi/api.nodes.stats.go index 4d9447708a..4ad706d42f 100644 --- a/esapi/api.nodes.stats.go +++ b/esapi/api.nodes.stats.go @@ -14,7 +14,9 @@ import ( "time" ) -func newNodesStatsFunc(t Transport) NodesStats { +// NewNodesStats creates a new API client for the NodesStats endpoint +// +func NewNodesStats(t Transport) NodesStats { return func(o ...func(*NodesStatsRequest)) (*Response, error) { var r = NodesStatsRequest{} for _, f := range o { diff --git a/esapi/api.nodes.usage.go b/esapi/api.nodes.usage.go index e163065de5..f38b53127b 100644 --- a/esapi/api.nodes.usage.go +++ b/esapi/api.nodes.usage.go @@ -13,7 +13,9 @@ import ( "time" ) -func newNodesUsageFunc(t Transport) NodesUsage { +// NewNodesUsage creates a new API client for the NodesUsage endpoint +// +func NewNodesUsage(t Transport) NodesUsage { return func(o ...func(*NodesUsageRequest)) (*Response, error) { var r = NodesUsageRequest{} for _, f := range o { diff --git a/esapi/api.ping.go b/esapi/api.ping.go index d7f64525da..902634769f 100644 --- a/esapi/api.ping.go +++ b/esapi/api.ping.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newPingFunc(t Transport) Ping { +// NewPing creates a new API client for the Ping endpoint +// +func NewPing(t Transport) Ping { return func(o ...func(*PingRequest)) (*Response, error) { var r = PingRequest{} for _, f := range o { diff --git a/esapi/api.put_script.go b/esapi/api.put_script.go index d046f722b8..d26ffbcc04 100644 --- a/esapi/api.put_script.go +++ b/esapi/api.put_script.go @@ -14,7 +14,9 @@ import ( "time" ) -func newPutScriptFunc(t Transport) PutScript { +// NewPutScript creates a new API client for the PutScript endpoint +// +func NewPutScript(t Transport) PutScript { return func(id string, body io.Reader, o ...func(*PutScriptRequest)) (*Response, error) { var r = PutScriptRequest{ScriptID: id, Body: body} for _, f := range o { diff --git a/esapi/api.rank_eval.go b/esapi/api.rank_eval.go index ed503b8808..508d092ced 100644 --- a/esapi/api.rank_eval.go +++ b/esapi/api.rank_eval.go @@ -14,7 +14,9 @@ import ( "strings" ) -func newRankEvalFunc(t Transport) RankEval { +// NewRankEval creates a new API client for the RankEval endpoint +// +func NewRankEval(t Transport) RankEval { return func(body io.Reader, o ...func(*RankEvalRequest)) (*Response, error) { var r = RankEvalRequest{Body: body} for _, f := range o { diff --git a/esapi/api.reindex.go b/esapi/api.reindex.go index c3327e4a7d..7793276c63 100644 --- a/esapi/api.reindex.go +++ b/esapi/api.reindex.go @@ -16,7 +16,9 @@ import ( "time" ) -func newReindexFunc(t Transport) Reindex { +// NewReindex creates a new API client for the Reindex endpoint +// +func NewReindex(t Transport) Reindex { return func(body io.Reader, o ...func(*ReindexRequest)) (*Response, error) { var r = ReindexRequest{Body: body} for _, f := range o { diff --git a/esapi/api.reindex_rethrottle.go b/esapi/api.reindex_rethrottle.go index a6f26b7a06..59383dcdbf 100644 --- a/esapi/api.reindex_rethrottle.go +++ b/esapi/api.reindex_rethrottle.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newReindexRethrottleFunc(t Transport) ReindexRethrottle { +// NewReindexRethrottle creates a new API client for the ReindexRethrottle endpoint +// +func NewReindexRethrottle(t Transport) ReindexRethrottle { return func(task_id string, requests_per_second *int, o ...func(*ReindexRethrottleRequest)) (*Response, error) { var r = ReindexRethrottleRequest{TaskID: task_id, RequestsPerSecond: requests_per_second} for _, f := range o { diff --git a/esapi/api.render_search_template.go b/esapi/api.render_search_template.go index d6e7304191..0336906cfa 100644 --- a/esapi/api.render_search_template.go +++ b/esapi/api.render_search_template.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newRenderSearchTemplateFunc(t Transport) RenderSearchTemplate { +// NewRenderSearchTemplate creates a new API client for the RenderSearchTemplate endpoint +// +func NewRenderSearchTemplate(t Transport) RenderSearchTemplate { return func(o ...func(*RenderSearchTemplateRequest)) (*Response, error) { var r = RenderSearchTemplateRequest{} for _, f := range o { diff --git a/esapi/api.scripts_painless_execute.go b/esapi/api.scripts_painless_execute.go index 235f4d984a..271860709b 100644 --- a/esapi/api.scripts_painless_execute.go +++ b/esapi/api.scripts_painless_execute.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newScriptsPainlessExecuteFunc(t Transport) ScriptsPainlessExecute { +// NewScriptsPainlessExecute creates a new API client for the ScriptsPainlessExecute endpoint +// +func NewScriptsPainlessExecute(t Transport) ScriptsPainlessExecute { return func(o ...func(*ScriptsPainlessExecuteRequest)) (*Response, error) { var r = ScriptsPainlessExecuteRequest{} for _, f := range o { diff --git a/esapi/api.scroll.go b/esapi/api.scroll.go index cbf4d048a5..b45abbf9c3 100644 --- a/esapi/api.scroll.go +++ b/esapi/api.scroll.go @@ -15,7 +15,9 @@ import ( "time" ) -func newScrollFunc(t Transport) Scroll { +// NewScroll creates a new API client for the Scroll endpoint +// +func NewScroll(t Transport) Scroll { return func(o ...func(*ScrollRequest)) (*Response, error) { var r = ScrollRequest{} for _, f := range o { diff --git a/esapi/api.search.go b/esapi/api.search.go index 8cad0f9daf..e3356fae9f 100644 --- a/esapi/api.search.go +++ b/esapi/api.search.go @@ -16,7 +16,9 @@ import ( "time" ) -func newSearchFunc(t Transport) Search { +// NewSearch creates a new API client for the Search endpoint +// +func NewSearch(t Transport) Search { return func(o ...func(*SearchRequest)) (*Response, error) { var r = SearchRequest{} for _, f := range o { diff --git a/esapi/api.search_shards.go b/esapi/api.search_shards.go index a97c658190..76ab798fa0 100644 --- a/esapi/api.search_shards.go +++ b/esapi/api.search_shards.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newSearchShardsFunc(t Transport) SearchShards { +// NewSearchShards creates a new API client for the SearchShards endpoint +// +func NewSearchShards(t Transport) SearchShards { return func(o ...func(*SearchShardsRequest)) (*Response, error) { var r = SearchShardsRequest{} for _, f := range o { diff --git a/esapi/api.search_template.go b/esapi/api.search_template.go index a2a6348903..5de8328139 100644 --- a/esapi/api.search_template.go +++ b/esapi/api.search_template.go @@ -15,7 +15,9 @@ import ( "time" ) -func newSearchTemplateFunc(t Transport) SearchTemplate { +// NewSearchTemplate creates a new API client for the SearchTemplate endpoint +// +func NewSearchTemplate(t Transport) SearchTemplate { return func(body io.Reader, o ...func(*SearchTemplateRequest)) (*Response, error) { var r = SearchTemplateRequest{Body: body} for _, f := range o { diff --git a/esapi/api.snapshot.cleanup_repository.go b/esapi/api.snapshot.cleanup_repository.go index 9a674ae94e..20ed4e6ea9 100644 --- a/esapi/api.snapshot.cleanup_repository.go +++ b/esapi/api.snapshot.cleanup_repository.go @@ -13,7 +13,9 @@ import ( "time" ) -func newSnapshotCleanupRepositoryFunc(t Transport) SnapshotCleanupRepository { +// NewSnapshotCleanupRepository creates a new API client for the SnapshotCleanupRepository endpoint +// +func NewSnapshotCleanupRepository(t Transport) SnapshotCleanupRepository { return func(repository string, o ...func(*SnapshotCleanupRepositoryRequest)) (*Response, error) { var r = SnapshotCleanupRepositoryRequest{Repository: repository} for _, f := range o { diff --git a/esapi/api.snapshot.create.go b/esapi/api.snapshot.create.go index f82a25e714..596657effe 100644 --- a/esapi/api.snapshot.create.go +++ b/esapi/api.snapshot.create.go @@ -15,7 +15,9 @@ import ( "time" ) -func newSnapshotCreateFunc(t Transport) SnapshotCreate { +// NewSnapshotCreate creates a new API client for the SnapshotCreate endpoint +// +func NewSnapshotCreate(t Transport) SnapshotCreate { return func(repository string, snapshot string, o ...func(*SnapshotCreateRequest)) (*Response, error) { var r = SnapshotCreateRequest{Repository: repository, Snapshot: snapshot} for _, f := range o { diff --git a/esapi/api.snapshot.create_repository.go b/esapi/api.snapshot.create_repository.go index c1c2c7520b..b920451e7c 100644 --- a/esapi/api.snapshot.create_repository.go +++ b/esapi/api.snapshot.create_repository.go @@ -15,7 +15,9 @@ import ( "time" ) -func newSnapshotCreateRepositoryFunc(t Transport) SnapshotCreateRepository { +// NewSnapshotCreateRepository creates a new API client for the SnapshotCreateRepository endpoint +// +func NewSnapshotCreateRepository(t Transport) SnapshotCreateRepository { return func(repository string, body io.Reader, o ...func(*SnapshotCreateRepositoryRequest)) (*Response, error) { var r = SnapshotCreateRepositoryRequest{Repository: repository, Body: body} for _, f := range o { diff --git a/esapi/api.snapshot.delete.go b/esapi/api.snapshot.delete.go index 25d4bf45d7..2cda43cece 100644 --- a/esapi/api.snapshot.delete.go +++ b/esapi/api.snapshot.delete.go @@ -13,7 +13,9 @@ import ( "time" ) -func newSnapshotDeleteFunc(t Transport) SnapshotDelete { +// NewSnapshotDelete creates a new API client for the SnapshotDelete endpoint +// +func NewSnapshotDelete(t Transport) SnapshotDelete { return func(repository string, snapshot []string, o ...func(*SnapshotDeleteRequest)) (*Response, error) { var r = SnapshotDeleteRequest{Repository: repository, Snapshot: snapshot} for _, f := range o { diff --git a/esapi/api.snapshot.delete_repository.go b/esapi/api.snapshot.delete_repository.go index 3d5b48cecd..1d197434a1 100644 --- a/esapi/api.snapshot.delete_repository.go +++ b/esapi/api.snapshot.delete_repository.go @@ -13,7 +13,9 @@ import ( "time" ) -func newSnapshotDeleteRepositoryFunc(t Transport) SnapshotDeleteRepository { +// NewSnapshotDeleteRepository creates a new API client for the SnapshotDeleteRepository endpoint +// +func NewSnapshotDeleteRepository(t Transport) SnapshotDeleteRepository { return func(repository []string, o ...func(*SnapshotDeleteRepositoryRequest)) (*Response, error) { var r = SnapshotDeleteRepositoryRequest{Repository: repository} for _, f := range o { diff --git a/esapi/api.snapshot.get.go b/esapi/api.snapshot.get.go index 69f7614b8d..b91d477d4f 100644 --- a/esapi/api.snapshot.get.go +++ b/esapi/api.snapshot.get.go @@ -14,7 +14,9 @@ import ( "time" ) -func newSnapshotGetFunc(t Transport) SnapshotGet { +// NewSnapshotGet creates a new API client for the SnapshotGet endpoint +// +func NewSnapshotGet(t Transport) SnapshotGet { return func(repository string, snapshot []string, o ...func(*SnapshotGetRequest)) (*Response, error) { var r = SnapshotGetRequest{Repository: repository, Snapshot: snapshot} for _, f := range o { diff --git a/esapi/api.snapshot.get_repository.go b/esapi/api.snapshot.get_repository.go index e38370f220..af86f44606 100644 --- a/esapi/api.snapshot.get_repository.go +++ b/esapi/api.snapshot.get_repository.go @@ -14,7 +14,9 @@ import ( "time" ) -func newSnapshotGetRepositoryFunc(t Transport) SnapshotGetRepository { +// NewSnapshotGetRepository creates a new API client for the SnapshotGetRepository endpoint +// +func NewSnapshotGetRepository(t Transport) SnapshotGetRepository { return func(o ...func(*SnapshotGetRepositoryRequest)) (*Response, error) { var r = SnapshotGetRepositoryRequest{} for _, f := range o { diff --git a/esapi/api.snapshot.restore.go b/esapi/api.snapshot.restore.go index 5464ccc386..646bd02f26 100644 --- a/esapi/api.snapshot.restore.go +++ b/esapi/api.snapshot.restore.go @@ -15,7 +15,9 @@ import ( "time" ) -func newSnapshotRestoreFunc(t Transport) SnapshotRestore { +// NewSnapshotRestore creates a new API client for the SnapshotRestore endpoint +// +func NewSnapshotRestore(t Transport) SnapshotRestore { return func(repository string, snapshot string, o ...func(*SnapshotRestoreRequest)) (*Response, error) { var r = SnapshotRestoreRequest{Repository: repository, Snapshot: snapshot} for _, f := range o { diff --git a/esapi/api.snapshot.status.go b/esapi/api.snapshot.status.go index ba093cde35..0d31ffd763 100644 --- a/esapi/api.snapshot.status.go +++ b/esapi/api.snapshot.status.go @@ -14,7 +14,9 @@ import ( "time" ) -func newSnapshotStatusFunc(t Transport) SnapshotStatus { +// NewSnapshotStatus creates a new API client for the SnapshotStatus endpoint +// +func NewSnapshotStatus(t Transport) SnapshotStatus { return func(o ...func(*SnapshotStatusRequest)) (*Response, error) { var r = SnapshotStatusRequest{} for _, f := range o { diff --git a/esapi/api.snapshot.verify_repository.go b/esapi/api.snapshot.verify_repository.go index 3d51808c1c..cbe8c3d17c 100644 --- a/esapi/api.snapshot.verify_repository.go +++ b/esapi/api.snapshot.verify_repository.go @@ -13,7 +13,9 @@ import ( "time" ) -func newSnapshotVerifyRepositoryFunc(t Transport) SnapshotVerifyRepository { +// NewSnapshotVerifyRepository creates a new API client for the SnapshotVerifyRepository endpoint +// +func NewSnapshotVerifyRepository(t Transport) SnapshotVerifyRepository { return func(repository string, o ...func(*SnapshotVerifyRepositoryRequest)) (*Response, error) { var r = SnapshotVerifyRepositoryRequest{Repository: repository} for _, f := range o { diff --git a/esapi/api.tasks.cancel.go b/esapi/api.tasks.cancel.go index 638df9f1a1..ff55a7e2e0 100644 --- a/esapi/api.tasks.cancel.go +++ b/esapi/api.tasks.cancel.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newTasksCancelFunc(t Transport) TasksCancel { +// NewTasksCancel creates a new API client for the TasksCancel endpoint +// +func NewTasksCancel(t Transport) TasksCancel { return func(o ...func(*TasksCancelRequest)) (*Response, error) { var r = TasksCancelRequest{} for _, f := range o { diff --git a/esapi/api.tasks.get.go b/esapi/api.tasks.get.go index 4a8402e74d..ae0f25047e 100644 --- a/esapi/api.tasks.get.go +++ b/esapi/api.tasks.get.go @@ -14,7 +14,9 @@ import ( "time" ) -func newTasksGetFunc(t Transport) TasksGet { +// NewTasksGet creates a new API client for the TasksGet endpoint +// +func NewTasksGet(t Transport) TasksGet { return func(task_id string, o ...func(*TasksGetRequest)) (*Response, error) { var r = TasksGetRequest{TaskID: task_id} for _, f := range o { diff --git a/esapi/api.tasks.list.go b/esapi/api.tasks.list.go index a575d8101c..0c3940f1ee 100644 --- a/esapi/api.tasks.list.go +++ b/esapi/api.tasks.list.go @@ -14,7 +14,9 @@ import ( "time" ) -func newTasksListFunc(t Transport) TasksList { +// NewTasksList creates a new API client for the TasksList endpoint +// +func NewTasksList(t Transport) TasksList { return func(o ...func(*TasksListRequest)) (*Response, error) { var r = TasksListRequest{} for _, f := range o { diff --git a/esapi/api.termvectors.go b/esapi/api.termvectors.go index 2fdd5604a4..b22825976b 100644 --- a/esapi/api.termvectors.go +++ b/esapi/api.termvectors.go @@ -14,7 +14,9 @@ import ( "strings" ) -func newTermvectorsFunc(t Transport) Termvectors { +// NewTermvectors creates a new API client for the Termvectors endpoint +// +func NewTermvectors(t Transport) Termvectors { return func(index string, o ...func(*TermvectorsRequest)) (*Response, error) { var r = TermvectorsRequest{Index: index} for _, f := range o { diff --git a/esapi/api.update.go b/esapi/api.update.go index d386a47aa3..b91f378d26 100644 --- a/esapi/api.update.go +++ b/esapi/api.update.go @@ -15,7 +15,9 @@ import ( "time" ) -func newUpdateFunc(t Transport) Update { +// NewUpdate creates a new API client for the Update endpoint +// +func NewUpdate(t Transport) Update { return func(index string, id string, body io.Reader, o ...func(*UpdateRequest)) (*Response, error) { var r = UpdateRequest{Index: index, DocumentID: id, Body: body} for _, f := range o { diff --git a/esapi/api.update_by_query.go b/esapi/api.update_by_query.go index d689b133fd..9dedf6d734 100644 --- a/esapi/api.update_by_query.go +++ b/esapi/api.update_by_query.go @@ -16,7 +16,9 @@ import ( "time" ) -func newUpdateByQueryFunc(t Transport) UpdateByQuery { +// NewUpdateByQuery creates a new API client for the UpdateByQuery endpoint +// +func NewUpdateByQuery(t Transport) UpdateByQuery { return func(index []string, o ...func(*UpdateByQueryRequest)) (*Response, error) { var r = UpdateByQueryRequest{Index: index} for _, f := range o { diff --git a/esapi/api.update_by_query_rethrottle.go b/esapi/api.update_by_query_rethrottle.go index c116d13c13..cce36a3e59 100644 --- a/esapi/api.update_by_query_rethrottle.go +++ b/esapi/api.update_by_query_rethrottle.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newUpdateByQueryRethrottleFunc(t Transport) UpdateByQueryRethrottle { +// NewUpdateByQueryRethrottle creates a new API client for the UpdateByQueryRethrottle endpoint +// +func NewUpdateByQueryRethrottle(t Transport) UpdateByQueryRethrottle { return func(task_id string, requests_per_second *int, o ...func(*UpdateByQueryRethrottleRequest)) (*Response, error) { var r = UpdateByQueryRethrottleRequest{TaskID: task_id, RequestsPerSecond: requests_per_second} for _, f := range o { diff --git a/esapi/api.xpack.async_search.delete.go b/esapi/api.xpack.async_search.delete.go index 2d268d3d00..9518a6c1ce 100644 --- a/esapi/api.xpack.async_search.delete.go +++ b/esapi/api.xpack.async_search.delete.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newAsyncSearchDeleteFunc(t Transport) AsyncSearchDelete { +// NewAsyncSearchDelete creates a new API client for the AsyncSearchDelete endpoint +// +func NewAsyncSearchDelete(t Transport) AsyncSearchDelete { return func(id string, o ...func(*AsyncSearchDeleteRequest)) (*Response, error) { var r = AsyncSearchDeleteRequest{DocumentID: id} for _, f := range o { diff --git a/esapi/api.xpack.async_search.get.go b/esapi/api.xpack.async_search.get.go index 80434c3a0a..c6aea3db10 100644 --- a/esapi/api.xpack.async_search.get.go +++ b/esapi/api.xpack.async_search.get.go @@ -14,7 +14,9 @@ import ( "time" ) -func newAsyncSearchGetFunc(t Transport) AsyncSearchGet { +// NewAsyncSearchGet creates a new API client for the AsyncSearchGet endpoint +// +func NewAsyncSearchGet(t Transport) AsyncSearchGet { return func(id string, o ...func(*AsyncSearchGetRequest)) (*Response, error) { var r = AsyncSearchGetRequest{DocumentID: id} for _, f := range o { diff --git a/esapi/api.xpack.async_search.submit.go b/esapi/api.xpack.async_search.submit.go index 1bf37633e4..b187e8e73b 100644 --- a/esapi/api.xpack.async_search.submit.go +++ b/esapi/api.xpack.async_search.submit.go @@ -16,7 +16,9 @@ import ( "time" ) -func newAsyncSearchSubmitFunc(t Transport) AsyncSearchSubmit { +// NewAsyncSearchSubmit creates a new API client for the AsyncSearchSubmit endpoint +// +func NewAsyncSearchSubmit(t Transport) AsyncSearchSubmit { return func(o ...func(*AsyncSearchSubmitRequest)) (*Response, error) { var r = AsyncSearchSubmitRequest{} for _, f := range o { diff --git a/esapi/api.xpack.autoscaling.delete_autoscaling_policy.go b/esapi/api.xpack.autoscaling.delete_autoscaling_policy.go index 0043241ac2..0ee7ea8821 100644 --- a/esapi/api.xpack.autoscaling.delete_autoscaling_policy.go +++ b/esapi/api.xpack.autoscaling.delete_autoscaling_policy.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newAutoscalingDeleteAutoscalingPolicyFunc(t Transport) AutoscalingDeleteAutoscalingPolicy { +// NewAutoscalingDeleteAutoscalingPolicy creates a new API client for the AutoscalingDeleteAutoscalingPolicy endpoint +// +func NewAutoscalingDeleteAutoscalingPolicy(t Transport) AutoscalingDeleteAutoscalingPolicy { return func(name string, o ...func(*AutoscalingDeleteAutoscalingPolicyRequest)) (*Response, error) { var r = AutoscalingDeleteAutoscalingPolicyRequest{Name: name} for _, f := range o { diff --git a/esapi/api.xpack.autoscaling.get_autoscaling_decision.go b/esapi/api.xpack.autoscaling.get_autoscaling_decision.go index ec1fa6281e..19eae5b5a8 100644 --- a/esapi/api.xpack.autoscaling.get_autoscaling_decision.go +++ b/esapi/api.xpack.autoscaling.get_autoscaling_decision.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newAutoscalingGetAutoscalingDecisionFunc(t Transport) AutoscalingGetAutoscalingDecision { +// NewAutoscalingGetAutoscalingDecision creates a new API client for the AutoscalingGetAutoscalingDecision endpoint +// +func NewAutoscalingGetAutoscalingDecision(t Transport) AutoscalingGetAutoscalingDecision { return func(o ...func(*AutoscalingGetAutoscalingDecisionRequest)) (*Response, error) { var r = AutoscalingGetAutoscalingDecisionRequest{} for _, f := range o { diff --git a/esapi/api.xpack.autoscaling.get_autoscaling_policy.go b/esapi/api.xpack.autoscaling.get_autoscaling_policy.go index 6f087e1be6..975cdcce17 100644 --- a/esapi/api.xpack.autoscaling.get_autoscaling_policy.go +++ b/esapi/api.xpack.autoscaling.get_autoscaling_policy.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newAutoscalingGetAutoscalingPolicyFunc(t Transport) AutoscalingGetAutoscalingPolicy { +// NewAutoscalingGetAutoscalingPolicy creates a new API client for the AutoscalingGetAutoscalingPolicy endpoint +// +func NewAutoscalingGetAutoscalingPolicy(t Transport) AutoscalingGetAutoscalingPolicy { return func(name string, o ...func(*AutoscalingGetAutoscalingPolicyRequest)) (*Response, error) { var r = AutoscalingGetAutoscalingPolicyRequest{Name: name} for _, f := range o { diff --git a/esapi/api.xpack.autoscaling.put_autoscaling_policy.go b/esapi/api.xpack.autoscaling.put_autoscaling_policy.go index c93366890d..d7aad06b65 100644 --- a/esapi/api.xpack.autoscaling.put_autoscaling_policy.go +++ b/esapi/api.xpack.autoscaling.put_autoscaling_policy.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newAutoscalingPutAutoscalingPolicyFunc(t Transport) AutoscalingPutAutoscalingPolicy { +// NewAutoscalingPutAutoscalingPolicy creates a new API client for the AutoscalingPutAutoscalingPolicy endpoint +// +func NewAutoscalingPutAutoscalingPolicy(t Transport) AutoscalingPutAutoscalingPolicy { return func(name string, body io.Reader, o ...func(*AutoscalingPutAutoscalingPolicyRequest)) (*Response, error) { var r = AutoscalingPutAutoscalingPolicyRequest{Name: name, Body: body} for _, f := range o { diff --git a/esapi/api.xpack.cat.ml_data_frame_analytics.go b/esapi/api.xpack.cat.ml_data_frame_analytics.go index 113423abaf..dad2757c52 100644 --- a/esapi/api.xpack.cat.ml_data_frame_analytics.go +++ b/esapi/api.xpack.cat.ml_data_frame_analytics.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newCatMLDataFrameAnalyticsFunc(t Transport) CatMLDataFrameAnalytics { +// NewCatMLDataFrameAnalytics creates a new API client for the CatMLDataFrameAnalytics endpoint +// +func NewCatMLDataFrameAnalytics(t Transport) CatMLDataFrameAnalytics { return func(o ...func(*CatMLDataFrameAnalyticsRequest)) (*Response, error) { var r = CatMLDataFrameAnalyticsRequest{} for _, f := range o { diff --git a/esapi/api.xpack.cat.ml_datafeeds.go b/esapi/api.xpack.cat.ml_datafeeds.go index b1385cd37a..b5a0c04f70 100644 --- a/esapi/api.xpack.cat.ml_datafeeds.go +++ b/esapi/api.xpack.cat.ml_datafeeds.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newCatMLDatafeedsFunc(t Transport) CatMLDatafeeds { +// NewCatMLDatafeeds creates a new API client for the CatMLDatafeeds endpoint +// +func NewCatMLDatafeeds(t Transport) CatMLDatafeeds { return func(o ...func(*CatMLDatafeedsRequest)) (*Response, error) { var r = CatMLDatafeedsRequest{} for _, f := range o { diff --git a/esapi/api.xpack.cat.ml_jobs.go b/esapi/api.xpack.cat.ml_jobs.go index 62706deb4f..3d27c8f501 100644 --- a/esapi/api.xpack.cat.ml_jobs.go +++ b/esapi/api.xpack.cat.ml_jobs.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newCatMLJobsFunc(t Transport) CatMLJobs { +// NewCatMLJobs creates a new API client for the CatMLJobs endpoint +// +func NewCatMLJobs(t Transport) CatMLJobs { return func(o ...func(*CatMLJobsRequest)) (*Response, error) { var r = CatMLJobsRequest{} for _, f := range o { diff --git a/esapi/api.xpack.cat.ml_trained_models.go b/esapi/api.xpack.cat.ml_trained_models.go index 168a70032b..cc033dca5d 100644 --- a/esapi/api.xpack.cat.ml_trained_models.go +++ b/esapi/api.xpack.cat.ml_trained_models.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newCatMLTrainedModelsFunc(t Transport) CatMLTrainedModels { +// NewCatMLTrainedModels creates a new API client for the CatMLTrainedModels endpoint +// +func NewCatMLTrainedModels(t Transport) CatMLTrainedModels { return func(o ...func(*CatMLTrainedModelsRequest)) (*Response, error) { var r = CatMLTrainedModelsRequest{} for _, f := range o { diff --git a/esapi/api.xpack.cat.transforms.go b/esapi/api.xpack.cat.transforms.go index 5800d0cedc..fbde8ef370 100644 --- a/esapi/api.xpack.cat.transforms.go +++ b/esapi/api.xpack.cat.transforms.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newCatTransformsFunc(t Transport) CatTransforms { +// NewCatTransforms creates a new API client for the CatTransforms endpoint +// +func NewCatTransforms(t Transport) CatTransforms { return func(o ...func(*CatTransformsRequest)) (*Response, error) { var r = CatTransformsRequest{} for _, f := range o { diff --git a/esapi/api.xpack.ccr.delete_auto_follow_pattern.go b/esapi/api.xpack.ccr.delete_auto_follow_pattern.go index a656c0ac95..e707c6da31 100644 --- a/esapi/api.xpack.ccr.delete_auto_follow_pattern.go +++ b/esapi/api.xpack.ccr.delete_auto_follow_pattern.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newCCRDeleteAutoFollowPatternFunc(t Transport) CCRDeleteAutoFollowPattern { +// NewCCRDeleteAutoFollowPattern creates a new API client for the CCRDeleteAutoFollowPattern endpoint +// +func NewCCRDeleteAutoFollowPattern(t Transport) CCRDeleteAutoFollowPattern { return func(name string, o ...func(*CCRDeleteAutoFollowPatternRequest)) (*Response, error) { var r = CCRDeleteAutoFollowPatternRequest{Name: name} for _, f := range o { diff --git a/esapi/api.xpack.ccr.follow.go b/esapi/api.xpack.ccr.follow.go index a83fa88d54..0c0d3cab7e 100644 --- a/esapi/api.xpack.ccr.follow.go +++ b/esapi/api.xpack.ccr.follow.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newCCRFollowFunc(t Transport) CCRFollow { +// NewCCRFollow creates a new API client for the CCRFollow endpoint +// +func NewCCRFollow(t Transport) CCRFollow { return func(index string, body io.Reader, o ...func(*CCRFollowRequest)) (*Response, error) { var r = CCRFollowRequest{Index: index, Body: body} for _, f := range o { diff --git a/esapi/api.xpack.ccr.follow_info.go b/esapi/api.xpack.ccr.follow_info.go index 0dd3eabea8..e53f0b37df 100644 --- a/esapi/api.xpack.ccr.follow_info.go +++ b/esapi/api.xpack.ccr.follow_info.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newCCRFollowInfoFunc(t Transport) CCRFollowInfo { +// NewCCRFollowInfo creates a new API client for the CCRFollowInfo endpoint +// +func NewCCRFollowInfo(t Transport) CCRFollowInfo { return func(index []string, o ...func(*CCRFollowInfoRequest)) (*Response, error) { var r = CCRFollowInfoRequest{Index: index} for _, f := range o { diff --git a/esapi/api.xpack.ccr.follow_stats.go b/esapi/api.xpack.ccr.follow_stats.go index 0738084112..3b6c5add6d 100644 --- a/esapi/api.xpack.ccr.follow_stats.go +++ b/esapi/api.xpack.ccr.follow_stats.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newCCRFollowStatsFunc(t Transport) CCRFollowStats { +// NewCCRFollowStats creates a new API client for the CCRFollowStats endpoint +// +func NewCCRFollowStats(t Transport) CCRFollowStats { return func(index []string, o ...func(*CCRFollowStatsRequest)) (*Response, error) { var r = CCRFollowStatsRequest{Index: index} for _, f := range o { diff --git a/esapi/api.xpack.ccr.forget_follower.go b/esapi/api.xpack.ccr.forget_follower.go index 42f9cdbe8f..e43e518f8d 100644 --- a/esapi/api.xpack.ccr.forget_follower.go +++ b/esapi/api.xpack.ccr.forget_follower.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newCCRForgetFollowerFunc(t Transport) CCRForgetFollower { +// NewCCRForgetFollower creates a new API client for the CCRForgetFollower endpoint +// +func NewCCRForgetFollower(t Transport) CCRForgetFollower { return func(index string, body io.Reader, o ...func(*CCRForgetFollowerRequest)) (*Response, error) { var r = CCRForgetFollowerRequest{Index: index, Body: body} for _, f := range o { diff --git a/esapi/api.xpack.ccr.get_auto_follow_pattern.go b/esapi/api.xpack.ccr.get_auto_follow_pattern.go index fac2f52b1a..7fa5dd482a 100644 --- a/esapi/api.xpack.ccr.get_auto_follow_pattern.go +++ b/esapi/api.xpack.ccr.get_auto_follow_pattern.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newCCRGetAutoFollowPatternFunc(t Transport) CCRGetAutoFollowPattern { +// NewCCRGetAutoFollowPattern creates a new API client for the CCRGetAutoFollowPattern endpoint +// +func NewCCRGetAutoFollowPattern(t Transport) CCRGetAutoFollowPattern { return func(o ...func(*CCRGetAutoFollowPatternRequest)) (*Response, error) { var r = CCRGetAutoFollowPatternRequest{} for _, f := range o { diff --git a/esapi/api.xpack.ccr.pause_auto_follow_pattern.go b/esapi/api.xpack.ccr.pause_auto_follow_pattern.go index d40ff8d8f2..fac0b8f310 100644 --- a/esapi/api.xpack.ccr.pause_auto_follow_pattern.go +++ b/esapi/api.xpack.ccr.pause_auto_follow_pattern.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newCCRPauseAutoFollowPatternFunc(t Transport) CCRPauseAutoFollowPattern { +// NewCCRPauseAutoFollowPattern creates a new API client for the CCRPauseAutoFollowPattern endpoint +// +func NewCCRPauseAutoFollowPattern(t Transport) CCRPauseAutoFollowPattern { return func(name string, o ...func(*CCRPauseAutoFollowPatternRequest)) (*Response, error) { var r = CCRPauseAutoFollowPatternRequest{Name: name} for _, f := range o { diff --git a/esapi/api.xpack.ccr.pause_follow.go b/esapi/api.xpack.ccr.pause_follow.go index 0bb7a346f2..8ba4532410 100644 --- a/esapi/api.xpack.ccr.pause_follow.go +++ b/esapi/api.xpack.ccr.pause_follow.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newCCRPauseFollowFunc(t Transport) CCRPauseFollow { +// NewCCRPauseFollow creates a new API client for the CCRPauseFollow endpoint +// +func NewCCRPauseFollow(t Transport) CCRPauseFollow { return func(index string, o ...func(*CCRPauseFollowRequest)) (*Response, error) { var r = CCRPauseFollowRequest{Index: index} for _, f := range o { diff --git a/esapi/api.xpack.ccr.put_auto_follow_pattern.go b/esapi/api.xpack.ccr.put_auto_follow_pattern.go index 08c442077e..d685971d9c 100644 --- a/esapi/api.xpack.ccr.put_auto_follow_pattern.go +++ b/esapi/api.xpack.ccr.put_auto_follow_pattern.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newCCRPutAutoFollowPatternFunc(t Transport) CCRPutAutoFollowPattern { +// NewCCRPutAutoFollowPattern creates a new API client for the CCRPutAutoFollowPattern endpoint +// +func NewCCRPutAutoFollowPattern(t Transport) CCRPutAutoFollowPattern { return func(name string, body io.Reader, o ...func(*CCRPutAutoFollowPatternRequest)) (*Response, error) { var r = CCRPutAutoFollowPatternRequest{Name: name, Body: body} for _, f := range o { diff --git a/esapi/api.xpack.ccr.resume_auto_follow_pattern.go b/esapi/api.xpack.ccr.resume_auto_follow_pattern.go index 6e7c042bea..de3f52956f 100644 --- a/esapi/api.xpack.ccr.resume_auto_follow_pattern.go +++ b/esapi/api.xpack.ccr.resume_auto_follow_pattern.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newCCRResumeAutoFollowPatternFunc(t Transport) CCRResumeAutoFollowPattern { +// NewCCRResumeAutoFollowPattern creates a new API client for the CCRResumeAutoFollowPattern endpoint +// +func NewCCRResumeAutoFollowPattern(t Transport) CCRResumeAutoFollowPattern { return func(name string, o ...func(*CCRResumeAutoFollowPatternRequest)) (*Response, error) { var r = CCRResumeAutoFollowPatternRequest{Name: name} for _, f := range o { diff --git a/esapi/api.xpack.ccr.resume_follow.go b/esapi/api.xpack.ccr.resume_follow.go index 7a6e8a67db..2dad79362d 100644 --- a/esapi/api.xpack.ccr.resume_follow.go +++ b/esapi/api.xpack.ccr.resume_follow.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newCCRResumeFollowFunc(t Transport) CCRResumeFollow { +// NewCCRResumeFollow creates a new API client for the CCRResumeFollow endpoint +// +func NewCCRResumeFollow(t Transport) CCRResumeFollow { return func(index string, o ...func(*CCRResumeFollowRequest)) (*Response, error) { var r = CCRResumeFollowRequest{Index: index} for _, f := range o { diff --git a/esapi/api.xpack.ccr.stats.go b/esapi/api.xpack.ccr.stats.go index c45bdb2ca4..4d2e041b0c 100644 --- a/esapi/api.xpack.ccr.stats.go +++ b/esapi/api.xpack.ccr.stats.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newCCRStatsFunc(t Transport) CCRStats { +// NewCCRStats creates a new API client for the CCRStats endpoint +// +func NewCCRStats(t Transport) CCRStats { return func(o ...func(*CCRStatsRequest)) (*Response, error) { var r = CCRStatsRequest{} for _, f := range o { diff --git a/esapi/api.xpack.ccr.unfollow.go b/esapi/api.xpack.ccr.unfollow.go index 1bd3995913..450718d0b9 100644 --- a/esapi/api.xpack.ccr.unfollow.go +++ b/esapi/api.xpack.ccr.unfollow.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newCCRUnfollowFunc(t Transport) CCRUnfollow { +// NewCCRUnfollow creates a new API client for the CCRUnfollow endpoint +// +func NewCCRUnfollow(t Transport) CCRUnfollow { return func(index string, o ...func(*CCRUnfollowRequest)) (*Response, error) { var r = CCRUnfollowRequest{Index: index} for _, f := range o { diff --git a/esapi/api.xpack.data_frame_transform_deprecated.delete_transform.go b/esapi/api.xpack.data_frame_transform_deprecated.delete_transform.go index b59a34806d..b28c41ade0 100644 --- a/esapi/api.xpack.data_frame_transform_deprecated.delete_transform.go +++ b/esapi/api.xpack.data_frame_transform_deprecated.delete_transform.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newDataFrameTransformDeprecatedDeleteTransformFunc(t Transport) DataFrameTransformDeprecatedDeleteTransform { +// NewDataFrameTransformDeprecatedDeleteTransform creates a new API client for the DataFrameTransformDeprecatedDeleteTransform endpoint +// +func NewDataFrameTransformDeprecatedDeleteTransform(t Transport) DataFrameTransformDeprecatedDeleteTransform { return func(transform_id string, o ...func(*DataFrameTransformDeprecatedDeleteTransformRequest)) (*Response, error) { var r = DataFrameTransformDeprecatedDeleteTransformRequest{TransformID: transform_id} for _, f := range o { diff --git a/esapi/api.xpack.data_frame_transform_deprecated.get_transform.go b/esapi/api.xpack.data_frame_transform_deprecated.get_transform.go index 1f45c51599..56a28593c8 100644 --- a/esapi/api.xpack.data_frame_transform_deprecated.get_transform.go +++ b/esapi/api.xpack.data_frame_transform_deprecated.get_transform.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newDataFrameTransformDeprecatedGetTransformFunc(t Transport) DataFrameTransformDeprecatedGetTransform { +// NewDataFrameTransformDeprecatedGetTransform creates a new API client for the DataFrameTransformDeprecatedGetTransform endpoint +// +func NewDataFrameTransformDeprecatedGetTransform(t Transport) DataFrameTransformDeprecatedGetTransform { return func(o ...func(*DataFrameTransformDeprecatedGetTransformRequest)) (*Response, error) { var r = DataFrameTransformDeprecatedGetTransformRequest{} for _, f := range o { diff --git a/esapi/api.xpack.data_frame_transform_deprecated.get_transform_stats.go b/esapi/api.xpack.data_frame_transform_deprecated.get_transform_stats.go index f84208212f..ba9e7a0576 100644 --- a/esapi/api.xpack.data_frame_transform_deprecated.get_transform_stats.go +++ b/esapi/api.xpack.data_frame_transform_deprecated.get_transform_stats.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newDataFrameTransformDeprecatedGetTransformStatsFunc(t Transport) DataFrameTransformDeprecatedGetTransformStats { +// NewDataFrameTransformDeprecatedGetTransformStats creates a new API client for the DataFrameTransformDeprecatedGetTransformStats endpoint +// +func NewDataFrameTransformDeprecatedGetTransformStats(t Transport) DataFrameTransformDeprecatedGetTransformStats { return func(transform_id string, o ...func(*DataFrameTransformDeprecatedGetTransformStatsRequest)) (*Response, error) { var r = DataFrameTransformDeprecatedGetTransformStatsRequest{TransformID: transform_id} for _, f := range o { diff --git a/esapi/api.xpack.data_frame_transform_deprecated.preview_transform.go b/esapi/api.xpack.data_frame_transform_deprecated.preview_transform.go index 6ead75fd0b..2184f40cf1 100644 --- a/esapi/api.xpack.data_frame_transform_deprecated.preview_transform.go +++ b/esapi/api.xpack.data_frame_transform_deprecated.preview_transform.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newDataFrameTransformDeprecatedPreviewTransformFunc(t Transport) DataFrameTransformDeprecatedPreviewTransform { +// NewDataFrameTransformDeprecatedPreviewTransform creates a new API client for the DataFrameTransformDeprecatedPreviewTransform endpoint +// +func NewDataFrameTransformDeprecatedPreviewTransform(t Transport) DataFrameTransformDeprecatedPreviewTransform { return func(body io.Reader, o ...func(*DataFrameTransformDeprecatedPreviewTransformRequest)) (*Response, error) { var r = DataFrameTransformDeprecatedPreviewTransformRequest{Body: body} for _, f := range o { diff --git a/esapi/api.xpack.data_frame_transform_deprecated.put_transform.go b/esapi/api.xpack.data_frame_transform_deprecated.put_transform.go index dc34d0355d..02918e69d9 100644 --- a/esapi/api.xpack.data_frame_transform_deprecated.put_transform.go +++ b/esapi/api.xpack.data_frame_transform_deprecated.put_transform.go @@ -14,7 +14,9 @@ import ( "strings" ) -func newDataFrameTransformDeprecatedPutTransformFunc(t Transport) DataFrameTransformDeprecatedPutTransform { +// NewDataFrameTransformDeprecatedPutTransform creates a new API client for the DataFrameTransformDeprecatedPutTransform endpoint +// +func NewDataFrameTransformDeprecatedPutTransform(t Transport) DataFrameTransformDeprecatedPutTransform { return func(body io.Reader, transform_id string, o ...func(*DataFrameTransformDeprecatedPutTransformRequest)) (*Response, error) { var r = DataFrameTransformDeprecatedPutTransformRequest{Body: body, TransformID: transform_id} for _, f := range o { diff --git a/esapi/api.xpack.data_frame_transform_deprecated.start_transform.go b/esapi/api.xpack.data_frame_transform_deprecated.start_transform.go index ea24be35ee..6d71118f8f 100644 --- a/esapi/api.xpack.data_frame_transform_deprecated.start_transform.go +++ b/esapi/api.xpack.data_frame_transform_deprecated.start_transform.go @@ -13,7 +13,9 @@ import ( "time" ) -func newDataFrameTransformDeprecatedStartTransformFunc(t Transport) DataFrameTransformDeprecatedStartTransform { +// NewDataFrameTransformDeprecatedStartTransform creates a new API client for the DataFrameTransformDeprecatedStartTransform endpoint +// +func NewDataFrameTransformDeprecatedStartTransform(t Transport) DataFrameTransformDeprecatedStartTransform { return func(transform_id string, o ...func(*DataFrameTransformDeprecatedStartTransformRequest)) (*Response, error) { var r = DataFrameTransformDeprecatedStartTransformRequest{TransformID: transform_id} for _, f := range o { diff --git a/esapi/api.xpack.data_frame_transform_deprecated.stop_transform.go b/esapi/api.xpack.data_frame_transform_deprecated.stop_transform.go index c2e5c51d59..09650e8df1 100644 --- a/esapi/api.xpack.data_frame_transform_deprecated.stop_transform.go +++ b/esapi/api.xpack.data_frame_transform_deprecated.stop_transform.go @@ -14,7 +14,9 @@ import ( "time" ) -func newDataFrameTransformDeprecatedStopTransformFunc(t Transport) DataFrameTransformDeprecatedStopTransform { +// NewDataFrameTransformDeprecatedStopTransform creates a new API client for the DataFrameTransformDeprecatedStopTransform endpoint +// +func NewDataFrameTransformDeprecatedStopTransform(t Transport) DataFrameTransformDeprecatedStopTransform { return func(transform_id string, o ...func(*DataFrameTransformDeprecatedStopTransformRequest)) (*Response, error) { var r = DataFrameTransformDeprecatedStopTransformRequest{TransformID: transform_id} for _, f := range o { diff --git a/esapi/api.xpack.data_frame_transform_deprecated.update_transform.go b/esapi/api.xpack.data_frame_transform_deprecated.update_transform.go index 0ad779108b..e1f1756096 100644 --- a/esapi/api.xpack.data_frame_transform_deprecated.update_transform.go +++ b/esapi/api.xpack.data_frame_transform_deprecated.update_transform.go @@ -14,7 +14,9 @@ import ( "strings" ) -func newDataFrameTransformDeprecatedUpdateTransformFunc(t Transport) DataFrameTransformDeprecatedUpdateTransform { +// NewDataFrameTransformDeprecatedUpdateTransform creates a new API client for the DataFrameTransformDeprecatedUpdateTransform endpoint +// +func NewDataFrameTransformDeprecatedUpdateTransform(t Transport) DataFrameTransformDeprecatedUpdateTransform { return func(body io.Reader, transform_id string, o ...func(*DataFrameTransformDeprecatedUpdateTransformRequest)) (*Response, error) { var r = DataFrameTransformDeprecatedUpdateTransformRequest{Body: body, TransformID: transform_id} for _, f := range o { diff --git a/esapi/api.xpack.enrich.delete_policy.go b/esapi/api.xpack.enrich.delete_policy.go index ed937a72cd..78e5605118 100644 --- a/esapi/api.xpack.enrich.delete_policy.go +++ b/esapi/api.xpack.enrich.delete_policy.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newEnrichDeletePolicyFunc(t Transport) EnrichDeletePolicy { +// NewEnrichDeletePolicy creates a new API client for the EnrichDeletePolicy endpoint +// +func NewEnrichDeletePolicy(t Transport) EnrichDeletePolicy { return func(name string, o ...func(*EnrichDeletePolicyRequest)) (*Response, error) { var r = EnrichDeletePolicyRequest{Name: name} for _, f := range o { diff --git a/esapi/api.xpack.enrich.execute_policy.go b/esapi/api.xpack.enrich.execute_policy.go index d3f4f5139d..a3a4b9ab57 100644 --- a/esapi/api.xpack.enrich.execute_policy.go +++ b/esapi/api.xpack.enrich.execute_policy.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newEnrichExecutePolicyFunc(t Transport) EnrichExecutePolicy { +// NewEnrichExecutePolicy creates a new API client for the EnrichExecutePolicy endpoint +// +func NewEnrichExecutePolicy(t Transport) EnrichExecutePolicy { return func(name string, o ...func(*EnrichExecutePolicyRequest)) (*Response, error) { var r = EnrichExecutePolicyRequest{Name: name} for _, f := range o { diff --git a/esapi/api.xpack.enrich.get_policy.go b/esapi/api.xpack.enrich.get_policy.go index 45945f97fe..62bce7d976 100644 --- a/esapi/api.xpack.enrich.get_policy.go +++ b/esapi/api.xpack.enrich.get_policy.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newEnrichGetPolicyFunc(t Transport) EnrichGetPolicy { +// NewEnrichGetPolicy creates a new API client for the EnrichGetPolicy endpoint +// +func NewEnrichGetPolicy(t Transport) EnrichGetPolicy { return func(o ...func(*EnrichGetPolicyRequest)) (*Response, error) { var r = EnrichGetPolicyRequest{} for _, f := range o { diff --git a/esapi/api.xpack.enrich.put_policy.go b/esapi/api.xpack.enrich.put_policy.go index d1cdf2556b..11bf753317 100644 --- a/esapi/api.xpack.enrich.put_policy.go +++ b/esapi/api.xpack.enrich.put_policy.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newEnrichPutPolicyFunc(t Transport) EnrichPutPolicy { +// NewEnrichPutPolicy creates a new API client for the EnrichPutPolicy endpoint +// +func NewEnrichPutPolicy(t Transport) EnrichPutPolicy { return func(name string, body io.Reader, o ...func(*EnrichPutPolicyRequest)) (*Response, error) { var r = EnrichPutPolicyRequest{Name: name, Body: body} for _, f := range o { diff --git a/esapi/api.xpack.enrich.stats.go b/esapi/api.xpack.enrich.stats.go index 057dd8c381..d51fb399dd 100644 --- a/esapi/api.xpack.enrich.stats.go +++ b/esapi/api.xpack.enrich.stats.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newEnrichStatsFunc(t Transport) EnrichStats { +// NewEnrichStats creates a new API client for the EnrichStats endpoint +// +func NewEnrichStats(t Transport) EnrichStats { return func(o ...func(*EnrichStatsRequest)) (*Response, error) { var r = EnrichStatsRequest{} for _, f := range o { diff --git a/esapi/api.xpack.eql.delete.go b/esapi/api.xpack.eql.delete.go index 858feb146f..d575ec657f 100644 --- a/esapi/api.xpack.eql.delete.go +++ b/esapi/api.xpack.eql.delete.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newEqlDeleteFunc(t Transport) EqlDelete { +// NewEqlDelete creates a new API client for the EqlDelete endpoint +// +func NewEqlDelete(t Transport) EqlDelete { return func(id string, o ...func(*EqlDeleteRequest)) (*Response, error) { var r = EqlDeleteRequest{DocumentID: id} for _, f := range o { diff --git a/esapi/api.xpack.eql.get.go b/esapi/api.xpack.eql.get.go index f103553958..541e3b84be 100644 --- a/esapi/api.xpack.eql.get.go +++ b/esapi/api.xpack.eql.get.go @@ -13,7 +13,9 @@ import ( "time" ) -func newEqlGetFunc(t Transport) EqlGet { +// NewEqlGet creates a new API client for the EqlGet endpoint +// +func NewEqlGet(t Transport) EqlGet { return func(id string, o ...func(*EqlGetRequest)) (*Response, error) { var r = EqlGetRequest{DocumentID: id} for _, f := range o { diff --git a/esapi/api.xpack.eql.search.go b/esapi/api.xpack.eql.search.go index e2c1ff46eb..79e5437afc 100644 --- a/esapi/api.xpack.eql.search.go +++ b/esapi/api.xpack.eql.search.go @@ -15,7 +15,9 @@ import ( "time" ) -func newEqlSearchFunc(t Transport) EqlSearch { +// NewEqlSearch creates a new API client for the EqlSearch endpoint +// +func NewEqlSearch(t Transport) EqlSearch { return func(index string, body io.Reader, o ...func(*EqlSearchRequest)) (*Response, error) { var r = EqlSearchRequest{Index: index, Body: body} for _, f := range o { diff --git a/esapi/api.xpack.graph.explore.go b/esapi/api.xpack.graph.explore.go index d19c930714..29ef8e6d42 100644 --- a/esapi/api.xpack.graph.explore.go +++ b/esapi/api.xpack.graph.explore.go @@ -14,7 +14,9 @@ import ( "time" ) -func newGraphExploreFunc(t Transport) GraphExplore { +// NewGraphExplore creates a new API client for the GraphExplore endpoint +// +func NewGraphExplore(t Transport) GraphExplore { return func(index []string, o ...func(*GraphExploreRequest)) (*Response, error) { var r = GraphExploreRequest{Index: index} for _, f := range o { diff --git a/esapi/api.xpack.ilm.delete_lifecycle.go b/esapi/api.xpack.ilm.delete_lifecycle.go index 064d3efeeb..926fd6c3a0 100644 --- a/esapi/api.xpack.ilm.delete_lifecycle.go +++ b/esapi/api.xpack.ilm.delete_lifecycle.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newILMDeleteLifecycleFunc(t Transport) ILMDeleteLifecycle { +// NewILMDeleteLifecycle creates a new API client for the ILMDeleteLifecycle endpoint +// +func NewILMDeleteLifecycle(t Transport) ILMDeleteLifecycle { return func(policy string, o ...func(*ILMDeleteLifecycleRequest)) (*Response, error) { var r = ILMDeleteLifecycleRequest{Policy: policy} for _, f := range o { diff --git a/esapi/api.xpack.ilm.explain_lifecycle.go b/esapi/api.xpack.ilm.explain_lifecycle.go index 73666129a9..da166eceb0 100644 --- a/esapi/api.xpack.ilm.explain_lifecycle.go +++ b/esapi/api.xpack.ilm.explain_lifecycle.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newILMExplainLifecycleFunc(t Transport) ILMExplainLifecycle { +// NewILMExplainLifecycle creates a new API client for the ILMExplainLifecycle endpoint +// +func NewILMExplainLifecycle(t Transport) ILMExplainLifecycle { return func(index string, o ...func(*ILMExplainLifecycleRequest)) (*Response, error) { var r = ILMExplainLifecycleRequest{Index: index} for _, f := range o { diff --git a/esapi/api.xpack.ilm.get_lifecycle.go b/esapi/api.xpack.ilm.get_lifecycle.go index 10e58dcebc..c1984faa45 100644 --- a/esapi/api.xpack.ilm.get_lifecycle.go +++ b/esapi/api.xpack.ilm.get_lifecycle.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newILMGetLifecycleFunc(t Transport) ILMGetLifecycle { +// NewILMGetLifecycle creates a new API client for the ILMGetLifecycle endpoint +// +func NewILMGetLifecycle(t Transport) ILMGetLifecycle { return func(o ...func(*ILMGetLifecycleRequest)) (*Response, error) { var r = ILMGetLifecycleRequest{} for _, f := range o { diff --git a/esapi/api.xpack.ilm.get_status.go b/esapi/api.xpack.ilm.get_status.go index f5a065dad3..0e0ede3712 100644 --- a/esapi/api.xpack.ilm.get_status.go +++ b/esapi/api.xpack.ilm.get_status.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newILMGetStatusFunc(t Transport) ILMGetStatus { +// NewILMGetStatus creates a new API client for the ILMGetStatus endpoint +// +func NewILMGetStatus(t Transport) ILMGetStatus { return func(o ...func(*ILMGetStatusRequest)) (*Response, error) { var r = ILMGetStatusRequest{} for _, f := range o { diff --git a/esapi/api.xpack.ilm.move_to_step.go b/esapi/api.xpack.ilm.move_to_step.go index b458fb14b2..700ff4814e 100644 --- a/esapi/api.xpack.ilm.move_to_step.go +++ b/esapi/api.xpack.ilm.move_to_step.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newILMMoveToStepFunc(t Transport) ILMMoveToStep { +// NewILMMoveToStep creates a new API client for the ILMMoveToStep endpoint +// +func NewILMMoveToStep(t Transport) ILMMoveToStep { return func(index string, o ...func(*ILMMoveToStepRequest)) (*Response, error) { var r = ILMMoveToStepRequest{Index: index} for _, f := range o { diff --git a/esapi/api.xpack.ilm.put_lifecycle.go b/esapi/api.xpack.ilm.put_lifecycle.go index c9085b917e..3300e4dfff 100644 --- a/esapi/api.xpack.ilm.put_lifecycle.go +++ b/esapi/api.xpack.ilm.put_lifecycle.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newILMPutLifecycleFunc(t Transport) ILMPutLifecycle { +// NewILMPutLifecycle creates a new API client for the ILMPutLifecycle endpoint +// +func NewILMPutLifecycle(t Transport) ILMPutLifecycle { return func(policy string, o ...func(*ILMPutLifecycleRequest)) (*Response, error) { var r = ILMPutLifecycleRequest{Policy: policy} for _, f := range o { diff --git a/esapi/api.xpack.ilm.remove_policy.go b/esapi/api.xpack.ilm.remove_policy.go index 984e9d23da..f2f50233c8 100644 --- a/esapi/api.xpack.ilm.remove_policy.go +++ b/esapi/api.xpack.ilm.remove_policy.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newILMRemovePolicyFunc(t Transport) ILMRemovePolicy { +// NewILMRemovePolicy creates a new API client for the ILMRemovePolicy endpoint +// +func NewILMRemovePolicy(t Transport) ILMRemovePolicy { return func(index string, o ...func(*ILMRemovePolicyRequest)) (*Response, error) { var r = ILMRemovePolicyRequest{Index: index} for _, f := range o { diff --git a/esapi/api.xpack.ilm.retry.go b/esapi/api.xpack.ilm.retry.go index d619abb9f8..8a4dec420c 100644 --- a/esapi/api.xpack.ilm.retry.go +++ b/esapi/api.xpack.ilm.retry.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newILMRetryFunc(t Transport) ILMRetry { +// NewILMRetry creates a new API client for the ILMRetry endpoint +// +func NewILMRetry(t Transport) ILMRetry { return func(index string, o ...func(*ILMRetryRequest)) (*Response, error) { var r = ILMRetryRequest{Index: index} for _, f := range o { diff --git a/esapi/api.xpack.ilm.start.go b/esapi/api.xpack.ilm.start.go index 61d58ec521..ae40868d88 100644 --- a/esapi/api.xpack.ilm.start.go +++ b/esapi/api.xpack.ilm.start.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newILMStartFunc(t Transport) ILMStart { +// NewILMStart creates a new API client for the ILMStart endpoint +// +func NewILMStart(t Transport) ILMStart { return func(o ...func(*ILMStartRequest)) (*Response, error) { var r = ILMStartRequest{} for _, f := range o { diff --git a/esapi/api.xpack.ilm.stop.go b/esapi/api.xpack.ilm.stop.go index 9975bda779..bec2133e3b 100644 --- a/esapi/api.xpack.ilm.stop.go +++ b/esapi/api.xpack.ilm.stop.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newILMStopFunc(t Transport) ILMStop { +// NewILMStop creates a new API client for the ILMStop endpoint +// +func NewILMStop(t Transport) ILMStop { return func(o ...func(*ILMStopRequest)) (*Response, error) { var r = ILMStopRequest{} for _, f := range o { diff --git a/esapi/api.xpack.indices.create_data_stream.go b/esapi/api.xpack.indices.create_data_stream.go index e3b406e789..d42fbc5531 100644 --- a/esapi/api.xpack.indices.create_data_stream.go +++ b/esapi/api.xpack.indices.create_data_stream.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newIndicesCreateDataStreamFunc(t Transport) IndicesCreateDataStream { +// NewIndicesCreateDataStream creates a new API client for the IndicesCreateDataStream endpoint +// +func NewIndicesCreateDataStream(t Transport) IndicesCreateDataStream { return func(name string, o ...func(*IndicesCreateDataStreamRequest)) (*Response, error) { var r = IndicesCreateDataStreamRequest{Name: name} for _, f := range o { diff --git a/esapi/api.xpack.indices.data_streams_stats.go b/esapi/api.xpack.indices.data_streams_stats.go index e548affa37..97315e217a 100644 --- a/esapi/api.xpack.indices.data_streams_stats.go +++ b/esapi/api.xpack.indices.data_streams_stats.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newIndicesDataStreamsStatsFunc(t Transport) IndicesDataStreamsStats { +// NewIndicesDataStreamsStats creates a new API client for the IndicesDataStreamsStats endpoint +// +func NewIndicesDataStreamsStats(t Transport) IndicesDataStreamsStats { return func(o ...func(*IndicesDataStreamsStatsRequest)) (*Response, error) { var r = IndicesDataStreamsStatsRequest{} for _, f := range o { diff --git a/esapi/api.xpack.indices.delete_data_stream.go b/esapi/api.xpack.indices.delete_data_stream.go index 634305f102..cdc6bcde36 100644 --- a/esapi/api.xpack.indices.delete_data_stream.go +++ b/esapi/api.xpack.indices.delete_data_stream.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newIndicesDeleteDataStreamFunc(t Transport) IndicesDeleteDataStream { +// NewIndicesDeleteDataStream creates a new API client for the IndicesDeleteDataStream endpoint +// +func NewIndicesDeleteDataStream(t Transport) IndicesDeleteDataStream { return func(name []string, o ...func(*IndicesDeleteDataStreamRequest)) (*Response, error) { var r = IndicesDeleteDataStreamRequest{Name: name} for _, f := range o { diff --git a/esapi/api.xpack.indices.freeze.go b/esapi/api.xpack.indices.freeze.go index 0908286c15..dfd6fe6608 100644 --- a/esapi/api.xpack.indices.freeze.go +++ b/esapi/api.xpack.indices.freeze.go @@ -14,7 +14,9 @@ import ( "time" ) -func newIndicesFreezeFunc(t Transport) IndicesFreeze { +// NewIndicesFreeze creates a new API client for the IndicesFreeze endpoint +// +func NewIndicesFreeze(t Transport) IndicesFreeze { return func(index string, o ...func(*IndicesFreezeRequest)) (*Response, error) { var r = IndicesFreezeRequest{Index: index} for _, f := range o { diff --git a/esapi/api.xpack.indices.get_data_stream.go b/esapi/api.xpack.indices.get_data_stream.go index 55e5e20cf3..d753a01b07 100644 --- a/esapi/api.xpack.indices.get_data_stream.go +++ b/esapi/api.xpack.indices.get_data_stream.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newIndicesGetDataStreamFunc(t Transport) IndicesGetDataStream { +// NewIndicesGetDataStream creates a new API client for the IndicesGetDataStream endpoint +// +func NewIndicesGetDataStream(t Transport) IndicesGetDataStream { return func(o ...func(*IndicesGetDataStreamRequest)) (*Response, error) { var r = IndicesGetDataStreamRequest{} for _, f := range o { diff --git a/esapi/api.xpack.indices.reload_search_analyzers.go b/esapi/api.xpack.indices.reload_search_analyzers.go index c53b0d1fe7..8454931120 100644 --- a/esapi/api.xpack.indices.reload_search_analyzers.go +++ b/esapi/api.xpack.indices.reload_search_analyzers.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newIndicesReloadSearchAnalyzersFunc(t Transport) IndicesReloadSearchAnalyzers { +// NewIndicesReloadSearchAnalyzers creates a new API client for the IndicesReloadSearchAnalyzers endpoint +// +func NewIndicesReloadSearchAnalyzers(t Transport) IndicesReloadSearchAnalyzers { return func(index []string, o ...func(*IndicesReloadSearchAnalyzersRequest)) (*Response, error) { var r = IndicesReloadSearchAnalyzersRequest{Index: index} for _, f := range o { diff --git a/esapi/api.xpack.indices.unfreeze.go b/esapi/api.xpack.indices.unfreeze.go index d7d0ffb712..af29573c03 100644 --- a/esapi/api.xpack.indices.unfreeze.go +++ b/esapi/api.xpack.indices.unfreeze.go @@ -14,7 +14,9 @@ import ( "time" ) -func newIndicesUnfreezeFunc(t Transport) IndicesUnfreeze { +// NewIndicesUnfreeze creates a new API client for the IndicesUnfreeze endpoint +// +func NewIndicesUnfreeze(t Transport) IndicesUnfreeze { return func(index string, o ...func(*IndicesUnfreezeRequest)) (*Response, error) { var r = IndicesUnfreezeRequest{Index: index} for _, f := range o { diff --git a/esapi/api.xpack.license.delete.go b/esapi/api.xpack.license.delete.go index 5d5824906e..95f8bb4f45 100644 --- a/esapi/api.xpack.license.delete.go +++ b/esapi/api.xpack.license.delete.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newLicenseDeleteFunc(t Transport) LicenseDelete { +// NewLicenseDelete creates a new API client for the LicenseDelete endpoint +// +func NewLicenseDelete(t Transport) LicenseDelete { return func(o ...func(*LicenseDeleteRequest)) (*Response, error) { var r = LicenseDeleteRequest{} for _, f := range o { diff --git a/esapi/api.xpack.license.get.go b/esapi/api.xpack.license.get.go index 921052353a..bdae3cb236 100644 --- a/esapi/api.xpack.license.get.go +++ b/esapi/api.xpack.license.get.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newLicenseGetFunc(t Transport) LicenseGet { +// NewLicenseGet creates a new API client for the LicenseGet endpoint +// +func NewLicenseGet(t Transport) LicenseGet { return func(o ...func(*LicenseGetRequest)) (*Response, error) { var r = LicenseGetRequest{} for _, f := range o { diff --git a/esapi/api.xpack.license.get_basic_status.go b/esapi/api.xpack.license.get_basic_status.go index 2038f062ac..1ae40d96d5 100644 --- a/esapi/api.xpack.license.get_basic_status.go +++ b/esapi/api.xpack.license.get_basic_status.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newLicenseGetBasicStatusFunc(t Transport) LicenseGetBasicStatus { +// NewLicenseGetBasicStatus creates a new API client for the LicenseGetBasicStatus endpoint +// +func NewLicenseGetBasicStatus(t Transport) LicenseGetBasicStatus { return func(o ...func(*LicenseGetBasicStatusRequest)) (*Response, error) { var r = LicenseGetBasicStatusRequest{} for _, f := range o { diff --git a/esapi/api.xpack.license.get_trial_status.go b/esapi/api.xpack.license.get_trial_status.go index b52ded11a5..80b3e92429 100644 --- a/esapi/api.xpack.license.get_trial_status.go +++ b/esapi/api.xpack.license.get_trial_status.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newLicenseGetTrialStatusFunc(t Transport) LicenseGetTrialStatus { +// NewLicenseGetTrialStatus creates a new API client for the LicenseGetTrialStatus endpoint +// +func NewLicenseGetTrialStatus(t Transport) LicenseGetTrialStatus { return func(o ...func(*LicenseGetTrialStatusRequest)) (*Response, error) { var r = LicenseGetTrialStatusRequest{} for _, f := range o { diff --git a/esapi/api.xpack.license.post.go b/esapi/api.xpack.license.post.go index 996d0c0f4b..48b9bb3354 100644 --- a/esapi/api.xpack.license.post.go +++ b/esapi/api.xpack.license.post.go @@ -14,7 +14,9 @@ import ( "strings" ) -func newLicensePostFunc(t Transport) LicensePost { +// NewLicensePost creates a new API client for the LicensePost endpoint +// +func NewLicensePost(t Transport) LicensePost { return func(o ...func(*LicensePostRequest)) (*Response, error) { var r = LicensePostRequest{} for _, f := range o { diff --git a/esapi/api.xpack.license.post_start_basic.go b/esapi/api.xpack.license.post_start_basic.go index d4b0563b1f..8de60cea61 100644 --- a/esapi/api.xpack.license.post_start_basic.go +++ b/esapi/api.xpack.license.post_start_basic.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newLicensePostStartBasicFunc(t Transport) LicensePostStartBasic { +// NewLicensePostStartBasic creates a new API client for the LicensePostStartBasic endpoint +// +func NewLicensePostStartBasic(t Transport) LicensePostStartBasic { return func(o ...func(*LicensePostStartBasicRequest)) (*Response, error) { var r = LicensePostStartBasicRequest{} for _, f := range o { diff --git a/esapi/api.xpack.license.post_start_trial.go b/esapi/api.xpack.license.post_start_trial.go index 091b07a5b2..10d0122b1b 100644 --- a/esapi/api.xpack.license.post_start_trial.go +++ b/esapi/api.xpack.license.post_start_trial.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newLicensePostStartTrialFunc(t Transport) LicensePostStartTrial { +// NewLicensePostStartTrial creates a new API client for the LicensePostStartTrial endpoint +// +func NewLicensePostStartTrial(t Transport) LicensePostStartTrial { return func(o ...func(*LicensePostStartTrialRequest)) (*Response, error) { var r = LicensePostStartTrialRequest{} for _, f := range o { diff --git a/esapi/api.xpack.migration.deprecations.go b/esapi/api.xpack.migration.deprecations.go index 52aad20ad4..487b74475c 100644 --- a/esapi/api.xpack.migration.deprecations.go +++ b/esapi/api.xpack.migration.deprecations.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newMigrationDeprecationsFunc(t Transport) MigrationDeprecations { +// NewMigrationDeprecations creates a new API client for the MigrationDeprecations endpoint +// +func NewMigrationDeprecations(t Transport) MigrationDeprecations { return func(o ...func(*MigrationDeprecationsRequest)) (*Response, error) { var r = MigrationDeprecationsRequest{} for _, f := range o { diff --git a/esapi/api.xpack.ml.close_job.go b/esapi/api.xpack.ml.close_job.go index a7cd21c329..c5967a4297 100644 --- a/esapi/api.xpack.ml.close_job.go +++ b/esapi/api.xpack.ml.close_job.go @@ -15,7 +15,9 @@ import ( "time" ) -func newMLCloseJobFunc(t Transport) MLCloseJob { +// NewMLCloseJob creates a new API client for the MLCloseJob endpoint +// +func NewMLCloseJob(t Transport) MLCloseJob { return func(job_id string, o ...func(*MLCloseJobRequest)) (*Response, error) { var r = MLCloseJobRequest{JobID: job_id} for _, f := range o { diff --git a/esapi/api.xpack.ml.delete_calendar.go b/esapi/api.xpack.ml.delete_calendar.go index 0a09d6f810..9547726d66 100644 --- a/esapi/api.xpack.ml.delete_calendar.go +++ b/esapi/api.xpack.ml.delete_calendar.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newMLDeleteCalendarFunc(t Transport) MLDeleteCalendar { +// NewMLDeleteCalendar creates a new API client for the MLDeleteCalendar endpoint +// +func NewMLDeleteCalendar(t Transport) MLDeleteCalendar { return func(calendar_id string, o ...func(*MLDeleteCalendarRequest)) (*Response, error) { var r = MLDeleteCalendarRequest{CalendarID: calendar_id} for _, f := range o { diff --git a/esapi/api.xpack.ml.delete_calendar_event.go b/esapi/api.xpack.ml.delete_calendar_event.go index d481a37c2e..843a05eab7 100644 --- a/esapi/api.xpack.ml.delete_calendar_event.go +++ b/esapi/api.xpack.ml.delete_calendar_event.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newMLDeleteCalendarEventFunc(t Transport) MLDeleteCalendarEvent { +// NewMLDeleteCalendarEvent creates a new API client for the MLDeleteCalendarEvent endpoint +// +func NewMLDeleteCalendarEvent(t Transport) MLDeleteCalendarEvent { return func(calendar_id string, event_id string, o ...func(*MLDeleteCalendarEventRequest)) (*Response, error) { var r = MLDeleteCalendarEventRequest{CalendarID: calendar_id, EventID: event_id} for _, f := range o { diff --git a/esapi/api.xpack.ml.delete_calendar_job.go b/esapi/api.xpack.ml.delete_calendar_job.go index c74a55cbb2..b82bb0d6cf 100644 --- a/esapi/api.xpack.ml.delete_calendar_job.go +++ b/esapi/api.xpack.ml.delete_calendar_job.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newMLDeleteCalendarJobFunc(t Transport) MLDeleteCalendarJob { +// NewMLDeleteCalendarJob creates a new API client for the MLDeleteCalendarJob endpoint +// +func NewMLDeleteCalendarJob(t Transport) MLDeleteCalendarJob { return func(calendar_id string, job_id string, o ...func(*MLDeleteCalendarJobRequest)) (*Response, error) { var r = MLDeleteCalendarJobRequest{CalendarID: calendar_id, JobID: job_id} for _, f := range o { diff --git a/esapi/api.xpack.ml.delete_data_frame_analytics.go b/esapi/api.xpack.ml.delete_data_frame_analytics.go index 7ebbb5fbd9..7957787ee2 100644 --- a/esapi/api.xpack.ml.delete_data_frame_analytics.go +++ b/esapi/api.xpack.ml.delete_data_frame_analytics.go @@ -14,7 +14,9 @@ import ( "time" ) -func newMLDeleteDataFrameAnalyticsFunc(t Transport) MLDeleteDataFrameAnalytics { +// NewMLDeleteDataFrameAnalytics creates a new API client for the MLDeleteDataFrameAnalytics endpoint +// +func NewMLDeleteDataFrameAnalytics(t Transport) MLDeleteDataFrameAnalytics { return func(id string, o ...func(*MLDeleteDataFrameAnalyticsRequest)) (*Response, error) { var r = MLDeleteDataFrameAnalyticsRequest{ID: id} for _, f := range o { diff --git a/esapi/api.xpack.ml.delete_datafeed.go b/esapi/api.xpack.ml.delete_datafeed.go index 23b94c444e..87ea512ec2 100644 --- a/esapi/api.xpack.ml.delete_datafeed.go +++ b/esapi/api.xpack.ml.delete_datafeed.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newMLDeleteDatafeedFunc(t Transport) MLDeleteDatafeed { +// NewMLDeleteDatafeed creates a new API client for the MLDeleteDatafeed endpoint +// +func NewMLDeleteDatafeed(t Transport) MLDeleteDatafeed { return func(datafeed_id string, o ...func(*MLDeleteDatafeedRequest)) (*Response, error) { var r = MLDeleteDatafeedRequest{DatafeedID: datafeed_id} for _, f := range o { diff --git a/esapi/api.xpack.ml.delete_expired_data.go b/esapi/api.xpack.ml.delete_expired_data.go index e57b73769b..860e4e111a 100644 --- a/esapi/api.xpack.ml.delete_expired_data.go +++ b/esapi/api.xpack.ml.delete_expired_data.go @@ -15,7 +15,9 @@ import ( "time" ) -func newMLDeleteExpiredDataFunc(t Transport) MLDeleteExpiredData { +// NewMLDeleteExpiredData creates a new API client for the MLDeleteExpiredData endpoint +// +func NewMLDeleteExpiredData(t Transport) MLDeleteExpiredData { return func(o ...func(*MLDeleteExpiredDataRequest)) (*Response, error) { var r = MLDeleteExpiredDataRequest{} for _, f := range o { diff --git a/esapi/api.xpack.ml.delete_filter.go b/esapi/api.xpack.ml.delete_filter.go index 5ac13fc58c..855d320293 100644 --- a/esapi/api.xpack.ml.delete_filter.go +++ b/esapi/api.xpack.ml.delete_filter.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newMLDeleteFilterFunc(t Transport) MLDeleteFilter { +// NewMLDeleteFilter creates a new API client for the MLDeleteFilter endpoint +// +func NewMLDeleteFilter(t Transport) MLDeleteFilter { return func(filter_id string, o ...func(*MLDeleteFilterRequest)) (*Response, error) { var r = MLDeleteFilterRequest{FilterID: filter_id} for _, f := range o { diff --git a/esapi/api.xpack.ml.delete_forecast.go b/esapi/api.xpack.ml.delete_forecast.go index 79f672b3b2..38ac447d70 100644 --- a/esapi/api.xpack.ml.delete_forecast.go +++ b/esapi/api.xpack.ml.delete_forecast.go @@ -14,7 +14,9 @@ import ( "time" ) -func newMLDeleteForecastFunc(t Transport) MLDeleteForecast { +// NewMLDeleteForecast creates a new API client for the MLDeleteForecast endpoint +// +func NewMLDeleteForecast(t Transport) MLDeleteForecast { return func(job_id string, o ...func(*MLDeleteForecastRequest)) (*Response, error) { var r = MLDeleteForecastRequest{JobID: job_id} for _, f := range o { diff --git a/esapi/api.xpack.ml.delete_job.go b/esapi/api.xpack.ml.delete_job.go index c6eb49979e..8d735638b9 100644 --- a/esapi/api.xpack.ml.delete_job.go +++ b/esapi/api.xpack.ml.delete_job.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newMLDeleteJobFunc(t Transport) MLDeleteJob { +// NewMLDeleteJob creates a new API client for the MLDeleteJob endpoint +// +func NewMLDeleteJob(t Transport) MLDeleteJob { return func(job_id string, o ...func(*MLDeleteJobRequest)) (*Response, error) { var r = MLDeleteJobRequest{JobID: job_id} for _, f := range o { diff --git a/esapi/api.xpack.ml.delete_model_snapshot.go b/esapi/api.xpack.ml.delete_model_snapshot.go index 5a6f70fcba..6779020df6 100644 --- a/esapi/api.xpack.ml.delete_model_snapshot.go +++ b/esapi/api.xpack.ml.delete_model_snapshot.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newMLDeleteModelSnapshotFunc(t Transport) MLDeleteModelSnapshot { +// NewMLDeleteModelSnapshot creates a new API client for the MLDeleteModelSnapshot endpoint +// +func NewMLDeleteModelSnapshot(t Transport) MLDeleteModelSnapshot { return func(snapshot_id string, job_id string, o ...func(*MLDeleteModelSnapshotRequest)) (*Response, error) { var r = MLDeleteModelSnapshotRequest{SnapshotID: snapshot_id, JobID: job_id} for _, f := range o { diff --git a/esapi/api.xpack.ml.delete_trained_model.go b/esapi/api.xpack.ml.delete_trained_model.go index f34d44eb83..8e4f58a170 100644 --- a/esapi/api.xpack.ml.delete_trained_model.go +++ b/esapi/api.xpack.ml.delete_trained_model.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newMLDeleteTrainedModelFunc(t Transport) MLDeleteTrainedModel { +// NewMLDeleteTrainedModel creates a new API client for the MLDeleteTrainedModel endpoint +// +func NewMLDeleteTrainedModel(t Transport) MLDeleteTrainedModel { return func(model_id string, o ...func(*MLDeleteTrainedModelRequest)) (*Response, error) { var r = MLDeleteTrainedModelRequest{ModelID: model_id} for _, f := range o { diff --git a/esapi/api.xpack.ml.estimate_model_memory.go b/esapi/api.xpack.ml.estimate_model_memory.go index 5eb6be3e72..703cce651c 100644 --- a/esapi/api.xpack.ml.estimate_model_memory.go +++ b/esapi/api.xpack.ml.estimate_model_memory.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newMLEstimateModelMemoryFunc(t Transport) MLEstimateModelMemory { +// NewMLEstimateModelMemory creates a new API client for the MLEstimateModelMemory endpoint +// +func NewMLEstimateModelMemory(t Transport) MLEstimateModelMemory { return func(body io.Reader, o ...func(*MLEstimateModelMemoryRequest)) (*Response, error) { var r = MLEstimateModelMemoryRequest{Body: body} for _, f := range o { diff --git a/esapi/api.xpack.ml.evaluate_data_frame.go b/esapi/api.xpack.ml.evaluate_data_frame.go index a621880634..73a14415d4 100644 --- a/esapi/api.xpack.ml.evaluate_data_frame.go +++ b/esapi/api.xpack.ml.evaluate_data_frame.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newMLEvaluateDataFrameFunc(t Transport) MLEvaluateDataFrame { +// NewMLEvaluateDataFrame creates a new API client for the MLEvaluateDataFrame endpoint +// +func NewMLEvaluateDataFrame(t Transport) MLEvaluateDataFrame { return func(body io.Reader, o ...func(*MLEvaluateDataFrameRequest)) (*Response, error) { var r = MLEvaluateDataFrameRequest{Body: body} for _, f := range o { diff --git a/esapi/api.xpack.ml.explain_data_frame_analytics.go b/esapi/api.xpack.ml.explain_data_frame_analytics.go index 8d7feababf..fdd26aeb45 100644 --- a/esapi/api.xpack.ml.explain_data_frame_analytics.go +++ b/esapi/api.xpack.ml.explain_data_frame_analytics.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newMLExplainDataFrameAnalyticsFunc(t Transport) MLExplainDataFrameAnalytics { +// NewMLExplainDataFrameAnalytics creates a new API client for the MLExplainDataFrameAnalytics endpoint +// +func NewMLExplainDataFrameAnalytics(t Transport) MLExplainDataFrameAnalytics { return func(o ...func(*MLExplainDataFrameAnalyticsRequest)) (*Response, error) { var r = MLExplainDataFrameAnalyticsRequest{} for _, f := range o { diff --git a/esapi/api.xpack.ml.find_file_structure.go b/esapi/api.xpack.ml.find_file_structure.go index 74fed0d6aa..e4b75afcbe 100644 --- a/esapi/api.xpack.ml.find_file_structure.go +++ b/esapi/api.xpack.ml.find_file_structure.go @@ -15,7 +15,9 @@ import ( "time" ) -func newMLFindFileStructureFunc(t Transport) MLFindFileStructure { +// NewMLFindFileStructure creates a new API client for the MLFindFileStructure endpoint +// +func NewMLFindFileStructure(t Transport) MLFindFileStructure { return func(body io.Reader, o ...func(*MLFindFileStructureRequest)) (*Response, error) { var r = MLFindFileStructureRequest{Body: body} for _, f := range o { diff --git a/esapi/api.xpack.ml.flush_job.go b/esapi/api.xpack.ml.flush_job.go index fd8b4ef293..7416cd66e9 100644 --- a/esapi/api.xpack.ml.flush_job.go +++ b/esapi/api.xpack.ml.flush_job.go @@ -14,7 +14,9 @@ import ( "strings" ) -func newMLFlushJobFunc(t Transport) MLFlushJob { +// NewMLFlushJob creates a new API client for the MLFlushJob endpoint +// +func NewMLFlushJob(t Transport) MLFlushJob { return func(job_id string, o ...func(*MLFlushJobRequest)) (*Response, error) { var r = MLFlushJobRequest{JobID: job_id} for _, f := range o { diff --git a/esapi/api.xpack.ml.forecast.go b/esapi/api.xpack.ml.forecast.go index 2c3c0453e7..8e372fc040 100644 --- a/esapi/api.xpack.ml.forecast.go +++ b/esapi/api.xpack.ml.forecast.go @@ -13,7 +13,9 @@ import ( "time" ) -func newMLForecastFunc(t Transport) MLForecast { +// NewMLForecast creates a new API client for the MLForecast endpoint +// +func NewMLForecast(t Transport) MLForecast { return func(job_id string, o ...func(*MLForecastRequest)) (*Response, error) { var r = MLForecastRequest{JobID: job_id} for _, f := range o { diff --git a/esapi/api.xpack.ml.get_buckets.go b/esapi/api.xpack.ml.get_buckets.go index 10b90eec31..6f413009a5 100644 --- a/esapi/api.xpack.ml.get_buckets.go +++ b/esapi/api.xpack.ml.get_buckets.go @@ -15,7 +15,9 @@ import ( "strings" ) -func newMLGetBucketsFunc(t Transport) MLGetBuckets { +// NewMLGetBuckets creates a new API client for the MLGetBuckets endpoint +// +func NewMLGetBuckets(t Transport) MLGetBuckets { return func(job_id string, o ...func(*MLGetBucketsRequest)) (*Response, error) { var r = MLGetBucketsRequest{JobID: job_id} for _, f := range o { diff --git a/esapi/api.xpack.ml.get_calendar_events.go b/esapi/api.xpack.ml.get_calendar_events.go index 488da50559..d569829db7 100644 --- a/esapi/api.xpack.ml.get_calendar_events.go +++ b/esapi/api.xpack.ml.get_calendar_events.go @@ -14,7 +14,9 @@ import ( "strings" ) -func newMLGetCalendarEventsFunc(t Transport) MLGetCalendarEvents { +// NewMLGetCalendarEvents creates a new API client for the MLGetCalendarEvents endpoint +// +func NewMLGetCalendarEvents(t Transport) MLGetCalendarEvents { return func(calendar_id string, o ...func(*MLGetCalendarEventsRequest)) (*Response, error) { var r = MLGetCalendarEventsRequest{CalendarID: calendar_id} for _, f := range o { diff --git a/esapi/api.xpack.ml.get_calendars.go b/esapi/api.xpack.ml.get_calendars.go index c2ea2448ed..b47b610cfa 100644 --- a/esapi/api.xpack.ml.get_calendars.go +++ b/esapi/api.xpack.ml.get_calendars.go @@ -14,7 +14,9 @@ import ( "strings" ) -func newMLGetCalendarsFunc(t Transport) MLGetCalendars { +// NewMLGetCalendars creates a new API client for the MLGetCalendars endpoint +// +func NewMLGetCalendars(t Transport) MLGetCalendars { return func(o ...func(*MLGetCalendarsRequest)) (*Response, error) { var r = MLGetCalendarsRequest{} for _, f := range o { diff --git a/esapi/api.xpack.ml.get_categories.go b/esapi/api.xpack.ml.get_categories.go index 86d87a6116..dfc6b7ca24 100644 --- a/esapi/api.xpack.ml.get_categories.go +++ b/esapi/api.xpack.ml.get_categories.go @@ -14,7 +14,9 @@ import ( "strings" ) -func newMLGetCategoriesFunc(t Transport) MLGetCategories { +// NewMLGetCategories creates a new API client for the MLGetCategories endpoint +// +func NewMLGetCategories(t Transport) MLGetCategories { return func(job_id string, o ...func(*MLGetCategoriesRequest)) (*Response, error) { var r = MLGetCategoriesRequest{JobID: job_id} for _, f := range o { diff --git a/esapi/api.xpack.ml.get_data_frame_analytics.go b/esapi/api.xpack.ml.get_data_frame_analytics.go index e8bff9cecf..9d0ba78b9c 100644 --- a/esapi/api.xpack.ml.get_data_frame_analytics.go +++ b/esapi/api.xpack.ml.get_data_frame_analytics.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newMLGetDataFrameAnalyticsFunc(t Transport) MLGetDataFrameAnalytics { +// NewMLGetDataFrameAnalytics creates a new API client for the MLGetDataFrameAnalytics endpoint +// +func NewMLGetDataFrameAnalytics(t Transport) MLGetDataFrameAnalytics { return func(o ...func(*MLGetDataFrameAnalyticsRequest)) (*Response, error) { var r = MLGetDataFrameAnalyticsRequest{} for _, f := range o { diff --git a/esapi/api.xpack.ml.get_data_frame_analytics_stats.go b/esapi/api.xpack.ml.get_data_frame_analytics_stats.go index 0eb49043a5..1334a1b1e1 100644 --- a/esapi/api.xpack.ml.get_data_frame_analytics_stats.go +++ b/esapi/api.xpack.ml.get_data_frame_analytics_stats.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newMLGetDataFrameAnalyticsStatsFunc(t Transport) MLGetDataFrameAnalyticsStats { +// NewMLGetDataFrameAnalyticsStats creates a new API client for the MLGetDataFrameAnalyticsStats endpoint +// +func NewMLGetDataFrameAnalyticsStats(t Transport) MLGetDataFrameAnalyticsStats { return func(o ...func(*MLGetDataFrameAnalyticsStatsRequest)) (*Response, error) { var r = MLGetDataFrameAnalyticsStatsRequest{} for _, f := range o { diff --git a/esapi/api.xpack.ml.get_datafeed_stats.go b/esapi/api.xpack.ml.get_datafeed_stats.go index d97b9aa0c4..4703274a0f 100644 --- a/esapi/api.xpack.ml.get_datafeed_stats.go +++ b/esapi/api.xpack.ml.get_datafeed_stats.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newMLGetDatafeedStatsFunc(t Transport) MLGetDatafeedStats { +// NewMLGetDatafeedStats creates a new API client for the MLGetDatafeedStats endpoint +// +func NewMLGetDatafeedStats(t Transport) MLGetDatafeedStats { return func(o ...func(*MLGetDatafeedStatsRequest)) (*Response, error) { var r = MLGetDatafeedStatsRequest{} for _, f := range o { diff --git a/esapi/api.xpack.ml.get_datafeeds.go b/esapi/api.xpack.ml.get_datafeeds.go index abe3426491..d7b1165194 100644 --- a/esapi/api.xpack.ml.get_datafeeds.go +++ b/esapi/api.xpack.ml.get_datafeeds.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newMLGetDatafeedsFunc(t Transport) MLGetDatafeeds { +// NewMLGetDatafeeds creates a new API client for the MLGetDatafeeds endpoint +// +func NewMLGetDatafeeds(t Transport) MLGetDatafeeds { return func(o ...func(*MLGetDatafeedsRequest)) (*Response, error) { var r = MLGetDatafeedsRequest{} for _, f := range o { diff --git a/esapi/api.xpack.ml.get_filters.go b/esapi/api.xpack.ml.get_filters.go index 425d842354..e3d9ddd919 100644 --- a/esapi/api.xpack.ml.get_filters.go +++ b/esapi/api.xpack.ml.get_filters.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newMLGetFiltersFunc(t Transport) MLGetFilters { +// NewMLGetFilters creates a new API client for the MLGetFilters endpoint +// +func NewMLGetFilters(t Transport) MLGetFilters { return func(o ...func(*MLGetFiltersRequest)) (*Response, error) { var r = MLGetFiltersRequest{} for _, f := range o { diff --git a/esapi/api.xpack.ml.get_influencers.go b/esapi/api.xpack.ml.get_influencers.go index 6caafe8716..814d5252cc 100644 --- a/esapi/api.xpack.ml.get_influencers.go +++ b/esapi/api.xpack.ml.get_influencers.go @@ -15,7 +15,9 @@ import ( "strings" ) -func newMLGetInfluencersFunc(t Transport) MLGetInfluencers { +// NewMLGetInfluencers creates a new API client for the MLGetInfluencers endpoint +// +func NewMLGetInfluencers(t Transport) MLGetInfluencers { return func(job_id string, o ...func(*MLGetInfluencersRequest)) (*Response, error) { var r = MLGetInfluencersRequest{JobID: job_id} for _, f := range o { diff --git a/esapi/api.xpack.ml.get_job_stats.go b/esapi/api.xpack.ml.get_job_stats.go index 9ad1ca1051..24547e84b0 100644 --- a/esapi/api.xpack.ml.get_job_stats.go +++ b/esapi/api.xpack.ml.get_job_stats.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newMLGetJobStatsFunc(t Transport) MLGetJobStats { +// NewMLGetJobStats creates a new API client for the MLGetJobStats endpoint +// +func NewMLGetJobStats(t Transport) MLGetJobStats { return func(o ...func(*MLGetJobStatsRequest)) (*Response, error) { var r = MLGetJobStatsRequest{} for _, f := range o { diff --git a/esapi/api.xpack.ml.get_jobs.go b/esapi/api.xpack.ml.get_jobs.go index 22a7d8ac54..db3ff4cfc5 100644 --- a/esapi/api.xpack.ml.get_jobs.go +++ b/esapi/api.xpack.ml.get_jobs.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newMLGetJobsFunc(t Transport) MLGetJobs { +// NewMLGetJobs creates a new API client for the MLGetJobs endpoint +// +func NewMLGetJobs(t Transport) MLGetJobs { return func(o ...func(*MLGetJobsRequest)) (*Response, error) { var r = MLGetJobsRequest{} for _, f := range o { diff --git a/esapi/api.xpack.ml.get_model_snapshots.go b/esapi/api.xpack.ml.get_model_snapshots.go index 7f539c9c33..6535c6a4dd 100644 --- a/esapi/api.xpack.ml.get_model_snapshots.go +++ b/esapi/api.xpack.ml.get_model_snapshots.go @@ -15,7 +15,9 @@ import ( "strings" ) -func newMLGetModelSnapshotsFunc(t Transport) MLGetModelSnapshots { +// NewMLGetModelSnapshots creates a new API client for the MLGetModelSnapshots endpoint +// +func NewMLGetModelSnapshots(t Transport) MLGetModelSnapshots { return func(job_id string, o ...func(*MLGetModelSnapshotsRequest)) (*Response, error) { var r = MLGetModelSnapshotsRequest{JobID: job_id} for _, f := range o { diff --git a/esapi/api.xpack.ml.get_overall_buckets.go b/esapi/api.xpack.ml.get_overall_buckets.go index e6036529f9..6f83bfe0f4 100644 --- a/esapi/api.xpack.ml.get_overall_buckets.go +++ b/esapi/api.xpack.ml.get_overall_buckets.go @@ -15,7 +15,9 @@ import ( "strings" ) -func newMLGetOverallBucketsFunc(t Transport) MLGetOverallBuckets { +// NewMLGetOverallBuckets creates a new API client for the MLGetOverallBuckets endpoint +// +func NewMLGetOverallBuckets(t Transport) MLGetOverallBuckets { return func(job_id string, o ...func(*MLGetOverallBucketsRequest)) (*Response, error) { var r = MLGetOverallBucketsRequest{JobID: job_id} for _, f := range o { diff --git a/esapi/api.xpack.ml.get_records.go b/esapi/api.xpack.ml.get_records.go index 2654723572..453e3e5518 100644 --- a/esapi/api.xpack.ml.get_records.go +++ b/esapi/api.xpack.ml.get_records.go @@ -15,7 +15,9 @@ import ( "strings" ) -func newMLGetRecordsFunc(t Transport) MLGetRecords { +// NewMLGetRecords creates a new API client for the MLGetRecords endpoint +// +func NewMLGetRecords(t Transport) MLGetRecords { return func(job_id string, o ...func(*MLGetRecordsRequest)) (*Response, error) { var r = MLGetRecordsRequest{JobID: job_id} for _, f := range o { diff --git a/esapi/api.xpack.ml.get_trained_models.go b/esapi/api.xpack.ml.get_trained_models.go index ce617a33ec..19ea0685e7 100644 --- a/esapi/api.xpack.ml.get_trained_models.go +++ b/esapi/api.xpack.ml.get_trained_models.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newMLGetTrainedModelsFunc(t Transport) MLGetTrainedModels { +// NewMLGetTrainedModels creates a new API client for the MLGetTrainedModels endpoint +// +func NewMLGetTrainedModels(t Transport) MLGetTrainedModels { return func(o ...func(*MLGetTrainedModelsRequest)) (*Response, error) { var r = MLGetTrainedModelsRequest{} for _, f := range o { diff --git a/esapi/api.xpack.ml.get_trained_models_stats.go b/esapi/api.xpack.ml.get_trained_models_stats.go index 31d540fe52..18d4e7090f 100644 --- a/esapi/api.xpack.ml.get_trained_models_stats.go +++ b/esapi/api.xpack.ml.get_trained_models_stats.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newMLGetTrainedModelsStatsFunc(t Transport) MLGetTrainedModelsStats { +// NewMLGetTrainedModelsStats creates a new API client for the MLGetTrainedModelsStats endpoint +// +func NewMLGetTrainedModelsStats(t Transport) MLGetTrainedModelsStats { return func(o ...func(*MLGetTrainedModelsStatsRequest)) (*Response, error) { var r = MLGetTrainedModelsStatsRequest{} for _, f := range o { diff --git a/esapi/api.xpack.ml.info.go b/esapi/api.xpack.ml.info.go index e62cc25304..b6f8560943 100644 --- a/esapi/api.xpack.ml.info.go +++ b/esapi/api.xpack.ml.info.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newMLInfoFunc(t Transport) MLInfo { +// NewMLInfo creates a new API client for the MLInfo endpoint +// +func NewMLInfo(t Transport) MLInfo { return func(o ...func(*MLInfoRequest)) (*Response, error) { var r = MLInfoRequest{} for _, f := range o { diff --git a/esapi/api.xpack.ml.open_job.go b/esapi/api.xpack.ml.open_job.go index 1375b72ff4..7c1a5ace6e 100644 --- a/esapi/api.xpack.ml.open_job.go +++ b/esapi/api.xpack.ml.open_job.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newMLOpenJobFunc(t Transport) MLOpenJob { +// NewMLOpenJob creates a new API client for the MLOpenJob endpoint +// +func NewMLOpenJob(t Transport) MLOpenJob { return func(job_id string, o ...func(*MLOpenJobRequest)) (*Response, error) { var r = MLOpenJobRequest{JobID: job_id} for _, f := range o { diff --git a/esapi/api.xpack.ml.post_calendar_events.go b/esapi/api.xpack.ml.post_calendar_events.go index a18ca15c34..ee8ced03ca 100644 --- a/esapi/api.xpack.ml.post_calendar_events.go +++ b/esapi/api.xpack.ml.post_calendar_events.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newMLPostCalendarEventsFunc(t Transport) MLPostCalendarEvents { +// NewMLPostCalendarEvents creates a new API client for the MLPostCalendarEvents endpoint +// +func NewMLPostCalendarEvents(t Transport) MLPostCalendarEvents { return func(calendar_id string, body io.Reader, o ...func(*MLPostCalendarEventsRequest)) (*Response, error) { var r = MLPostCalendarEventsRequest{CalendarID: calendar_id, Body: body} for _, f := range o { diff --git a/esapi/api.xpack.ml.post_data.go b/esapi/api.xpack.ml.post_data.go index 3806d743c5..2c2f0ea4a9 100644 --- a/esapi/api.xpack.ml.post_data.go +++ b/esapi/api.xpack.ml.post_data.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newMLPostDataFunc(t Transport) MLPostData { +// NewMLPostData creates a new API client for the MLPostData endpoint +// +func NewMLPostData(t Transport) MLPostData { return func(job_id string, body io.Reader, o ...func(*MLPostDataRequest)) (*Response, error) { var r = MLPostDataRequest{JobID: job_id, Body: body} for _, f := range o { diff --git a/esapi/api.xpack.ml.preview_datafeed.go b/esapi/api.xpack.ml.preview_datafeed.go index ba5e117e78..5c4fbeb87c 100644 --- a/esapi/api.xpack.ml.preview_datafeed.go +++ b/esapi/api.xpack.ml.preview_datafeed.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newMLPreviewDatafeedFunc(t Transport) MLPreviewDatafeed { +// NewMLPreviewDatafeed creates a new API client for the MLPreviewDatafeed endpoint +// +func NewMLPreviewDatafeed(t Transport) MLPreviewDatafeed { return func(datafeed_id string, o ...func(*MLPreviewDatafeedRequest)) (*Response, error) { var r = MLPreviewDatafeedRequest{DatafeedID: datafeed_id} for _, f := range o { diff --git a/esapi/api.xpack.ml.put_calendar.go b/esapi/api.xpack.ml.put_calendar.go index 9c7d1e3eac..d71a60101a 100644 --- a/esapi/api.xpack.ml.put_calendar.go +++ b/esapi/api.xpack.ml.put_calendar.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newMLPutCalendarFunc(t Transport) MLPutCalendar { +// NewMLPutCalendar creates a new API client for the MLPutCalendar endpoint +// +func NewMLPutCalendar(t Transport) MLPutCalendar { return func(calendar_id string, o ...func(*MLPutCalendarRequest)) (*Response, error) { var r = MLPutCalendarRequest{CalendarID: calendar_id} for _, f := range o { diff --git a/esapi/api.xpack.ml.put_calendar_job.go b/esapi/api.xpack.ml.put_calendar_job.go index 935fb38eb3..18fce38fd6 100644 --- a/esapi/api.xpack.ml.put_calendar_job.go +++ b/esapi/api.xpack.ml.put_calendar_job.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newMLPutCalendarJobFunc(t Transport) MLPutCalendarJob { +// NewMLPutCalendarJob creates a new API client for the MLPutCalendarJob endpoint +// +func NewMLPutCalendarJob(t Transport) MLPutCalendarJob { return func(calendar_id string, job_id string, o ...func(*MLPutCalendarJobRequest)) (*Response, error) { var r = MLPutCalendarJobRequest{CalendarID: calendar_id, JobID: job_id} for _, f := range o { diff --git a/esapi/api.xpack.ml.put_data_frame_analytics.go b/esapi/api.xpack.ml.put_data_frame_analytics.go index 8a879b001a..e5df87f1b9 100644 --- a/esapi/api.xpack.ml.put_data_frame_analytics.go +++ b/esapi/api.xpack.ml.put_data_frame_analytics.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newMLPutDataFrameAnalyticsFunc(t Transport) MLPutDataFrameAnalytics { +// NewMLPutDataFrameAnalytics creates a new API client for the MLPutDataFrameAnalytics endpoint +// +func NewMLPutDataFrameAnalytics(t Transport) MLPutDataFrameAnalytics { return func(id string, body io.Reader, o ...func(*MLPutDataFrameAnalyticsRequest)) (*Response, error) { var r = MLPutDataFrameAnalyticsRequest{ID: id, Body: body} for _, f := range o { diff --git a/esapi/api.xpack.ml.put_datafeed.go b/esapi/api.xpack.ml.put_datafeed.go index 9dc8720bf8..a878cb1b78 100644 --- a/esapi/api.xpack.ml.put_datafeed.go +++ b/esapi/api.xpack.ml.put_datafeed.go @@ -14,7 +14,9 @@ import ( "strings" ) -func newMLPutDatafeedFunc(t Transport) MLPutDatafeed { +// NewMLPutDatafeed creates a new API client for the MLPutDatafeed endpoint +// +func NewMLPutDatafeed(t Transport) MLPutDatafeed { return func(body io.Reader, datafeed_id string, o ...func(*MLPutDatafeedRequest)) (*Response, error) { var r = MLPutDatafeedRequest{Body: body, DatafeedID: datafeed_id} for _, f := range o { diff --git a/esapi/api.xpack.ml.put_filter.go b/esapi/api.xpack.ml.put_filter.go index 213db93eb2..f38d863960 100644 --- a/esapi/api.xpack.ml.put_filter.go +++ b/esapi/api.xpack.ml.put_filter.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newMLPutFilterFunc(t Transport) MLPutFilter { +// NewMLPutFilter creates a new API client for the MLPutFilter endpoint +// +func NewMLPutFilter(t Transport) MLPutFilter { return func(body io.Reader, filter_id string, o ...func(*MLPutFilterRequest)) (*Response, error) { var r = MLPutFilterRequest{Body: body, FilterID: filter_id} for _, f := range o { diff --git a/esapi/api.xpack.ml.put_job.go b/esapi/api.xpack.ml.put_job.go index 815d818276..a527371faa 100644 --- a/esapi/api.xpack.ml.put_job.go +++ b/esapi/api.xpack.ml.put_job.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newMLPutJobFunc(t Transport) MLPutJob { +// NewMLPutJob creates a new API client for the MLPutJob endpoint +// +func NewMLPutJob(t Transport) MLPutJob { return func(job_id string, body io.Reader, o ...func(*MLPutJobRequest)) (*Response, error) { var r = MLPutJobRequest{JobID: job_id, Body: body} for _, f := range o { diff --git a/esapi/api.xpack.ml.put_trained_model.go b/esapi/api.xpack.ml.put_trained_model.go index df30f3862b..d5cbfe15de 100644 --- a/esapi/api.xpack.ml.put_trained_model.go +++ b/esapi/api.xpack.ml.put_trained_model.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newMLPutTrainedModelFunc(t Transport) MLPutTrainedModel { +// NewMLPutTrainedModel creates a new API client for the MLPutTrainedModel endpoint +// +func NewMLPutTrainedModel(t Transport) MLPutTrainedModel { return func(body io.Reader, model_id string, o ...func(*MLPutTrainedModelRequest)) (*Response, error) { var r = MLPutTrainedModelRequest{Body: body, ModelID: model_id} for _, f := range o { diff --git a/esapi/api.xpack.ml.revert_model_snapshot.go b/esapi/api.xpack.ml.revert_model_snapshot.go index 9f0eefa3b2..23e6849d56 100644 --- a/esapi/api.xpack.ml.revert_model_snapshot.go +++ b/esapi/api.xpack.ml.revert_model_snapshot.go @@ -14,7 +14,9 @@ import ( "strings" ) -func newMLRevertModelSnapshotFunc(t Transport) MLRevertModelSnapshot { +// NewMLRevertModelSnapshot creates a new API client for the MLRevertModelSnapshot endpoint +// +func NewMLRevertModelSnapshot(t Transport) MLRevertModelSnapshot { return func(snapshot_id string, job_id string, o ...func(*MLRevertModelSnapshotRequest)) (*Response, error) { var r = MLRevertModelSnapshotRequest{SnapshotID: snapshot_id, JobID: job_id} for _, f := range o { diff --git a/esapi/api.xpack.ml.set_upgrade_mode.go b/esapi/api.xpack.ml.set_upgrade_mode.go index 564d3315d4..d48454cf58 100644 --- a/esapi/api.xpack.ml.set_upgrade_mode.go +++ b/esapi/api.xpack.ml.set_upgrade_mode.go @@ -14,7 +14,9 @@ import ( "time" ) -func newMLSetUpgradeModeFunc(t Transport) MLSetUpgradeMode { +// NewMLSetUpgradeMode creates a new API client for the MLSetUpgradeMode endpoint +// +func NewMLSetUpgradeMode(t Transport) MLSetUpgradeMode { return func(o ...func(*MLSetUpgradeModeRequest)) (*Response, error) { var r = MLSetUpgradeModeRequest{} for _, f := range o { diff --git a/esapi/api.xpack.ml.start_data_frame_analytics.go b/esapi/api.xpack.ml.start_data_frame_analytics.go index b9ae5b234d..ad3ba7509a 100644 --- a/esapi/api.xpack.ml.start_data_frame_analytics.go +++ b/esapi/api.xpack.ml.start_data_frame_analytics.go @@ -14,7 +14,9 @@ import ( "time" ) -func newMLStartDataFrameAnalyticsFunc(t Transport) MLStartDataFrameAnalytics { +// NewMLStartDataFrameAnalytics creates a new API client for the MLStartDataFrameAnalytics endpoint +// +func NewMLStartDataFrameAnalytics(t Transport) MLStartDataFrameAnalytics { return func(id string, o ...func(*MLStartDataFrameAnalyticsRequest)) (*Response, error) { var r = MLStartDataFrameAnalyticsRequest{ID: id} for _, f := range o { diff --git a/esapi/api.xpack.ml.start_datafeed.go b/esapi/api.xpack.ml.start_datafeed.go index 85b44811a5..8ad827e86e 100644 --- a/esapi/api.xpack.ml.start_datafeed.go +++ b/esapi/api.xpack.ml.start_datafeed.go @@ -14,7 +14,9 @@ import ( "time" ) -func newMLStartDatafeedFunc(t Transport) MLStartDatafeed { +// NewMLStartDatafeed creates a new API client for the MLStartDatafeed endpoint +// +func NewMLStartDatafeed(t Transport) MLStartDatafeed { return func(datafeed_id string, o ...func(*MLStartDatafeedRequest)) (*Response, error) { var r = MLStartDatafeedRequest{DatafeedID: datafeed_id} for _, f := range o { diff --git a/esapi/api.xpack.ml.stop_data_frame_analytics.go b/esapi/api.xpack.ml.stop_data_frame_analytics.go index 6c8f533637..2661126745 100644 --- a/esapi/api.xpack.ml.stop_data_frame_analytics.go +++ b/esapi/api.xpack.ml.stop_data_frame_analytics.go @@ -15,7 +15,9 @@ import ( "time" ) -func newMLStopDataFrameAnalyticsFunc(t Transport) MLStopDataFrameAnalytics { +// NewMLStopDataFrameAnalytics creates a new API client for the MLStopDataFrameAnalytics endpoint +// +func NewMLStopDataFrameAnalytics(t Transport) MLStopDataFrameAnalytics { return func(id string, o ...func(*MLStopDataFrameAnalyticsRequest)) (*Response, error) { var r = MLStopDataFrameAnalyticsRequest{ID: id} for _, f := range o { diff --git a/esapi/api.xpack.ml.stop_datafeed.go b/esapi/api.xpack.ml.stop_datafeed.go index 7b0cc4727a..f49187515a 100644 --- a/esapi/api.xpack.ml.stop_datafeed.go +++ b/esapi/api.xpack.ml.stop_datafeed.go @@ -14,7 +14,9 @@ import ( "time" ) -func newMLStopDatafeedFunc(t Transport) MLStopDatafeed { +// NewMLStopDatafeed creates a new API client for the MLStopDatafeed endpoint +// +func NewMLStopDatafeed(t Transport) MLStopDatafeed { return func(datafeed_id string, o ...func(*MLStopDatafeedRequest)) (*Response, error) { var r = MLStopDatafeedRequest{DatafeedID: datafeed_id} for _, f := range o { diff --git a/esapi/api.xpack.ml.update_data_frame_analytics.go b/esapi/api.xpack.ml.update_data_frame_analytics.go index 8a71b67598..2568daac83 100644 --- a/esapi/api.xpack.ml.update_data_frame_analytics.go +++ b/esapi/api.xpack.ml.update_data_frame_analytics.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newMLUpdateDataFrameAnalyticsFunc(t Transport) MLUpdateDataFrameAnalytics { +// NewMLUpdateDataFrameAnalytics creates a new API client for the MLUpdateDataFrameAnalytics endpoint +// +func NewMLUpdateDataFrameAnalytics(t Transport) MLUpdateDataFrameAnalytics { return func(id string, body io.Reader, o ...func(*MLUpdateDataFrameAnalyticsRequest)) (*Response, error) { var r = MLUpdateDataFrameAnalyticsRequest{DocumentID: id, Body: body} for _, f := range o { diff --git a/esapi/api.xpack.ml.update_datafeed.go b/esapi/api.xpack.ml.update_datafeed.go index 885b1eb043..472efe659d 100644 --- a/esapi/api.xpack.ml.update_datafeed.go +++ b/esapi/api.xpack.ml.update_datafeed.go @@ -14,7 +14,9 @@ import ( "strings" ) -func newMLUpdateDatafeedFunc(t Transport) MLUpdateDatafeed { +// NewMLUpdateDatafeed creates a new API client for the MLUpdateDatafeed endpoint +// +func NewMLUpdateDatafeed(t Transport) MLUpdateDatafeed { return func(body io.Reader, datafeed_id string, o ...func(*MLUpdateDatafeedRequest)) (*Response, error) { var r = MLUpdateDatafeedRequest{Body: body, DatafeedID: datafeed_id} for _, f := range o { diff --git a/esapi/api.xpack.ml.update_filter.go b/esapi/api.xpack.ml.update_filter.go index 0645a82a2c..1b655c3ab1 100644 --- a/esapi/api.xpack.ml.update_filter.go +++ b/esapi/api.xpack.ml.update_filter.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newMLUpdateFilterFunc(t Transport) MLUpdateFilter { +// NewMLUpdateFilter creates a new API client for the MLUpdateFilter endpoint +// +func NewMLUpdateFilter(t Transport) MLUpdateFilter { return func(body io.Reader, filter_id string, o ...func(*MLUpdateFilterRequest)) (*Response, error) { var r = MLUpdateFilterRequest{Body: body, FilterID: filter_id} for _, f := range o { diff --git a/esapi/api.xpack.ml.update_job.go b/esapi/api.xpack.ml.update_job.go index 9f3c56192c..71316de9a8 100644 --- a/esapi/api.xpack.ml.update_job.go +++ b/esapi/api.xpack.ml.update_job.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newMLUpdateJobFunc(t Transport) MLUpdateJob { +// NewMLUpdateJob creates a new API client for the MLUpdateJob endpoint +// +func NewMLUpdateJob(t Transport) MLUpdateJob { return func(job_id string, body io.Reader, o ...func(*MLUpdateJobRequest)) (*Response, error) { var r = MLUpdateJobRequest{JobID: job_id, Body: body} for _, f := range o { diff --git a/esapi/api.xpack.ml.update_model_snapshot.go b/esapi/api.xpack.ml.update_model_snapshot.go index b392c00ec3..b43104a883 100644 --- a/esapi/api.xpack.ml.update_model_snapshot.go +++ b/esapi/api.xpack.ml.update_model_snapshot.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newMLUpdateModelSnapshotFunc(t Transport) MLUpdateModelSnapshot { +// NewMLUpdateModelSnapshot creates a new API client for the MLUpdateModelSnapshot endpoint +// +func NewMLUpdateModelSnapshot(t Transport) MLUpdateModelSnapshot { return func(snapshot_id string, job_id string, body io.Reader, o ...func(*MLUpdateModelSnapshotRequest)) (*Response, error) { var r = MLUpdateModelSnapshotRequest{SnapshotID: snapshot_id, JobID: job_id, Body: body} for _, f := range o { diff --git a/esapi/api.xpack.ml.validate.go b/esapi/api.xpack.ml.validate.go index 30159ab144..2c19e1be36 100644 --- a/esapi/api.xpack.ml.validate.go +++ b/esapi/api.xpack.ml.validate.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newMLValidateFunc(t Transport) MLValidate { +// NewMLValidate creates a new API client for the MLValidate endpoint +// +func NewMLValidate(t Transport) MLValidate { return func(body io.Reader, o ...func(*MLValidateRequest)) (*Response, error) { var r = MLValidateRequest{Body: body} for _, f := range o { diff --git a/esapi/api.xpack.ml.validate_detector.go b/esapi/api.xpack.ml.validate_detector.go index 1678cdd18e..fef8d7da59 100644 --- a/esapi/api.xpack.ml.validate_detector.go +++ b/esapi/api.xpack.ml.validate_detector.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newMLValidateDetectorFunc(t Transport) MLValidateDetector { +// NewMLValidateDetector creates a new API client for the MLValidateDetector endpoint +// +func NewMLValidateDetector(t Transport) MLValidateDetector { return func(body io.Reader, o ...func(*MLValidateDetectorRequest)) (*Response, error) { var r = MLValidateDetectorRequest{Body: body} for _, f := range o { diff --git a/esapi/api.xpack.monitoring.bulk.go b/esapi/api.xpack.monitoring.bulk.go index 6a874641d7..dcb03b6037 100644 --- a/esapi/api.xpack.monitoring.bulk.go +++ b/esapi/api.xpack.monitoring.bulk.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newMonitoringBulkFunc(t Transport) MonitoringBulk { +// NewMonitoringBulk creates a new API client for the MonitoringBulk endpoint +// +func NewMonitoringBulk(t Transport) MonitoringBulk { return func(body io.Reader, o ...func(*MonitoringBulkRequest)) (*Response, error) { var r = MonitoringBulkRequest{Body: body} for _, f := range o { diff --git a/esapi/api.xpack.rollup.delete_job.go b/esapi/api.xpack.rollup.delete_job.go index 2b20ce3bd2..5e09e263b1 100644 --- a/esapi/api.xpack.rollup.delete_job.go +++ b/esapi/api.xpack.rollup.delete_job.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newRollupDeleteJobFunc(t Transport) RollupDeleteJob { +// NewRollupDeleteJob creates a new API client for the RollupDeleteJob endpoint +// +func NewRollupDeleteJob(t Transport) RollupDeleteJob { return func(id string, o ...func(*RollupDeleteJobRequest)) (*Response, error) { var r = RollupDeleteJobRequest{JobID: id} for _, f := range o { diff --git a/esapi/api.xpack.rollup.get_jobs.go b/esapi/api.xpack.rollup.get_jobs.go index 41e2e33512..af029d51f0 100644 --- a/esapi/api.xpack.rollup.get_jobs.go +++ b/esapi/api.xpack.rollup.get_jobs.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newRollupGetJobsFunc(t Transport) RollupGetJobs { +// NewRollupGetJobs creates a new API client for the RollupGetJobs endpoint +// +func NewRollupGetJobs(t Transport) RollupGetJobs { return func(o ...func(*RollupGetJobsRequest)) (*Response, error) { var r = RollupGetJobsRequest{} for _, f := range o { diff --git a/esapi/api.xpack.rollup.get_rollup_caps.go b/esapi/api.xpack.rollup.get_rollup_caps.go index 069240fb30..9c593acc4e 100644 --- a/esapi/api.xpack.rollup.get_rollup_caps.go +++ b/esapi/api.xpack.rollup.get_rollup_caps.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newRollupGetRollupCapsFunc(t Transport) RollupGetRollupCaps { +// NewRollupGetRollupCaps creates a new API client for the RollupGetRollupCaps endpoint +// +func NewRollupGetRollupCaps(t Transport) RollupGetRollupCaps { return func(o ...func(*RollupGetRollupCapsRequest)) (*Response, error) { var r = RollupGetRollupCapsRequest{} for _, f := range o { diff --git a/esapi/api.xpack.rollup.get_rollup_index_caps.go b/esapi/api.xpack.rollup.get_rollup_index_caps.go index 1bdaf639ef..162476e4a1 100644 --- a/esapi/api.xpack.rollup.get_rollup_index_caps.go +++ b/esapi/api.xpack.rollup.get_rollup_index_caps.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newRollupGetRollupIndexCapsFunc(t Transport) RollupGetRollupIndexCaps { +// NewRollupGetRollupIndexCaps creates a new API client for the RollupGetRollupIndexCaps endpoint +// +func NewRollupGetRollupIndexCaps(t Transport) RollupGetRollupIndexCaps { return func(index string, o ...func(*RollupGetRollupIndexCapsRequest)) (*Response, error) { var r = RollupGetRollupIndexCapsRequest{Index: index} for _, f := range o { diff --git a/esapi/api.xpack.rollup.put_job.go b/esapi/api.xpack.rollup.put_job.go index 048d311ffd..34f3717414 100644 --- a/esapi/api.xpack.rollup.put_job.go +++ b/esapi/api.xpack.rollup.put_job.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newRollupPutJobFunc(t Transport) RollupPutJob { +// NewRollupPutJob creates a new API client for the RollupPutJob endpoint +// +func NewRollupPutJob(t Transport) RollupPutJob { return func(id string, body io.Reader, o ...func(*RollupPutJobRequest)) (*Response, error) { var r = RollupPutJobRequest{JobID: id, Body: body} for _, f := range o { diff --git a/esapi/api.xpack.rollup.rollup_search.go b/esapi/api.xpack.rollup.rollup_search.go index d1717a40e0..90c1776049 100644 --- a/esapi/api.xpack.rollup.rollup_search.go +++ b/esapi/api.xpack.rollup.rollup_search.go @@ -14,7 +14,9 @@ import ( "strings" ) -func newRollupRollupSearchFunc(t Transport) RollupRollupSearch { +// NewRollupRollupSearch creates a new API client for the RollupRollupSearch endpoint +// +func NewRollupRollupSearch(t Transport) RollupRollupSearch { return func(index []string, body io.Reader, o ...func(*RollupRollupSearchRequest)) (*Response, error) { var r = RollupRollupSearchRequest{Index: index, Body: body} for _, f := range o { diff --git a/esapi/api.xpack.rollup.start_job.go b/esapi/api.xpack.rollup.start_job.go index 4303c43f92..ec0cbbb602 100644 --- a/esapi/api.xpack.rollup.start_job.go +++ b/esapi/api.xpack.rollup.start_job.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newRollupStartJobFunc(t Transport) RollupStartJob { +// NewRollupStartJob creates a new API client for the RollupStartJob endpoint +// +func NewRollupStartJob(t Transport) RollupStartJob { return func(id string, o ...func(*RollupStartJobRequest)) (*Response, error) { var r = RollupStartJobRequest{JobID: id} for _, f := range o { diff --git a/esapi/api.xpack.rollup.stop_job.go b/esapi/api.xpack.rollup.stop_job.go index 67ac68d711..a6fac56441 100644 --- a/esapi/api.xpack.rollup.stop_job.go +++ b/esapi/api.xpack.rollup.stop_job.go @@ -14,7 +14,9 @@ import ( "time" ) -func newRollupStopJobFunc(t Transport) RollupStopJob { +// NewRollupStopJob creates a new API client for the RollupStopJob endpoint +// +func NewRollupStopJob(t Transport) RollupStopJob { return func(id string, o ...func(*RollupStopJobRequest)) (*Response, error) { var r = RollupStopJobRequest{JobID: id} for _, f := range o { diff --git a/esapi/api.xpack.searchable_snapshots.clear_cache.go b/esapi/api.xpack.searchable_snapshots.clear_cache.go index 0a891869d4..1e2c1322bc 100644 --- a/esapi/api.xpack.searchable_snapshots.clear_cache.go +++ b/esapi/api.xpack.searchable_snapshots.clear_cache.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newSearchableSnapshotsClearCacheFunc(t Transport) SearchableSnapshotsClearCache { +// NewSearchableSnapshotsClearCache creates a new API client for the SearchableSnapshotsClearCache endpoint +// +func NewSearchableSnapshotsClearCache(t Transport) SearchableSnapshotsClearCache { return func(o ...func(*SearchableSnapshotsClearCacheRequest)) (*Response, error) { var r = SearchableSnapshotsClearCacheRequest{} for _, f := range o { diff --git a/esapi/api.xpack.searchable_snapshots.mount.go b/esapi/api.xpack.searchable_snapshots.mount.go index f23ffffcd7..a57d565985 100644 --- a/esapi/api.xpack.searchable_snapshots.mount.go +++ b/esapi/api.xpack.searchable_snapshots.mount.go @@ -15,7 +15,9 @@ import ( "time" ) -func newSearchableSnapshotsMountFunc(t Transport) SearchableSnapshotsMount { +// NewSearchableSnapshotsMount creates a new API client for the SearchableSnapshotsMount endpoint +// +func NewSearchableSnapshotsMount(t Transport) SearchableSnapshotsMount { return func(repository string, snapshot string, body io.Reader, o ...func(*SearchableSnapshotsMountRequest)) (*Response, error) { var r = SearchableSnapshotsMountRequest{Repository: repository, Snapshot: snapshot, Body: body} for _, f := range o { diff --git a/esapi/api.xpack.searchable_snapshots.repository_stats.go b/esapi/api.xpack.searchable_snapshots.repository_stats.go index f69607c7a1..e588b5e00c 100644 --- a/esapi/api.xpack.searchable_snapshots.repository_stats.go +++ b/esapi/api.xpack.searchable_snapshots.repository_stats.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newSearchableSnapshotsRepositoryStatsFunc(t Transport) SearchableSnapshotsRepositoryStats { +// NewSearchableSnapshotsRepositoryStats creates a new API client for the SearchableSnapshotsRepositoryStats endpoint +// +func NewSearchableSnapshotsRepositoryStats(t Transport) SearchableSnapshotsRepositoryStats { return func(repository string, o ...func(*SearchableSnapshotsRepositoryStatsRequest)) (*Response, error) { var r = SearchableSnapshotsRepositoryStatsRequest{Repository: repository} for _, f := range o { diff --git a/esapi/api.xpack.searchable_snapshots.stats.go b/esapi/api.xpack.searchable_snapshots.stats.go index f0a1cb86ee..d2d8905139 100644 --- a/esapi/api.xpack.searchable_snapshots.stats.go +++ b/esapi/api.xpack.searchable_snapshots.stats.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newSearchableSnapshotsStatsFunc(t Transport) SearchableSnapshotsStats { +// NewSearchableSnapshotsStats creates a new API client for the SearchableSnapshotsStats endpoint +// +func NewSearchableSnapshotsStats(t Transport) SearchableSnapshotsStats { return func(o ...func(*SearchableSnapshotsStatsRequest)) (*Response, error) { var r = SearchableSnapshotsStatsRequest{} for _, f := range o { diff --git a/esapi/api.xpack.security.authenticate.go b/esapi/api.xpack.security.authenticate.go index 5436bbb4d7..09bbfa69c4 100644 --- a/esapi/api.xpack.security.authenticate.go +++ b/esapi/api.xpack.security.authenticate.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newSecurityAuthenticateFunc(t Transport) SecurityAuthenticate { +// NewSecurityAuthenticate creates a new API client for the SecurityAuthenticate endpoint +// +func NewSecurityAuthenticate(t Transport) SecurityAuthenticate { return func(o ...func(*SecurityAuthenticateRequest)) (*Response, error) { var r = SecurityAuthenticateRequest{} for _, f := range o { diff --git a/esapi/api.xpack.security.change_password.go b/esapi/api.xpack.security.change_password.go index 10c21686c8..de2b0edb0f 100644 --- a/esapi/api.xpack.security.change_password.go +++ b/esapi/api.xpack.security.change_password.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newSecurityChangePasswordFunc(t Transport) SecurityChangePassword { +// NewSecurityChangePassword creates a new API client for the SecurityChangePassword endpoint +// +func NewSecurityChangePassword(t Transport) SecurityChangePassword { return func(body io.Reader, o ...func(*SecurityChangePasswordRequest)) (*Response, error) { var r = SecurityChangePasswordRequest{Body: body} for _, f := range o { diff --git a/esapi/api.xpack.security.clear_cached_privileges.go b/esapi/api.xpack.security.clear_cached_privileges.go index 250d9616ef..891ae2300b 100644 --- a/esapi/api.xpack.security.clear_cached_privileges.go +++ b/esapi/api.xpack.security.clear_cached_privileges.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newSecurityClearCachedPrivilegesFunc(t Transport) SecurityClearCachedPrivileges { +// NewSecurityClearCachedPrivileges creates a new API client for the SecurityClearCachedPrivileges endpoint +// +func NewSecurityClearCachedPrivileges(t Transport) SecurityClearCachedPrivileges { return func(application []string, o ...func(*SecurityClearCachedPrivilegesRequest)) (*Response, error) { var r = SecurityClearCachedPrivilegesRequest{Application: application} for _, f := range o { diff --git a/esapi/api.xpack.security.clear_cached_realms.go b/esapi/api.xpack.security.clear_cached_realms.go index 9f57768b8c..a5350a08fd 100644 --- a/esapi/api.xpack.security.clear_cached_realms.go +++ b/esapi/api.xpack.security.clear_cached_realms.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newSecurityClearCachedRealmsFunc(t Transport) SecurityClearCachedRealms { +// NewSecurityClearCachedRealms creates a new API client for the SecurityClearCachedRealms endpoint +// +func NewSecurityClearCachedRealms(t Transport) SecurityClearCachedRealms { return func(realms []string, o ...func(*SecurityClearCachedRealmsRequest)) (*Response, error) { var r = SecurityClearCachedRealmsRequest{Realms: realms} for _, f := range o { diff --git a/esapi/api.xpack.security.clear_cached_roles.go b/esapi/api.xpack.security.clear_cached_roles.go index 14419eafa2..7c1f1a882e 100644 --- a/esapi/api.xpack.security.clear_cached_roles.go +++ b/esapi/api.xpack.security.clear_cached_roles.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newSecurityClearCachedRolesFunc(t Transport) SecurityClearCachedRoles { +// NewSecurityClearCachedRoles creates a new API client for the SecurityClearCachedRoles endpoint +// +func NewSecurityClearCachedRoles(t Transport) SecurityClearCachedRoles { return func(name []string, o ...func(*SecurityClearCachedRolesRequest)) (*Response, error) { var r = SecurityClearCachedRolesRequest{Name: name} for _, f := range o { diff --git a/esapi/api.xpack.security.create_api_key.go b/esapi/api.xpack.security.create_api_key.go index d5d89c9ac3..1121597d50 100644 --- a/esapi/api.xpack.security.create_api_key.go +++ b/esapi/api.xpack.security.create_api_key.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newSecurityCreateAPIKeyFunc(t Transport) SecurityCreateAPIKey { +// NewSecurityCreateAPIKey creates a new API client for the SecurityCreateAPIKey endpoint +// +func NewSecurityCreateAPIKey(t Transport) SecurityCreateAPIKey { return func(body io.Reader, o ...func(*SecurityCreateAPIKeyRequest)) (*Response, error) { var r = SecurityCreateAPIKeyRequest{Body: body} for _, f := range o { diff --git a/esapi/api.xpack.security.delete_privileges.go b/esapi/api.xpack.security.delete_privileges.go index 0906335e88..2b5de3570e 100644 --- a/esapi/api.xpack.security.delete_privileges.go +++ b/esapi/api.xpack.security.delete_privileges.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newSecurityDeletePrivilegesFunc(t Transport) SecurityDeletePrivileges { +// NewSecurityDeletePrivileges creates a new API client for the SecurityDeletePrivileges endpoint +// +func NewSecurityDeletePrivileges(t Transport) SecurityDeletePrivileges { return func(name string, application string, o ...func(*SecurityDeletePrivilegesRequest)) (*Response, error) { var r = SecurityDeletePrivilegesRequest{Name: name, Application: application} for _, f := range o { diff --git a/esapi/api.xpack.security.delete_role.go b/esapi/api.xpack.security.delete_role.go index 982fceda1a..c680d9c9e8 100644 --- a/esapi/api.xpack.security.delete_role.go +++ b/esapi/api.xpack.security.delete_role.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newSecurityDeleteRoleFunc(t Transport) SecurityDeleteRole { +// NewSecurityDeleteRole creates a new API client for the SecurityDeleteRole endpoint +// +func NewSecurityDeleteRole(t Transport) SecurityDeleteRole { return func(name string, o ...func(*SecurityDeleteRoleRequest)) (*Response, error) { var r = SecurityDeleteRoleRequest{Name: name} for _, f := range o { diff --git a/esapi/api.xpack.security.delete_role_mapping.go b/esapi/api.xpack.security.delete_role_mapping.go index 73be2a7340..ad3b939199 100644 --- a/esapi/api.xpack.security.delete_role_mapping.go +++ b/esapi/api.xpack.security.delete_role_mapping.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newSecurityDeleteRoleMappingFunc(t Transport) SecurityDeleteRoleMapping { +// NewSecurityDeleteRoleMapping creates a new API client for the SecurityDeleteRoleMapping endpoint +// +func NewSecurityDeleteRoleMapping(t Transport) SecurityDeleteRoleMapping { return func(name string, o ...func(*SecurityDeleteRoleMappingRequest)) (*Response, error) { var r = SecurityDeleteRoleMappingRequest{Name: name} for _, f := range o { diff --git a/esapi/api.xpack.security.delete_user.go b/esapi/api.xpack.security.delete_user.go index 62c38bc1fa..09a68a0ec7 100644 --- a/esapi/api.xpack.security.delete_user.go +++ b/esapi/api.xpack.security.delete_user.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newSecurityDeleteUserFunc(t Transport) SecurityDeleteUser { +// NewSecurityDeleteUser creates a new API client for the SecurityDeleteUser endpoint +// +func NewSecurityDeleteUser(t Transport) SecurityDeleteUser { return func(username string, o ...func(*SecurityDeleteUserRequest)) (*Response, error) { var r = SecurityDeleteUserRequest{Username: username} for _, f := range o { diff --git a/esapi/api.xpack.security.disable_user.go b/esapi/api.xpack.security.disable_user.go index b4bf047f47..1b9c0b310e 100644 --- a/esapi/api.xpack.security.disable_user.go +++ b/esapi/api.xpack.security.disable_user.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newSecurityDisableUserFunc(t Transport) SecurityDisableUser { +// NewSecurityDisableUser creates a new API client for the SecurityDisableUser endpoint +// +func NewSecurityDisableUser(t Transport) SecurityDisableUser { return func(username string, o ...func(*SecurityDisableUserRequest)) (*Response, error) { var r = SecurityDisableUserRequest{Username: username} for _, f := range o { diff --git a/esapi/api.xpack.security.enable_user.go b/esapi/api.xpack.security.enable_user.go index 8f18086d96..e94e9a7eb8 100644 --- a/esapi/api.xpack.security.enable_user.go +++ b/esapi/api.xpack.security.enable_user.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newSecurityEnableUserFunc(t Transport) SecurityEnableUser { +// NewSecurityEnableUser creates a new API client for the SecurityEnableUser endpoint +// +func NewSecurityEnableUser(t Transport) SecurityEnableUser { return func(username string, o ...func(*SecurityEnableUserRequest)) (*Response, error) { var r = SecurityEnableUserRequest{Username: username} for _, f := range o { diff --git a/esapi/api.xpack.security.get_api_key.go b/esapi/api.xpack.security.get_api_key.go index 944b38abeb..0c5dc3db9b 100644 --- a/esapi/api.xpack.security.get_api_key.go +++ b/esapi/api.xpack.security.get_api_key.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newSecurityGetAPIKeyFunc(t Transport) SecurityGetAPIKey { +// NewSecurityGetAPIKey creates a new API client for the SecurityGetAPIKey endpoint +// +func NewSecurityGetAPIKey(t Transport) SecurityGetAPIKey { return func(o ...func(*SecurityGetAPIKeyRequest)) (*Response, error) { var r = SecurityGetAPIKeyRequest{} for _, f := range o { diff --git a/esapi/api.xpack.security.get_builtin_privileges.go b/esapi/api.xpack.security.get_builtin_privileges.go index b40a77764e..511f5fcc18 100644 --- a/esapi/api.xpack.security.get_builtin_privileges.go +++ b/esapi/api.xpack.security.get_builtin_privileges.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newSecurityGetBuiltinPrivilegesFunc(t Transport) SecurityGetBuiltinPrivileges { +// NewSecurityGetBuiltinPrivileges creates a new API client for the SecurityGetBuiltinPrivileges endpoint +// +func NewSecurityGetBuiltinPrivileges(t Transport) SecurityGetBuiltinPrivileges { return func(o ...func(*SecurityGetBuiltinPrivilegesRequest)) (*Response, error) { var r = SecurityGetBuiltinPrivilegesRequest{} for _, f := range o { diff --git a/esapi/api.xpack.security.get_privileges.go b/esapi/api.xpack.security.get_privileges.go index 1e222789d8..b94662e0e2 100644 --- a/esapi/api.xpack.security.get_privileges.go +++ b/esapi/api.xpack.security.get_privileges.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newSecurityGetPrivilegesFunc(t Transport) SecurityGetPrivileges { +// NewSecurityGetPrivileges creates a new API client for the SecurityGetPrivileges endpoint +// +func NewSecurityGetPrivileges(t Transport) SecurityGetPrivileges { return func(o ...func(*SecurityGetPrivilegesRequest)) (*Response, error) { var r = SecurityGetPrivilegesRequest{} for _, f := range o { diff --git a/esapi/api.xpack.security.get_role.go b/esapi/api.xpack.security.get_role.go index ff8a8438e5..4cccf0dfb9 100644 --- a/esapi/api.xpack.security.get_role.go +++ b/esapi/api.xpack.security.get_role.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newSecurityGetRoleFunc(t Transport) SecurityGetRole { +// NewSecurityGetRole creates a new API client for the SecurityGetRole endpoint +// +func NewSecurityGetRole(t Transport) SecurityGetRole { return func(o ...func(*SecurityGetRoleRequest)) (*Response, error) { var r = SecurityGetRoleRequest{} for _, f := range o { diff --git a/esapi/api.xpack.security.get_role_mapping.go b/esapi/api.xpack.security.get_role_mapping.go index 014c2ff93f..95ff8b5163 100644 --- a/esapi/api.xpack.security.get_role_mapping.go +++ b/esapi/api.xpack.security.get_role_mapping.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newSecurityGetRoleMappingFunc(t Transport) SecurityGetRoleMapping { +// NewSecurityGetRoleMapping creates a new API client for the SecurityGetRoleMapping endpoint +// +func NewSecurityGetRoleMapping(t Transport) SecurityGetRoleMapping { return func(o ...func(*SecurityGetRoleMappingRequest)) (*Response, error) { var r = SecurityGetRoleMappingRequest{} for _, f := range o { diff --git a/esapi/api.xpack.security.get_token.go b/esapi/api.xpack.security.get_token.go index 80ba6a684d..fb1b5391be 100644 --- a/esapi/api.xpack.security.get_token.go +++ b/esapi/api.xpack.security.get_token.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newSecurityGetTokenFunc(t Transport) SecurityGetToken { +// NewSecurityGetToken creates a new API client for the SecurityGetToken endpoint +// +func NewSecurityGetToken(t Transport) SecurityGetToken { return func(body io.Reader, o ...func(*SecurityGetTokenRequest)) (*Response, error) { var r = SecurityGetTokenRequest{Body: body} for _, f := range o { diff --git a/esapi/api.xpack.security.get_user.go b/esapi/api.xpack.security.get_user.go index 9c4067163e..65e82c5b07 100644 --- a/esapi/api.xpack.security.get_user.go +++ b/esapi/api.xpack.security.get_user.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newSecurityGetUserFunc(t Transport) SecurityGetUser { +// NewSecurityGetUser creates a new API client for the SecurityGetUser endpoint +// +func NewSecurityGetUser(t Transport) SecurityGetUser { return func(o ...func(*SecurityGetUserRequest)) (*Response, error) { var r = SecurityGetUserRequest{} for _, f := range o { diff --git a/esapi/api.xpack.security.get_user_privileges.go b/esapi/api.xpack.security.get_user_privileges.go index 1fa8fb0814..3c3346c69b 100644 --- a/esapi/api.xpack.security.get_user_privileges.go +++ b/esapi/api.xpack.security.get_user_privileges.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newSecurityGetUserPrivilegesFunc(t Transport) SecurityGetUserPrivileges { +// NewSecurityGetUserPrivileges creates a new API client for the SecurityGetUserPrivileges endpoint +// +func NewSecurityGetUserPrivileges(t Transport) SecurityGetUserPrivileges { return func(o ...func(*SecurityGetUserPrivilegesRequest)) (*Response, error) { var r = SecurityGetUserPrivilegesRequest{} for _, f := range o { diff --git a/esapi/api.xpack.security.has_privileges.go b/esapi/api.xpack.security.has_privileges.go index 7b667d7b42..addaa885fe 100644 --- a/esapi/api.xpack.security.has_privileges.go +++ b/esapi/api.xpack.security.has_privileges.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newSecurityHasPrivilegesFunc(t Transport) SecurityHasPrivileges { +// NewSecurityHasPrivileges creates a new API client for the SecurityHasPrivileges endpoint +// +func NewSecurityHasPrivileges(t Transport) SecurityHasPrivileges { return func(body io.Reader, o ...func(*SecurityHasPrivilegesRequest)) (*Response, error) { var r = SecurityHasPrivilegesRequest{Body: body} for _, f := range o { diff --git a/esapi/api.xpack.security.invalidate_api_key.go b/esapi/api.xpack.security.invalidate_api_key.go index 20c0d8a78f..45478e2b92 100644 --- a/esapi/api.xpack.security.invalidate_api_key.go +++ b/esapi/api.xpack.security.invalidate_api_key.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newSecurityInvalidateAPIKeyFunc(t Transport) SecurityInvalidateAPIKey { +// NewSecurityInvalidateAPIKey creates a new API client for the SecurityInvalidateAPIKey endpoint +// +func NewSecurityInvalidateAPIKey(t Transport) SecurityInvalidateAPIKey { return func(body io.Reader, o ...func(*SecurityInvalidateAPIKeyRequest)) (*Response, error) { var r = SecurityInvalidateAPIKeyRequest{Body: body} for _, f := range o { diff --git a/esapi/api.xpack.security.invalidate_token.go b/esapi/api.xpack.security.invalidate_token.go index 0cb72c1b1a..acf2ae68c6 100644 --- a/esapi/api.xpack.security.invalidate_token.go +++ b/esapi/api.xpack.security.invalidate_token.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newSecurityInvalidateTokenFunc(t Transport) SecurityInvalidateToken { +// NewSecurityInvalidateToken creates a new API client for the SecurityInvalidateToken endpoint +// +func NewSecurityInvalidateToken(t Transport) SecurityInvalidateToken { return func(body io.Reader, o ...func(*SecurityInvalidateTokenRequest)) (*Response, error) { var r = SecurityInvalidateTokenRequest{Body: body} for _, f := range o { diff --git a/esapi/api.xpack.security.put_privileges.go b/esapi/api.xpack.security.put_privileges.go index e643799b3a..bdca25c60c 100644 --- a/esapi/api.xpack.security.put_privileges.go +++ b/esapi/api.xpack.security.put_privileges.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newSecurityPutPrivilegesFunc(t Transport) SecurityPutPrivileges { +// NewSecurityPutPrivileges creates a new API client for the SecurityPutPrivileges endpoint +// +func NewSecurityPutPrivileges(t Transport) SecurityPutPrivileges { return func(body io.Reader, o ...func(*SecurityPutPrivilegesRequest)) (*Response, error) { var r = SecurityPutPrivilegesRequest{Body: body} for _, f := range o { diff --git a/esapi/api.xpack.security.put_role.go b/esapi/api.xpack.security.put_role.go index 6c0c6c74af..e67ff3b473 100644 --- a/esapi/api.xpack.security.put_role.go +++ b/esapi/api.xpack.security.put_role.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newSecurityPutRoleFunc(t Transport) SecurityPutRole { +// NewSecurityPutRole creates a new API client for the SecurityPutRole endpoint +// +func NewSecurityPutRole(t Transport) SecurityPutRole { return func(name string, body io.Reader, o ...func(*SecurityPutRoleRequest)) (*Response, error) { var r = SecurityPutRoleRequest{Name: name, Body: body} for _, f := range o { diff --git a/esapi/api.xpack.security.put_role_mapping.go b/esapi/api.xpack.security.put_role_mapping.go index ff171309b0..c2a10fe2b4 100644 --- a/esapi/api.xpack.security.put_role_mapping.go +++ b/esapi/api.xpack.security.put_role_mapping.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newSecurityPutRoleMappingFunc(t Transport) SecurityPutRoleMapping { +// NewSecurityPutRoleMapping creates a new API client for the SecurityPutRoleMapping endpoint +// +func NewSecurityPutRoleMapping(t Transport) SecurityPutRoleMapping { return func(name string, body io.Reader, o ...func(*SecurityPutRoleMappingRequest)) (*Response, error) { var r = SecurityPutRoleMappingRequest{Name: name, Body: body} for _, f := range o { diff --git a/esapi/api.xpack.security.put_user.go b/esapi/api.xpack.security.put_user.go index 80646e4a1e..4ad1b2dac2 100644 --- a/esapi/api.xpack.security.put_user.go +++ b/esapi/api.xpack.security.put_user.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newSecurityPutUserFunc(t Transport) SecurityPutUser { +// NewSecurityPutUser creates a new API client for the SecurityPutUser endpoint +// +func NewSecurityPutUser(t Transport) SecurityPutUser { return func(username string, body io.Reader, o ...func(*SecurityPutUserRequest)) (*Response, error) { var r = SecurityPutUserRequest{Username: username, Body: body} for _, f := range o { diff --git a/esapi/api.xpack.slm.delete_lifecycle.go b/esapi/api.xpack.slm.delete_lifecycle.go index 8040442ad5..360bd4d3e0 100644 --- a/esapi/api.xpack.slm.delete_lifecycle.go +++ b/esapi/api.xpack.slm.delete_lifecycle.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newSlmDeleteLifecycleFunc(t Transport) SlmDeleteLifecycle { +// NewSlmDeleteLifecycle creates a new API client for the SlmDeleteLifecycle endpoint +// +func NewSlmDeleteLifecycle(t Transport) SlmDeleteLifecycle { return func(policy_id string, o ...func(*SlmDeleteLifecycleRequest)) (*Response, error) { var r = SlmDeleteLifecycleRequest{PolicyID: policy_id} for _, f := range o { diff --git a/esapi/api.xpack.slm.execute_lifecycle.go b/esapi/api.xpack.slm.execute_lifecycle.go index 69f77f30c5..d9e86c675b 100644 --- a/esapi/api.xpack.slm.execute_lifecycle.go +++ b/esapi/api.xpack.slm.execute_lifecycle.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newSlmExecuteLifecycleFunc(t Transport) SlmExecuteLifecycle { +// NewSlmExecuteLifecycle creates a new API client for the SlmExecuteLifecycle endpoint +// +func NewSlmExecuteLifecycle(t Transport) SlmExecuteLifecycle { return func(policy_id string, o ...func(*SlmExecuteLifecycleRequest)) (*Response, error) { var r = SlmExecuteLifecycleRequest{PolicyID: policy_id} for _, f := range o { diff --git a/esapi/api.xpack.slm.execute_retention.go b/esapi/api.xpack.slm.execute_retention.go index 7344932859..0d6be56491 100644 --- a/esapi/api.xpack.slm.execute_retention.go +++ b/esapi/api.xpack.slm.execute_retention.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newSlmExecuteRetentionFunc(t Transport) SlmExecuteRetention { +// NewSlmExecuteRetention creates a new API client for the SlmExecuteRetention endpoint +// +func NewSlmExecuteRetention(t Transport) SlmExecuteRetention { return func(o ...func(*SlmExecuteRetentionRequest)) (*Response, error) { var r = SlmExecuteRetentionRequest{} for _, f := range o { diff --git a/esapi/api.xpack.slm.get_lifecycle.go b/esapi/api.xpack.slm.get_lifecycle.go index a4194ced8d..83a5f007ec 100644 --- a/esapi/api.xpack.slm.get_lifecycle.go +++ b/esapi/api.xpack.slm.get_lifecycle.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newSlmGetLifecycleFunc(t Transport) SlmGetLifecycle { +// NewSlmGetLifecycle creates a new API client for the SlmGetLifecycle endpoint +// +func NewSlmGetLifecycle(t Transport) SlmGetLifecycle { return func(o ...func(*SlmGetLifecycleRequest)) (*Response, error) { var r = SlmGetLifecycleRequest{} for _, f := range o { diff --git a/esapi/api.xpack.slm.get_stats.go b/esapi/api.xpack.slm.get_stats.go index 0f36ab5c60..674fc6e1aa 100644 --- a/esapi/api.xpack.slm.get_stats.go +++ b/esapi/api.xpack.slm.get_stats.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newSlmGetStatsFunc(t Transport) SlmGetStats { +// NewSlmGetStats creates a new API client for the SlmGetStats endpoint +// +func NewSlmGetStats(t Transport) SlmGetStats { return func(o ...func(*SlmGetStatsRequest)) (*Response, error) { var r = SlmGetStatsRequest{} for _, f := range o { diff --git a/esapi/api.xpack.slm.get_status.go b/esapi/api.xpack.slm.get_status.go index a48b84a336..0051a128c0 100644 --- a/esapi/api.xpack.slm.get_status.go +++ b/esapi/api.xpack.slm.get_status.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newSlmGetStatusFunc(t Transport) SlmGetStatus { +// NewSlmGetStatus creates a new API client for the SlmGetStatus endpoint +// +func NewSlmGetStatus(t Transport) SlmGetStatus { return func(o ...func(*SlmGetStatusRequest)) (*Response, error) { var r = SlmGetStatusRequest{} for _, f := range o { diff --git a/esapi/api.xpack.slm.put_lifecycle.go b/esapi/api.xpack.slm.put_lifecycle.go index 3348a41dfb..887fcc9552 100644 --- a/esapi/api.xpack.slm.put_lifecycle.go +++ b/esapi/api.xpack.slm.put_lifecycle.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newSlmPutLifecycleFunc(t Transport) SlmPutLifecycle { +// NewSlmPutLifecycle creates a new API client for the SlmPutLifecycle endpoint +// +func NewSlmPutLifecycle(t Transport) SlmPutLifecycle { return func(policy_id string, o ...func(*SlmPutLifecycleRequest)) (*Response, error) { var r = SlmPutLifecycleRequest{PolicyID: policy_id} for _, f := range o { diff --git a/esapi/api.xpack.slm.start.go b/esapi/api.xpack.slm.start.go index 446909e0ec..a5cf59014d 100644 --- a/esapi/api.xpack.slm.start.go +++ b/esapi/api.xpack.slm.start.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newSlmStartFunc(t Transport) SlmStart { +// NewSlmStart creates a new API client for the SlmStart endpoint +// +func NewSlmStart(t Transport) SlmStart { return func(o ...func(*SlmStartRequest)) (*Response, error) { var r = SlmStartRequest{} for _, f := range o { diff --git a/esapi/api.xpack.slm.stop.go b/esapi/api.xpack.slm.stop.go index 48f9bac79f..897ef454cf 100644 --- a/esapi/api.xpack.slm.stop.go +++ b/esapi/api.xpack.slm.stop.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newSlmStopFunc(t Transport) SlmStop { +// NewSlmStop creates a new API client for the SlmStop endpoint +// +func NewSlmStop(t Transport) SlmStop { return func(o ...func(*SlmStopRequest)) (*Response, error) { var r = SlmStopRequest{} for _, f := range o { diff --git a/esapi/api.xpack.sql.clear_cursor.go b/esapi/api.xpack.sql.clear_cursor.go index bd6443bdc6..cdc2fa062a 100644 --- a/esapi/api.xpack.sql.clear_cursor.go +++ b/esapi/api.xpack.sql.clear_cursor.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newSQLClearCursorFunc(t Transport) SQLClearCursor { +// NewSQLClearCursor creates a new API client for the SQLClearCursor endpoint +// +func NewSQLClearCursor(t Transport) SQLClearCursor { return func(body io.Reader, o ...func(*SQLClearCursorRequest)) (*Response, error) { var r = SQLClearCursorRequest{Body: body} for _, f := range o { diff --git a/esapi/api.xpack.sql.query.go b/esapi/api.xpack.sql.query.go index eb4bf50f8a..0abf6168fa 100644 --- a/esapi/api.xpack.sql.query.go +++ b/esapi/api.xpack.sql.query.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newSQLQueryFunc(t Transport) SQLQuery { +// NewSQLQuery creates a new API client for the SQLQuery endpoint +// +func NewSQLQuery(t Transport) SQLQuery { return func(body io.Reader, o ...func(*SQLQueryRequest)) (*Response, error) { var r = SQLQueryRequest{Body: body} for _, f := range o { diff --git a/esapi/api.xpack.sql.translate.go b/esapi/api.xpack.sql.translate.go index f4e07fcde0..504bfb7538 100644 --- a/esapi/api.xpack.sql.translate.go +++ b/esapi/api.xpack.sql.translate.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newSQLTranslateFunc(t Transport) SQLTranslate { +// NewSQLTranslate creates a new API client for the SQLTranslate endpoint +// +func NewSQLTranslate(t Transport) SQLTranslate { return func(body io.Reader, o ...func(*SQLTranslateRequest)) (*Response, error) { var r = SQLTranslateRequest{Body: body} for _, f := range o { diff --git a/esapi/api.xpack.ssl.certificates.go b/esapi/api.xpack.ssl.certificates.go index 22f4331676..1b1706cd52 100644 --- a/esapi/api.xpack.ssl.certificates.go +++ b/esapi/api.xpack.ssl.certificates.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newSSLCertificatesFunc(t Transport) SSLCertificates { +// NewSSLCertificates creates a new API client for the SSLCertificates endpoint +// +func NewSSLCertificates(t Transport) SSLCertificates { return func(o ...func(*SSLCertificatesRequest)) (*Response, error) { var r = SSLCertificatesRequest{} for _, f := range o { diff --git a/esapi/api.xpack.transform.delete_transform.go b/esapi/api.xpack.transform.delete_transform.go index 7237947cde..61b14572a2 100644 --- a/esapi/api.xpack.transform.delete_transform.go +++ b/esapi/api.xpack.transform.delete_transform.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newTransformDeleteTransformFunc(t Transport) TransformDeleteTransform { +// NewTransformDeleteTransform creates a new API client for the TransformDeleteTransform endpoint +// +func NewTransformDeleteTransform(t Transport) TransformDeleteTransform { return func(transform_id string, o ...func(*TransformDeleteTransformRequest)) (*Response, error) { var r = TransformDeleteTransformRequest{TransformID: transform_id} for _, f := range o { diff --git a/esapi/api.xpack.transform.get_transform.go b/esapi/api.xpack.transform.get_transform.go index 481ba70237..815d2f6f3c 100644 --- a/esapi/api.xpack.transform.get_transform.go +++ b/esapi/api.xpack.transform.get_transform.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newTransformGetTransformFunc(t Transport) TransformGetTransform { +// NewTransformGetTransform creates a new API client for the TransformGetTransform endpoint +// +func NewTransformGetTransform(t Transport) TransformGetTransform { return func(o ...func(*TransformGetTransformRequest)) (*Response, error) { var r = TransformGetTransformRequest{} for _, f := range o { diff --git a/esapi/api.xpack.transform.get_transform_stats.go b/esapi/api.xpack.transform.get_transform_stats.go index 69f61e4271..6467abf885 100644 --- a/esapi/api.xpack.transform.get_transform_stats.go +++ b/esapi/api.xpack.transform.get_transform_stats.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newTransformGetTransformStatsFunc(t Transport) TransformGetTransformStats { +// NewTransformGetTransformStats creates a new API client for the TransformGetTransformStats endpoint +// +func NewTransformGetTransformStats(t Transport) TransformGetTransformStats { return func(transform_id string, o ...func(*TransformGetTransformStatsRequest)) (*Response, error) { var r = TransformGetTransformStatsRequest{TransformID: transform_id} for _, f := range o { diff --git a/esapi/api.xpack.transform.preview_transform.go b/esapi/api.xpack.transform.preview_transform.go index 703ada944b..034c1dc691 100644 --- a/esapi/api.xpack.transform.preview_transform.go +++ b/esapi/api.xpack.transform.preview_transform.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newTransformPreviewTransformFunc(t Transport) TransformPreviewTransform { +// NewTransformPreviewTransform creates a new API client for the TransformPreviewTransform endpoint +// +func NewTransformPreviewTransform(t Transport) TransformPreviewTransform { return func(body io.Reader, o ...func(*TransformPreviewTransformRequest)) (*Response, error) { var r = TransformPreviewTransformRequest{Body: body} for _, f := range o { diff --git a/esapi/api.xpack.transform.put_transform.go b/esapi/api.xpack.transform.put_transform.go index ef0e16d298..7a3a257076 100644 --- a/esapi/api.xpack.transform.put_transform.go +++ b/esapi/api.xpack.transform.put_transform.go @@ -14,7 +14,9 @@ import ( "strings" ) -func newTransformPutTransformFunc(t Transport) TransformPutTransform { +// NewTransformPutTransform creates a new API client for the TransformPutTransform endpoint +// +func NewTransformPutTransform(t Transport) TransformPutTransform { return func(body io.Reader, transform_id string, o ...func(*TransformPutTransformRequest)) (*Response, error) { var r = TransformPutTransformRequest{Body: body, TransformID: transform_id} for _, f := range o { diff --git a/esapi/api.xpack.transform.start_transform.go b/esapi/api.xpack.transform.start_transform.go index e10afee49c..96cc806163 100644 --- a/esapi/api.xpack.transform.start_transform.go +++ b/esapi/api.xpack.transform.start_transform.go @@ -13,7 +13,9 @@ import ( "time" ) -func newTransformStartTransformFunc(t Transport) TransformStartTransform { +// NewTransformStartTransform creates a new API client for the TransformStartTransform endpoint +// +func NewTransformStartTransform(t Transport) TransformStartTransform { return func(transform_id string, o ...func(*TransformStartTransformRequest)) (*Response, error) { var r = TransformStartTransformRequest{TransformID: transform_id} for _, f := range o { diff --git a/esapi/api.xpack.transform.stop_transform.go b/esapi/api.xpack.transform.stop_transform.go index a7257e9d71..05e7de14d7 100644 --- a/esapi/api.xpack.transform.stop_transform.go +++ b/esapi/api.xpack.transform.stop_transform.go @@ -14,7 +14,9 @@ import ( "time" ) -func newTransformStopTransformFunc(t Transport) TransformStopTransform { +// NewTransformStopTransform creates a new API client for the TransformStopTransform endpoint +// +func NewTransformStopTransform(t Transport) TransformStopTransform { return func(transform_id string, o ...func(*TransformStopTransformRequest)) (*Response, error) { var r = TransformStopTransformRequest{TransformID: transform_id} for _, f := range o { diff --git a/esapi/api.xpack.transform.update_transform.go b/esapi/api.xpack.transform.update_transform.go index 7b8fe2b6bd..cfd0798c0e 100644 --- a/esapi/api.xpack.transform.update_transform.go +++ b/esapi/api.xpack.transform.update_transform.go @@ -14,7 +14,9 @@ import ( "strings" ) -func newTransformUpdateTransformFunc(t Transport) TransformUpdateTransform { +// NewTransformUpdateTransform creates a new API client for the TransformUpdateTransform endpoint +// +func NewTransformUpdateTransform(t Transport) TransformUpdateTransform { return func(body io.Reader, transform_id string, o ...func(*TransformUpdateTransformRequest)) (*Response, error) { var r = TransformUpdateTransformRequest{Body: body, TransformID: transform_id} for _, f := range o { diff --git a/esapi/api.xpack.watcher.ack_watch.go b/esapi/api.xpack.watcher.ack_watch.go index a5c279ebd1..7eaaa8138e 100644 --- a/esapi/api.xpack.watcher.ack_watch.go +++ b/esapi/api.xpack.watcher.ack_watch.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newWatcherAckWatchFunc(t Transport) WatcherAckWatch { +// NewWatcherAckWatch creates a new API client for the WatcherAckWatch endpoint +// +func NewWatcherAckWatch(t Transport) WatcherAckWatch { return func(watch_id string, o ...func(*WatcherAckWatchRequest)) (*Response, error) { var r = WatcherAckWatchRequest{WatchID: watch_id} for _, f := range o { diff --git a/esapi/api.xpack.watcher.activate_watch.go b/esapi/api.xpack.watcher.activate_watch.go index 76ac664e56..d2e6826528 100644 --- a/esapi/api.xpack.watcher.activate_watch.go +++ b/esapi/api.xpack.watcher.activate_watch.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newWatcherActivateWatchFunc(t Transport) WatcherActivateWatch { +// NewWatcherActivateWatch creates a new API client for the WatcherActivateWatch endpoint +// +func NewWatcherActivateWatch(t Transport) WatcherActivateWatch { return func(watch_id string, o ...func(*WatcherActivateWatchRequest)) (*Response, error) { var r = WatcherActivateWatchRequest{WatchID: watch_id} for _, f := range o { diff --git a/esapi/api.xpack.watcher.deactivate_watch.go b/esapi/api.xpack.watcher.deactivate_watch.go index 45f6d5cadc..4ae66c5350 100644 --- a/esapi/api.xpack.watcher.deactivate_watch.go +++ b/esapi/api.xpack.watcher.deactivate_watch.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newWatcherDeactivateWatchFunc(t Transport) WatcherDeactivateWatch { +// NewWatcherDeactivateWatch creates a new API client for the WatcherDeactivateWatch endpoint +// +func NewWatcherDeactivateWatch(t Transport) WatcherDeactivateWatch { return func(watch_id string, o ...func(*WatcherDeactivateWatchRequest)) (*Response, error) { var r = WatcherDeactivateWatchRequest{WatchID: watch_id} for _, f := range o { diff --git a/esapi/api.xpack.watcher.delete_watch.go b/esapi/api.xpack.watcher.delete_watch.go index 0ca59421c7..9cef50c52a 100644 --- a/esapi/api.xpack.watcher.delete_watch.go +++ b/esapi/api.xpack.watcher.delete_watch.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newWatcherDeleteWatchFunc(t Transport) WatcherDeleteWatch { +// NewWatcherDeleteWatch creates a new API client for the WatcherDeleteWatch endpoint +// +func NewWatcherDeleteWatch(t Transport) WatcherDeleteWatch { return func(id string, o ...func(*WatcherDeleteWatchRequest)) (*Response, error) { var r = WatcherDeleteWatchRequest{WatchID: id} for _, f := range o { diff --git a/esapi/api.xpack.watcher.execute_watch.go b/esapi/api.xpack.watcher.execute_watch.go index 34c53b3549..de8f1fe690 100644 --- a/esapi/api.xpack.watcher.execute_watch.go +++ b/esapi/api.xpack.watcher.execute_watch.go @@ -14,7 +14,9 @@ import ( "strings" ) -func newWatcherExecuteWatchFunc(t Transport) WatcherExecuteWatch { +// NewWatcherExecuteWatch creates a new API client for the WatcherExecuteWatch endpoint +// +func NewWatcherExecuteWatch(t Transport) WatcherExecuteWatch { return func(o ...func(*WatcherExecuteWatchRequest)) (*Response, error) { var r = WatcherExecuteWatchRequest{} for _, f := range o { diff --git a/esapi/api.xpack.watcher.get_watch.go b/esapi/api.xpack.watcher.get_watch.go index feb9a8305c..5574715ef9 100644 --- a/esapi/api.xpack.watcher.get_watch.go +++ b/esapi/api.xpack.watcher.get_watch.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newWatcherGetWatchFunc(t Transport) WatcherGetWatch { +// NewWatcherGetWatch creates a new API client for the WatcherGetWatch endpoint +// +func NewWatcherGetWatch(t Transport) WatcherGetWatch { return func(id string, o ...func(*WatcherGetWatchRequest)) (*Response, error) { var r = WatcherGetWatchRequest{WatchID: id} for _, f := range o { diff --git a/esapi/api.xpack.watcher.put_watch.go b/esapi/api.xpack.watcher.put_watch.go index b2f2ca666e..51c97218f8 100644 --- a/esapi/api.xpack.watcher.put_watch.go +++ b/esapi/api.xpack.watcher.put_watch.go @@ -14,7 +14,9 @@ import ( "strings" ) -func newWatcherPutWatchFunc(t Transport) WatcherPutWatch { +// NewWatcherPutWatch creates a new API client for the WatcherPutWatch endpoint +// +func NewWatcherPutWatch(t Transport) WatcherPutWatch { return func(id string, o ...func(*WatcherPutWatchRequest)) (*Response, error) { var r = WatcherPutWatchRequest{WatchID: id} for _, f := range o { diff --git a/esapi/api.xpack.watcher.start.go b/esapi/api.xpack.watcher.start.go index 3465df47c8..f69f76660f 100644 --- a/esapi/api.xpack.watcher.start.go +++ b/esapi/api.xpack.watcher.start.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newWatcherStartFunc(t Transport) WatcherStart { +// NewWatcherStart creates a new API client for the WatcherStart endpoint +// +func NewWatcherStart(t Transport) WatcherStart { return func(o ...func(*WatcherStartRequest)) (*Response, error) { var r = WatcherStartRequest{} for _, f := range o { diff --git a/esapi/api.xpack.watcher.stats.go b/esapi/api.xpack.watcher.stats.go index fb1304ccc3..78915ab15d 100644 --- a/esapi/api.xpack.watcher.stats.go +++ b/esapi/api.xpack.watcher.stats.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newWatcherStatsFunc(t Transport) WatcherStats { +// NewWatcherStats creates a new API client for the WatcherStats endpoint +// +func NewWatcherStats(t Transport) WatcherStats { return func(o ...func(*WatcherStatsRequest)) (*Response, error) { var r = WatcherStatsRequest{} for _, f := range o { diff --git a/esapi/api.xpack.watcher.stop.go b/esapi/api.xpack.watcher.stop.go index fb040fb53c..75468ec18b 100644 --- a/esapi/api.xpack.watcher.stop.go +++ b/esapi/api.xpack.watcher.stop.go @@ -12,7 +12,9 @@ import ( "strings" ) -func newWatcherStopFunc(t Transport) WatcherStop { +// NewWatcherStop creates a new API client for the WatcherStop endpoint +// +func NewWatcherStop(t Transport) WatcherStop { return func(o ...func(*WatcherStopRequest)) (*Response, error) { var r = WatcherStopRequest{} for _, f := range o { diff --git a/esapi/api.xpack.xpack.info.go b/esapi/api.xpack.xpack.info.go index f3466f5aa3..add4a885ae 100644 --- a/esapi/api.xpack.xpack.info.go +++ b/esapi/api.xpack.xpack.info.go @@ -13,7 +13,9 @@ import ( "strings" ) -func newXPackInfoFunc(t Transport) XPackInfo { +// NewXPackInfo creates a new API client for the XPackInfo endpoint +// +func NewXPackInfo(t Transport) XPackInfo { return func(o ...func(*XPackInfoRequest)) (*Response, error) { var r = XPackInfoRequest{} for _, f := range o { diff --git a/esapi/api.xpack.xpack.usage.go b/esapi/api.xpack.xpack.usage.go index 75c0695be8..28d2f5a994 100644 --- a/esapi/api.xpack.xpack.usage.go +++ b/esapi/api.xpack.xpack.usage.go @@ -13,7 +13,9 @@ import ( "time" ) -func newXPackUsageFunc(t Transport) XPackUsage { +// NewXPackUsage creates a new API client for the XPackUsage endpoint +// +func NewXPackUsage(t Transport) XPackUsage { return func(o ...func(*XPackUsageRequest)) (*Response, error) { var r = XPackUsageRequest{} for _, f := range o { diff --git a/internal/cmd/generate/commands/gensource/generator.go b/internal/cmd/generate/commands/gensource/generator.go index 87a3bb8f61..48211f6725 100644 --- a/internal/cmd/generate/commands/gensource/generator.go +++ b/internal/cmd/generate/commands/gensource/generator.go @@ -89,13 +89,16 @@ func (g *Generator) genHeader() { } func (g *Generator) genConstructor() { + n := g.Endpoint.MethodWithNamespace() g.w(` -func new` + g.Endpoint.MethodWithNamespace() + `Func(t Transport) ` + g.Endpoint.MethodWithNamespace() + ` { +// New` + n + ` creates a new API client for the ` + n + ` endpoint` + ` +// +func New` + n + `(t Transport) ` + n + ` { return func(`) g.genMethodArguments() - g.w(`o ...func(*` + g.Endpoint.MethodWithNamespace() + `Request)) (*Response, error) {`) + g.w(`o ...func(*` + n + `Request)) (*Response, error) {`) if len(g.Endpoint.RequiredArguments()) > 0 { - g.w("\n\t\t" + `var r = ` + g.Endpoint.MethodWithNamespace() + `Request{`) + g.w("\n\t\t" + `var r = ` + n + `Request{`) for i, arg := range g.Endpoint.RequiredArguments() { if arg.Name == "type" { continue // Skip the type parameter, "_doc" is used by default @@ -107,7 +110,7 @@ func new` + g.Endpoint.MethodWithNamespace() + `Func(t Transport) ` + g.Endpoint } g.w("}\n") } else { - g.w("\n\t\t" + `var r = ` + g.Endpoint.MethodWithNamespace() + `Request{}` + "\n") + g.w("\n\t\t" + `var r = ` + n + `Request{}` + "\n") } g.w(` for _, f := range o { f(&r) diff --git a/internal/cmd/generate/commands/genstruct/command.go b/internal/cmd/generate/commands/genstruct/command.go index 4abaa81394..6839bfb0a3 100644 --- a/internal/cmd/generate/commands/genstruct/command.go +++ b/internal/cmd/generate/commands/genstruct/command.go @@ -243,6 +243,19 @@ type API struct { } } b.WriteString("}\n\n") + + b.WriteString(`// New` + n + ` creates a new API client for ` + n + ` APIs` + "\n//\n") + b.WriteString(`func New` + n + `(t Transport) *` + n + ` { + return &` + n + "{\n") + for _, e := range endpoints { + name := strings.ReplaceAll(e.Name(), "Request", "") + if strings.HasPrefix(strings.ToLower(name), strings.ToLower(n)) { + methodName := strings.ReplaceAll(name, n, "") + b.WriteString(fmt.Sprintf("\t\t%s: New%s(t),\n", methodName, name)) + } + } + b.WriteString("\t}\n") + b.WriteString("}\n\n") } b.WriteString(`// New creates new API @@ -261,20 +274,12 @@ func New(t Transport) *API { } } if !skip { - b.WriteString(fmt.Sprintf("\t\t%[1]s: new%[1]sFunc(t),\n", name)) + b.WriteString(fmt.Sprintf("\t\t%[1]s: New%[1]s(t),\n", name)) } } for _, n := range namespaces { - b.WriteString(fmt.Sprintf("\t\t%[1]s: &%[1]s{\n", n)) - for _, e := range endpoints { - name := strings.ReplaceAll(e.Name(), "Request", "") - if strings.HasPrefix(strings.ToLower(name), strings.ToLower(n)) { - methodName := strings.ReplaceAll(name, n, "") - b.WriteString(fmt.Sprintf("\t\t\t%s: new%sFunc(t),\n", methodName, name)) - } - } - b.WriteString("\t\t},\n") + b.WriteString(fmt.Sprintf("\t\t%[1]s: New%[1]s(t),\n", n)) } b.WriteString(` }