Skip to content

Commit

Permalink
nl before operation
Browse files Browse the repository at this point in the history
  • Loading branch information
jirikuncar committed Feb 3, 2022
1 parent 10dafc1 commit 9ba55ae
Show file tree
Hide file tree
Showing 46 changed files with 316 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .generator/src/generator/templates/api.j2
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ module {{ config.moduleName }}
{%- for path, method, operation in operations|sort(attribute="2.operationId") %}
{%- set httpMethod = method.upper() %}
{%- set returnType = operation|return_type %}

# {{ operation.summary.rstrip()|replace('\n', '\n# ')|indent(4) }}
{%- if operation.description %}
# {{ operation.description.rstrip()|replace('\n', '\n# ')|indent(4) }}
{%- endif %}

{%- for name, parameter in operation|parameters if parameter.required %}
# @param {{ name|attribute_name }} [{{ get_type_for_parameter(parameter) }}] {{ parameter.get("description", "").replace('\n', ' ') }}
{%- endfor %}
Expand Down
1 change: 1 addition & 0 deletions lib/datadog_api_client/v1/api/authentication_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class AuthenticationAPI
def initialize(api_client = APIClient.default)
@api_client = api_client
end

# Validate API key
# Check if the API key (not the APP key) is valid. If invalid, a 403 is returned.
# @param [Hash] opts the optional parameters
Expand Down
9 changes: 9 additions & 0 deletions lib/datadog_api_client/v1/api/aws_integration_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class AWSIntegrationAPI
def initialize(api_client = APIClient.default)
@api_client = api_client
end

# Create an AWS integration
# Create a Datadog-Amazon Web Services integration.
# Using the `POST` method updates your integration configuration
Expand Down Expand Up @@ -102,6 +103,7 @@ def create_aws_account_with_http_info(body, opts = {})
end
return data, status_code, headers
end

# Set an AWS tag filter
# Set an AWS tag filter.
# @param body [AWSTagFilterCreateRequest] Set an AWS tag filter using an `aws_account_identifier`, `namespace`, and filtering string. Namespace options are `application_elb`, `elb`, `lambda`, `network_elb`, `rds`, `sqs`, and `custom`.
Expand Down Expand Up @@ -176,6 +178,7 @@ def create_aws_tag_filter_with_http_info(body, opts = {})
end
return data, status_code, headers
end

# Generate a new external ID
# Generate a new AWS external ID for a given AWS account ID and role name pair.
# @param body [AWSAccount] Your Datadog role delegation name. For more information about your AWS account Role name, see the [Datadog AWS integration configuration info](https://docs.datadoghq.com/integrations/amazon_web_services/#setup).
Expand Down Expand Up @@ -250,6 +253,7 @@ def create_new_aws_external_id_with_http_info(body, opts = {})
end
return data, status_code, headers
end

# Delete an AWS integration
# Delete a Datadog-AWS integration matching the specified `account_id` and `role_name parameters`.
# @param body [AWSAccountDeleteRequest] AWS request object
Expand Down Expand Up @@ -324,6 +328,7 @@ def delete_aws_account_with_http_info(body, opts = {})
end
return data, status_code, headers
end

# Delete a tag filtering entry
# Delete a tag filtering entry.
# @param body [AWSTagFilterDeleteRequest] Delete a tag filtering entry for a given AWS account and `dd-aws` namespace.
Expand Down Expand Up @@ -398,6 +403,7 @@ def delete_aws_tag_filter_with_http_info(body, opts = {})
end
return data, status_code, headers
end

# List namespace rules
# List all namespace rules for a given Datadog-AWS integration. This endpoint takes no arguments.
# @param [Hash] opts the optional parameters
Expand Down Expand Up @@ -464,6 +470,7 @@ def list_available_aws_namespaces_with_http_info(opts = {})
end
return data, status_code, headers
end

# List all AWS integrations
# List all Datadog-AWS integrations available in your Datadog organization.
# @param [Hash] opts the optional parameters
Expand Down Expand Up @@ -539,6 +546,7 @@ def list_aws_accounts_with_http_info(opts = {})
end
return data, status_code, headers
end

