Skip to content

Commit 3b8eb65

Browse files
committed
[API] Renames connnector namespaces
All the APIs in `connector_sync_job` and `connector_secret` namespaces have been moved inside `connector`.
1 parent 7da022a commit 3b8eb65

29 files changed

+202
-146
lines changed

elasticsearch-api/lib/elasticsearch/api.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,6 @@ def self.included(base)
8888
Elasticsearch::API::Profiling,
8989
Elasticsearch::API::Simulate,
9090
Elasticsearch::API::Connector,
91-
Elasticsearch::API::ConnectorSyncJob,
92-
Elasticsearch::API::ConnectorSecret,
9391
Elasticsearch::API::DataStreams
9492
end
9593

elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/delete.rb renamed to elasticsearch-api/lib/elasticsearch/api/actions/connector/secret_delete.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#
2121
module Elasticsearch
2222
module API
23-
module ConnectorSecret
23+
module Connector
2424
module Actions
2525
# Deletes a connector secret.
2626
# This functionality is Experimental and may be changed or removed
@@ -33,8 +33,8 @@ module Actions
3333
#
3434
# @see [TODO]
3535
#
36-
def delete(arguments = {})
37-
request_opts = { endpoint: arguments[:endpoint] || 'connector_secret.delete' }
36+
def secret_delete(arguments = {})
37+
request_opts = { endpoint: arguments[:endpoint] || 'connector.secret_delete' }
3838

3939
defined_params = [:id].each_with_object({}) do |variable, set_variables|
4040
set_variables[variable] = arguments[variable] if arguments.key?(variable)

elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/get.rb renamed to elasticsearch-api/lib/elasticsearch/api/actions/connector/secret_get.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#
2121
module Elasticsearch
2222
module API
23-
module ConnectorSecret
23+
module Connector
2424
module Actions
2525
# Retrieves a secret stored by Connectors.
2626
# This functionality is Experimental and may be changed or removed
@@ -33,8 +33,8 @@ module Actions
3333
#
3434
# @see [TODO]
3535
#
36-
def get(arguments = {})
37-
request_opts = { endpoint: arguments[:endpoint] || 'connector_secret.get' }
36+
def secret_get(arguments = {})
37+
request_opts = { endpoint: arguments[:endpoint] || 'connector.secret_get' }
3838

3939
defined_params = [:id].each_with_object({}) do |variable, set_variables|
4040
set_variables[variable] = arguments[variable] if arguments.key?(variable)

elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/post.rb renamed to elasticsearch-api/lib/elasticsearch/api/actions/connector/secret_post.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#
2121
module Elasticsearch
2222
module API
23-
module ConnectorSecret
23+
module Connector
2424
module Actions
2525
# Creates a secret for a Connector.
2626
# This functionality is Experimental and may be changed or removed
@@ -33,8 +33,8 @@ module Actions
3333
#
3434
# @see [TODO]
3535
#
36-
def post(arguments = {})
37-
request_opts = { endpoint: arguments[:endpoint] || 'connector_secret.post' }
36+
def secret_post(arguments = {})
37+
request_opts = { endpoint: arguments[:endpoint] || 'connector.secret_post' }
3838

3939
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
4040

elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/put.rb renamed to elasticsearch-api/lib/elasticsearch/api/actions/connector/secret_put.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#
2121
module Elasticsearch
2222
module API
23-
module ConnectorSecret
23+
module Connector
2424
module Actions
2525
# Creates or updates a secret for a Connector.
2626
# This functionality is Experimental and may be changed or removed
@@ -34,8 +34,8 @@ module Actions
3434
#
3535
# @see [TODO]
3636
#
37-
def put(arguments = {})
38-
request_opts = { endpoint: arguments[:endpoint] || 'connector_secret.put' }
37+
def secret_put(arguments = {})
38+
request_opts = { endpoint: arguments[:endpoint] || 'connector.secret_put' }
3939

4040
defined_params = [:id].each_with_object({}) do |variable, set_variables|
4141
set_variables[variable] = arguments[variable] if arguments.key?(variable)

elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/cancel.rb renamed to elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_cancel.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#
2121
module Elasticsearch
2222
module API
23-
module ConnectorSyncJob
23+
module Connector
2424
module Actions
2525
# Cancels a connector sync job.
2626
# This functionality is Experimental and may be changed or removed
@@ -33,8 +33,8 @@ module Actions
3333
#
3434
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cancel-connector-sync-job-api.html
3535
#
36-
def cancel(arguments = {})
37-
request_opts = { endpoint: arguments[:endpoint] || 'connector_sync_job.cancel' }
36+
def sync_job_cancel(arguments = {})
37+
request_opts = { endpoint: arguments[:endpoint] || 'connector.sync_job_cancel' }
3838

3939
defined_params = [:connector_sync_job_id].each_with_object({}) do |variable, set_variables|
4040
set_variables[variable] = arguments[variable] if arguments.key?(variable)

elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/check_in.rb renamed to elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_check_in.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#
2121
module Elasticsearch
2222
module API
23-
module ConnectorSyncJob
23+
module Connector
2424
module Actions
2525
# Checks in a connector sync job (refreshes 'last_seen').
2626
# This functionality is Experimental and may be changed or removed
@@ -33,8 +33,8 @@ module Actions
3333
#
3434
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/check-in-connector-sync-job-api.html
3535
#
36-
def check_in(arguments = {})
37-
request_opts = { endpoint: arguments[:endpoint] || 'connector_sync_job.check_in' }
36+
def sync_job_check_in(arguments = {})
37+
request_opts = { endpoint: arguments[:endpoint] || 'connector.sync_job_check_in' }
3838

3939
defined_params = [:connector_sync_job_id].each_with_object({}) do |variable, set_variables|
4040
set_variables[variable] = arguments[variable] if arguments.key?(variable)

elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/delete.rb renamed to elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_delete.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#
2121
module Elasticsearch
2222
module API
23-
module ConnectorSyncJob
23+
module Connector
2424
module Actions
2525
# Deletes a connector sync job.
2626
# This functionality is Experimental and may be changed or removed
@@ -33,8 +33,8 @@ module Actions
3333
#
3434
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-connector-sync-job-api.html
3535
#
36-
def delete(arguments = {})
37-
request_opts = { endpoint: arguments[:endpoint] || 'connector_sync_job.delete' }
36+
def sync_job_delete(arguments = {})
37+
request_opts = { endpoint: arguments[:endpoint] || 'connector.sync_job_delete' }
3838

3939
defined_params = [:connector_sync_job_id].each_with_object({}) do |variable, set_variables|
4040
set_variables[variable] = arguments[variable] if arguments.key?(variable)

elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/error.rb renamed to elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_error.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#
2121
module Elasticsearch
2222
module API
23-
module ConnectorSyncJob
23+
module Connector
2424
module Actions
2525
# Sets an error for a connector sync job.
2626
# This functionality is Experimental and may be changed or removed
@@ -34,8 +34,8 @@ module Actions
3434
#
3535
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/set-connector-sync-job-error-api.html
3636
#
37-
def error(arguments = {})
38-
request_opts = { endpoint: arguments[:endpoint] || 'connector_sync_job.error' }
37+
def sync_job_error(arguments = {})
38+
request_opts = { endpoint: arguments[:endpoint] || 'connector.sync_job_error' }
3939

4040
defined_params = [:connector_sync_job_id].each_with_object({}) do |variable, set_variables|
4141
set_variables[variable] = arguments[variable] if arguments.key?(variable)

elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/get.rb renamed to elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_get.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#
2121
module Elasticsearch
2222
module API
23-
module ConnectorSyncJob
23+
module Connector
2424
module Actions
2525
# Returns the details about a connector sync job.
2626
# This functionality is Experimental and may be changed or removed
@@ -33,8 +33,8 @@ module Actions
3333
#
3434
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-connector-sync-job-api.html
3535
#
36-
def get(arguments = {})
37-
request_opts = { endpoint: arguments[:endpoint] || 'connector_sync_job.get' }
36+
def sync_job_get(arguments = {})
37+
request_opts = { endpoint: arguments[:endpoint] || 'connector.sync_job_get' }
3838

3939
defined_params = [:connector_sync_job_id].each_with_object({}) do |variable, set_variables|
4040
set_variables[variable] = arguments[variable] if arguments.key?(variable)

0 commit comments

Comments
 (0)