# Get all AWS tag filters
# Get all AWS tag filters.
# @param account_id [String] Only return AWS filters that matches this `account_id`.
Expand Down Expand Up @@ -612,6 +620,7 @@ def list_aws_tag_filters_with_http_info(account_id, opts = {})
end
return data, status_code, headers
end

# Update an AWS integration
# Update a Datadog-Amazon Web Services integration.
# @param body [AWSAccount] AWS request object
Expand Down
7 changes: 7 additions & 0 deletions lib/datadog_api_client/v1/api/aws_logs_integration_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class AWSLogsIntegrationAPI
def initialize(api_client = APIClient.default)
@api_client = api_client
end

# Check that an AWS Lambda Function exists
# Test if permissions are present to add a log-forwarding triggers for the given services and AWS account. The input
# is the same as for Enable an AWS service log collection. Subsequent requests will always repeat the above, so this
Expand Down Expand Up @@ -110,6 +111,7 @@ def check_aws_logs_lambda_async_with_http_info(body, opts = {})
end
return data, status_code, headers
end

# Check permissions for log services
# Test if permissions are present to add log-forwarding triggers for the
# given services and AWS account. Input is the same as for `EnableAWSLogServices`.
Expand Down Expand Up @@ -202,6 +204,7 @@ def check_aws_logs_services_async_with_http_info(body, opts = {})
end
return data, status_code, headers
end

# Add AWS Log Lambda ARN
# Attach the Lambda ARN of the Lambda created for the Datadog-AWS log collection to your AWS account ID to enable log collection.
# @param body [AWSAccountAndLambdaRequest] AWS Log Lambda Async request body.
Expand Down Expand Up @@ -276,6 +279,7 @@ def create_aws_lambda_arn_with_http_info(body, opts = {})
end
return data, status_code, headers
end

# Delete an AWS Logs integration
# Delete a Datadog-AWS logs configuration by removing the specific Lambda ARN associated with a given AWS account.
# @param body [AWSAccountAndLambdaRequest] Delete AWS Lambda ARN request body.
Expand Down Expand Up @@ -350,6 +354,7 @@ def delete_aws_lambda_arn_with_http_info(body, opts = {})
end
return data, status_code, headers
end

# Enable an AWS Logs integration
# Enable automatic log collection for a list of services. This should be run after running `CreateAWSLambdaARN` to save the configuration.
# @param body [AWSLogsServicesRequest] Enable AWS Log Services request body.
Expand Down Expand Up @@ -424,6 +429,7 @@ def enable_aws_log_services_with_http_info(body, opts = {})
end
return data, status_code, headers
end

# List all AWS Logs integrations
# List all Datadog-AWS Logs integrations configured in your Datadog account.
# @param [Hash] opts the optional parameters
Expand Down Expand Up @@ -490,6 +496,7 @@ def list_aws_logs_integrations_with_http_info(opts = {})
end
return data, status_code, headers
end

# Get list of AWS log ready services
# Get the list of current AWS services that Datadog offers automatic log collection. Use returned service IDs with the services parameter for the Enable an AWS service log collection API endpoint.
# @param [Hash] opts the optional parameters
Expand Down
5 changes: 5 additions & 0 deletions lib/datadog_api_client/v1/api/azure_integration_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class AzureIntegrationAPI
def initialize(api_client = APIClient.default)
@api_client = api_client
end

# Create an Azure integration
# Create a Datadog-Azure integration.
#
Expand Down Expand Up @@ -108,6 +109,7 @@ def create_azure_integration_with_http_info(body, opts = {})
end
return data, status_code, headers
end

# Delete an Azure integration
# Delete a given Datadog-Azure integration from your Datadog account.
# @param body [AzureAccount] Delete a given Datadog-Azure integration request body.
Expand Down Expand Up @@ -182,6 +184,7 @@ def delete_azure_integration_with_http_info(body, opts = {})
end
return data, status_code, headers
end

# List all Azure integrations
# List all Datadog-Azure integrations configured in your Datadog account.
# @param [Hash] opts the optional parameters
Expand Down Expand Up @@ -248,6 +251,7 @@ def list_azure_integration_with_http_info(opts = {})
end
return data, status_code, headers
end

# Update Azure integration host filters
# Update the defined list of host filters for a given Datadog-Azure integration.
# @param body [AzureAccount] Update a Datadog-Azure integration's host filters request body.
Expand Down Expand Up @@ -322,6 +326,7 @@ def update_azure_host_filters_with_http_info(body, opts = {})
end
return data, status_code, headers
end

# Update an Azure integration
# Update a Datadog-Azure integration. Requires an existing `tenant_name` and `client_id`.
# Any other fields supplied will overwrite existing values. To overwrite `tenant_name` or `client_id`,
Expand Down
5 changes: 5 additions & 0 deletions lib/datadog_api_client/v1/api/dashboard_lists_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class DashboardListsAPI
def initialize(api_client = APIClient.default)
@api_client = api_client
end

# Create a dashboard list
# Create an empty dashboard list.
# @param body [DashboardList] Create a dashboard list request body.
Expand Down Expand Up @@ -96,6 +97,7 @@ def create_dashboard_list_with_http_info(body, opts = {})
end
return data, status_code, headers
end

# Delete a dashboard list
# Delete a dashboard list.
# @param list_id [Integer] ID of the dashboard list to delete.
Expand Down Expand Up @@ -168,6 +170,7 @@ def delete_dashboard_list_with_http_info(list_id, opts = {})
end
return data, status_code, headers
end

# Get a dashboard list
# Fetch an existing dashboard list's definition.
# @param list_id [Integer] ID of the dashboard list to fetch.
Expand Down Expand Up @@ -240,6 +243,7 @@ def get_dashboard_list_with_http_info(list_id, opts = {})
end
return data, status_code, headers
end

# Get all dashboard lists
# Fetch all of your existing dashboard list definitions.
# @param [Hash] opts the optional parameters
Expand Down Expand Up @@ -306,6 +310,7 @@ def list_dashboard_lists_with_http_info(opts = {})
end
return data, status_code, headers
end

# Update a dashboard list
# Update the name of a dashboard list.
# @param list_id [Integer] ID of the dashboard list to update.
Expand Down
7 changes: 7 additions & 0 deletions lib/datadog_api_client/v1/api/dashboards_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class DashboardsAPI
def initialize(api_client = APIClient.default)
@api_client = api_client
end

# Create a new dashboard
# Create a dashboard using the specified options. When defining queries in your widgets, take note of which queries should have the `as_count()` or `as_rate()` modifiers appended.
# Refer to the following [documentation](https://docs.datadoghq.com/developers/metrics/type_modifiers/?tab=count#in-application-modifiers) for more information on these modifiers.
Expand Down Expand Up @@ -98,6 +99,7 @@ def create_dashboard_with_http_info(body, opts = {})
end
return data, status_code, headers
end

# Delete a dashboard
# Delete a dashboard using the specified ID.
# @param dashboard_id [String] The ID of the dashboard.
Expand Down Expand Up @@ -170,6 +172,7 @@ def delete_dashboard_with_http_info(dashboard_id, opts = {})
end
return data, status_code, headers
end

# Delete dashboards
# Delete dashboards using the specified IDs. If there are any failures, no dashboards will be deleted (partial success is not allowed).
# @param body [DashboardBulkDeleteRequest] Delete dashboards request body.
Expand Down Expand Up @@ -244,6 +247,7 @@ def delete_dashboards_with_http_info(body, opts = {})
end
return data, status_code, headers
end

# Get a dashboard
# Get a dashboard using the specified ID.
# @param dashboard_id [String] The ID of the dashboard.
Expand Down Expand Up @@ -316,6 +320,7 @@ def get_dashboard_with_http_info(dashboard_id, opts = {})
end
return data, status_code, headers
end

# Get all dashboards
# Get all dashboards.
#
Expand Down Expand Up @@ -394,6 +399,7 @@ def list_dashboards_with_http_info(opts = {})
end
return data, status_code, headers
end

# Restore deleted dashboards
# Restore dashboards using the specified IDs. If there are any failures, no dashboards will be restored (partial success is not allowed).
# @param body [DashboardRestoreRequest] Restore dashboards request body.
Expand Down Expand Up @@ -468,6 +474,7 @@ def restore_dashboards_with_http_info(body, opts = {})
end
return data, status_code, headers
end

# Update a dashboard
# Update a dashboard using the specified ID.
# @param dashboard_id [String] The ID of the dashboard.
Expand Down
7 changes: 7 additions & 0 deletions lib/datadog_api_client/v1/api/downtimes_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class DowntimesAPI
def initialize(api_client = APIClient.default)
@api_client = api_client
end

# Cancel a downtime
# Cancel a downtime.
# @param downtime_id [Integer] ID of the downtime to cancel.
Expand Down Expand Up @@ -94,6 +95,7 @@ def cancel_downtime_with_http_info(downtime_id, opts = {})
end
return data, status_code, headers
end

# Cancel downtimes by scope
# Delete all downtimes that match the scope of `X`.
# @param body [CancelDowntimesByScopeRequest] Scope to cancel downtimes for.
Expand Down Expand Up @@ -168,6 +170,7 @@ def cancel_downtimes_by_scope_with_http_info(body, opts = {})
end
return data, status_code, headers
end

# Schedule a downtime
# Schedule a downtime.
# @param body [Downtime] Schedule a downtime request body.
Expand Down Expand Up @@ -242,6 +245,7 @@ def create_downtime_with_http_info(body, opts = {})
end
return data, status_code, headers
end

# Get a downtime
# Get downtime detail by `downtime_id`.
# @param downtime_id [Integer] ID of the downtime to fetch.
Expand Down Expand Up @@ -314,6 +318,7 @@ def get_downtime_with_http_info(downtime_id, opts = {})
end
return data, status_code, headers
end

# Get all downtimes
# Get all scheduled downtimes.
# @param [Hash] opts the optional parameters
Expand Down Expand Up @@ -383,6 +388,7 @@ def list_downtimes_with_http_info(opts = {})
end
return data, status_code, headers
end

# Get all downtimes for a monitor
# Get all active downtimes for the specified monitor.
# @param monitor_id [Integer] The id of the monitor
Expand Down Expand Up @@ -455,6 +461,7 @@ def list_monitor_downtimes_with_http_info(monitor_id, opts = {})
end
return data, status_code, headers
end

# Update a downtime
# Update a single downtime by `downtime_id`.
# @param downtime_id [Integer] ID of the downtime to update.
Expand Down
3 changes: 3 additions & 0 deletions lib/datadog_api_client/v1/api/events_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class EventsAPI
def initialize(api_client = APIClient.default)
@api_client = api_client
end

# Post an event
# This endpoint allows you to post events to the stream.
# Tag them, set priority and event aggregate them with other events.
Expand Down Expand Up @@ -98,6 +99,7 @@ def create_event_with_http_info(body, opts = {})
end
return data, status_code, headers
end

# Get an event
# This endpoint allows you to query for event details.
#
Expand Down Expand Up @@ -176,6 +178,7 @@ def get_event_with_http_info(event_id, opts = {})
end
return data, status_code, headers
end

# Query the event stream
# The event stream can be queried and filtered by time, priority, sources and tags.
#
Expand Down
4 changes: 4 additions & 0 deletions lib/datadog_api_client/v1/api/gcp_integration_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class GCPIntegrationAPI
def initialize(api_client = APIClient.default)
@api_client = api_client
end

# Create a GCP integration
# Create a Datadog-GCP integration.
# @param body [GCPAccount] Create a Datadog-GCP integration.
Expand Down Expand Up @@ -96,6 +97,7 @@ def create_gcp_integration_with_http_info(body, opts = {})
end
return data, status_code, headers
end

# Delete a GCP integration
# Delete a given Datadog-GCP integration.
# @param body [GCPAccount] Delete a given Datadog-GCP integration.
Expand Down Expand Up @@ -170,6 +172,7 @@ def delete_gcp_integration_with_http_info(body, opts = {})
end
return data, status_code, headers
end

# List all GCP integrations
# List all Datadog-GCP integrations configured in your Datadog account.
# @param [Hash] opts the optional parameters
Expand Down Expand Up @@ -236,6 +239,7 @@ def list_gcp_integration_with_http_info(opts = {})
end
return data, status_code, headers
end

# Update a GCP integration
# Update a Datadog-GCP integrations host_filters and/or auto-mute.
# Requires a `project_id` and `client_email`, however these fields cannot be updated.
Expand Down
Loading

0 comments on commit 9ba55ae

Please sign in to comment.