From d19eeb5237b311a2f01203c1e5975a2b60a2af98 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 16 Feb 2026 13:46:41 +0000 Subject: [PATCH] Regenerate client from commit a36febd of spec repo --- .generator/schemas/v2/openapi.yaml | 667 ++++++++++++++++++ .../ListActionConnections.rb | 8 + .../action-connection/ListConnectionGroups.rb | 8 + .../UpdateConnectionGroup.rb | 20 + features/scenarios_model_mapping.rb | 26 + features/v2/action_connection.feature | 55 ++ features/v2/undo.json | 18 + lib/datadog_api_client/configuration.rb | 3 + lib/datadog_api_client/inflector.rb | 22 + .../v2/api/action_connection_api.rb | 248 +++++++ .../v2/models/aws_secret_manager.rb | 144 ++++ .../connection_data_attributes_response.rb | 279 ++++++++ .../v2/models/connection_data_response.rb | 165 +++++ ...onnection_group_data_attributes_request.rb | 159 +++++ ...nnection_group_data_attributes_response.rb | 252 +++++++ .../models/connection_group_data_request.rb | 133 ++++ .../models/connection_group_data_response.rb | 175 +++++ .../models/connection_group_relationships.rb | 105 +++ .../v2/models/connection_group_type.rb | 26 + .../v2/models/created_by.rb | 123 ++++ .../v2/models/created_by_relationship.rb | 105 +++ .../v2/models/created_by_relationship_data.rb | 144 ++++ .../v2/models/external_secrets_manager.rb | 62 ++ .../models/external_secrets_manager_one_of.rb | 123 ++++ .../v2/models/integration_counts.rb | 125 ++++ .../list_action_connections_response.rb | 135 ++++ .../list_action_connections_response_meta.rb | 164 +++++ .../models/list_connection_groups_response.rb | 135 ++++ .../list_connection_groups_response_meta.rb | 164 +++++ .../v2/models/private_actions_runner.rb | 123 ++++ .../models/update_connection_group_request.rb | 123 ++++ .../update_connection_group_response.rb | 123 ++++ 32 files changed, 4162 insertions(+) create mode 100644 examples/v2/action-connection/ListActionConnections.rb create mode 100644 examples/v2/action-connection/ListConnectionGroups.rb create mode 100644 examples/v2/action-connection/UpdateConnectionGroup.rb create mode 100644 lib/datadog_api_client/v2/models/aws_secret_manager.rb create mode 100644 lib/datadog_api_client/v2/models/connection_data_attributes_response.rb create mode 100644 lib/datadog_api_client/v2/models/connection_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/connection_group_data_attributes_request.rb create mode 100644 lib/datadog_api_client/v2/models/connection_group_data_attributes_response.rb create mode 100644 lib/datadog_api_client/v2/models/connection_group_data_request.rb create mode 100644 lib/datadog_api_client/v2/models/connection_group_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/connection_group_relationships.rb create mode 100644 lib/datadog_api_client/v2/models/connection_group_type.rb create mode 100644 lib/datadog_api_client/v2/models/created_by.rb create mode 100644 lib/datadog_api_client/v2/models/created_by_relationship.rb create mode 100644 lib/datadog_api_client/v2/models/created_by_relationship_data.rb create mode 100644 lib/datadog_api_client/v2/models/external_secrets_manager.rb create mode 100644 lib/datadog_api_client/v2/models/external_secrets_manager_one_of.rb create mode 100644 lib/datadog_api_client/v2/models/integration_counts.rb create mode 100644 lib/datadog_api_client/v2/models/list_action_connections_response.rb create mode 100644 lib/datadog_api_client/v2/models/list_action_connections_response_meta.rb create mode 100644 lib/datadog_api_client/v2/models/list_connection_groups_response.rb create mode 100644 lib/datadog_api_client/v2/models/list_connection_groups_response_meta.rb create mode 100644 lib/datadog_api_client/v2/models/private_actions_runner.rb create mode 100644 lib/datadog_api_client/v2/models/update_connection_group_request.rb create mode 100644 lib/datadog_api_client/v2/models/update_connection_group_response.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 07cf64fab0e1..c8ae4742ceef 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -310,6 +310,13 @@ components: required: true schema: type: string + ConnectionGroupId: + description: The ID of the connection group. + in: path + name: connection_group_id + required: true + schema: + type: string ConnectionId: description: The ID of the action connection in: path @@ -2555,6 +2562,22 @@ components: example: true type: boolean type: object + AWSSecretManager: + description: AWS Secrets Manager configuration. + properties: + connection_id: + description: The ID of the connection used to access AWS Secrets Manager. + example: afda2727-c55e-4258-b4c6-e170c32be1dd + format: uuid + type: string + region: + description: The AWS region where the secret is stored. + example: us-east-1 + type: string + required: + - connection_id + - region + type: object AWSTracesConfig: description: AWS Traces Collection config. properties: @@ -12573,6 +12596,82 @@ components: - connectionId - label type: object + ConnectionDataAttributesResponse: + description: Attributes of an action connection. + properties: + acting_user_can_resolve: + description: Indicates if the acting user can resolve the connection. + example: true + type: boolean + created_at: + description: The creation timestamp of the connection. + example: '1970-01-01T00:02:03.000000456Z' + format: date-time + type: string + created_by: + $ref: '#/components/schemas/CreatedBy' + description: + description: The description of the connection. + example: A test connection for AWS integrations + type: string + external_secrets_manager: + $ref: '#/components/schemas/ExternalSecretsManager' + nullable: true + integration: + description: Integration configuration details. + example: + credentials: + account_id: '123456789012' + role: role + type: AWSAssumeRole + type: AWS + type: object + is_favorite: + description: Indicates if the connection is marked as favorite. + example: false + type: boolean + last_updated: + description: The last updated timestamp of the connection. + example: '1970-01-01T00:02:03.000000456Z' + format: date-time + type: string + name: + description: The name of the connection. + example: My Connection + type: string + private_actions_runner: + $ref: '#/components/schemas/PrivateActionsRunner' + runner_id: + description: The ID of the runner associated with the connection. + type: string + tags: + description: Tags associated with the connection. + items: + type: string + type: array + required: + - acting_user_can_resolve + - integration + - external_secrets_manager + - is_favorite + - name + type: object + ConnectionDataResponse: + description: Data object for an action connection. + properties: + attributes: + $ref: '#/components/schemas/ConnectionDataAttributesResponse' + id: + description: The unique identifier of the connection. + example: afda2727-c55e-4258-b4c6-e170c32be1dd + type: string + type: + $ref: '#/components/schemas/ActionConnectionDataType' + required: + - id + - type + - attributes + type: object ConnectionEnv: description: A list of connections or connection groups used in the workflow. properties: @@ -12622,6 +12721,129 @@ components: - label - tags type: object + ConnectionGroupDataAttributesRequest: + description: Attributes for updating a connection group. + properties: + connections: + description: List of connection IDs associated with the connection group. + items: + type: string + type: array + description: + description: The description of the connection group. + example: An updated test connection group for AWS integrations + type: string + integration_type: + description: The integration type of the connection group. + type: string + name: + description: The name of the connection group. + example: My Connection Group Updated + type: string + policy_attributes: + description: Policy attributes for the connection group. + type: string + tag_keys: + description: Tag keys associated with the connection group. + items: + type: string + type: array + type: object + ConnectionGroupDataAttributesResponse: + description: Attributes of a connection group. + properties: + connections: + description: List of connection IDs associated with the connection group. + example: + - connection1 + - connection2 + items: + type: string + type: array + created_at: + description: The creation timestamp of the connection group. + example: '1970-01-01T00:02:03.000000456Z' + format: date-time + type: string + description: + description: The description of the connection group. + example: A test connection group for AWS integrations + type: string + integration_type: + description: The integration type of the connection group. + example: AWS + type: string + is_favorite: + description: Indicates if the connection group is marked as favorite. + example: false + type: boolean + last_updated_at: + description: The last updated timestamp of the connection group. + example: '1970-01-01T00:02:03.000000456Z' + format: date-time + type: string + name: + description: The name of the connection group. + example: My Connection Group + type: string + tag_keys: + description: Tag keys associated with the connection group. + example: + - env + - service + items: + type: string + type: array + required: + - name + - tag_keys + - integration_type + - created_at + - last_updated_at + - is_favorite + type: object + ConnectionGroupDataRequest: + description: Data object for updating a connection group. + properties: + attributes: + $ref: '#/components/schemas/ConnectionGroupDataAttributesRequest' + type: + $ref: '#/components/schemas/ConnectionGroupType' + required: + - type + type: object + ConnectionGroupDataResponse: + description: Data object for a connection group. + properties: + attributes: + $ref: '#/components/schemas/ConnectionGroupDataAttributesResponse' + id: + description: The unique identifier of the connection group. + example: afda2727-c55e-4258-b4c6-e170c32be1dd + type: string + relationships: + $ref: '#/components/schemas/ConnectionGroupRelationships' + type: + $ref: '#/components/schemas/ConnectionGroupType' + required: + - id + - type + - attributes + type: object + ConnectionGroupRelationships: + description: Relationships for a connection group. + properties: + created_by: + $ref: '#/components/schemas/CreatedByRelationship' + type: object + ConnectionGroupType: + description: The definition of `ConnectionGroupType` object. + enum: + - connection_group + example: connection_group + type: string + x-enum-varnames: + - CONNECTION_GROUP ConnectionsPagePagination: description: Page-based pagination metadata. properties: @@ -15586,6 +15808,37 @@ components: required: - data type: object + CreatedBy: + description: Information about the user who created the resource. + properties: + id: + description: The unique identifier of the user. + example: '' + type: string + required: + - id + type: object + CreatedByRelationship: + description: Relationship to the user who created the resource. + properties: + data: + $ref: '#/components/schemas/CreatedByRelationshipData' + type: object + CreatedByRelationshipData: + description: Data for the created_by relationship. + properties: + id: + description: The unique identifier of the user. + example: 2a10fb69-5ee6-47c8-96f5-d30e18bf883d + type: string + type: + description: The type of the relationship. + example: created_by + type: string + required: + - id + - type + type: object Creator: description: Creator of the object. properties: @@ -23369,6 +23622,17 @@ components: from the other indexes. type: string type: object + ExternalSecretsManager: + description: External secrets manager configuration. + oneOf: + - $ref: '#/components/schemas/ExternalSecretsManagerOneOf' + ExternalSecretsManagerOneOf: + properties: + aws: + $ref: '#/components/schemas/AWSSecretManager' + required: + - aws + type: object FacetInfoRequest: example: data: @@ -31342,6 +31606,21 @@ components: type: string type: array type: object + IntegrationCounts: + description: Count of integrations by type. + properties: + filtered_count: + description: The filtered count of integrations. + format: int64 + type: integer + integration_type: + description: The integration type. + type: string + total_count: + description: The total count of integrations. + format: int64 + type: integer + type: object IntegrationIncident: description: Incident integration settings properties: @@ -33540,6 +33819,42 @@ components: format: int64 type: integer type: object + ListActionConnectionsResponse: + description: Response for listing action connections. + properties: + data: + description: An array of action connections. + items: + $ref: '#/components/schemas/ConnectionDataResponse' + type: array + meta: + $ref: '#/components/schemas/ListActionConnectionsResponseMeta' + required: + - data + type: object + ListActionConnectionsResponseMeta: + description: Metadata for the list connections response. + properties: + integration_counts: + description: Count of integrations by type. + items: + $ref: '#/components/schemas/IntegrationCounts' + nullable: true + type: array + total: + description: The total number of connections. + example: 1 + format: int64 + type: integer + total_filtered: + description: The total number of connections that match the specified filters. + example: 1 + format: int64 + type: integer + required: + - total + - total_filtered + type: object ListAppKeyRegistrationsResponse: description: A paginated list of app key registrations. properties: @@ -33687,6 +34002,43 @@ components: required: - data type: object + ListConnectionGroupsResponse: + description: Response for listing connection groups. + properties: + data: + description: An array of connection groups. + items: + $ref: '#/components/schemas/ConnectionGroupDataResponse' + type: array + meta: + $ref: '#/components/schemas/ListConnectionGroupsResponseMeta' + required: + - data + type: object + ListConnectionGroupsResponseMeta: + description: Metadata for the list connection groups response. + properties: + integration_counts: + description: Count of integrations by type. + items: + $ref: '#/components/schemas/IntegrationCounts' + nullable: true + type: array + total: + description: The total number of connection groups. + example: 1 + format: int64 + type: integer + total_filtered: + description: The total number of connection groups that match the specified + filters. + example: 1 + format: int64 + type: integer + required: + - total + - total_filtered + type: object ListConnectionsResponse: example: data: @@ -46110,6 +46462,16 @@ components: required: - type type: object + PrivateActionsRunner: + description: Information about the private actions runner. + properties: + id: + description: The unique identifier of the runner. + example: '' + type: string + required: + - id + type: object ProcessSummariesMeta: description: Response metadata object. properties: @@ -64963,6 +65325,22 @@ components: description: The display name of the datastore. type: string type: object + UpdateConnectionGroupRequest: + description: Request for updating a connection group. + properties: + data: + $ref: '#/components/schemas/ConnectionGroupDataRequest' + required: + - data + type: object + UpdateConnectionGroupResponse: + description: Response for updating a connection group. + properties: + data: + $ref: '#/components/schemas/ConnectionGroupDataResponse' + required: + - data + type: object UpdateConnectionRequest: example: data: @@ -69556,6 +69934,125 @@ paths: - user_app_keys - service_account_write /api/v2/actions/connections: + get: + description: List all action connections for the organization. This endpoint + supports filtering by integration type, tags, environment, and search strings. + Pagination is supported using page size and page number parameters. + operationId: ListActionConnections + parameters: + - description: The number of connections to return per page. + in: query + name: page[size] + required: false + schema: + default: 50 + example: 1 + format: int64 + type: integer + - description: The page number to return. + in: query + name: page[number] + required: false + schema: + default: 0 + example: 10 + format: int64 + type: integer + - description: Filter by integration type. + explode: true + in: query + name: filter[integration] + required: false + schema: + items: + type: string + type: array + style: form + - description: Filter by tags. + explode: true + in: query + name: filter[tags] + required: false + schema: + items: + type: string + type: array + style: form + - description: Filter by environment. + in: query + name: filter[environment] + required: false + schema: + type: string + - description: Filter by connection IDs. + explode: true + in: query + name: filter[connection_ids] + required: false + schema: + items: + type: string + type: array + style: form + - description: Filter by creator IDs. + explode: true + in: query + name: filter[creator_ids] + required: false + schema: + items: + type: string + type: array + style: form + - description: Search string to filter connections. + in: query + name: filter[search] + required: false + schema: + type: string + - description: Sort parameters. + explode: true + in: query + name: sort + required: false + schema: + items: + type: string + type: array + style: form + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ListActionConnectionsResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Internal Server Error + summary: List action connections + tags: + - Action Connection + x-unstable: '**Note**: This endpoint is in preview and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' post: description: Create a new Action Connection. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key). @@ -69594,6 +70091,176 @@ paths: summary: Create a new Action Connection tags: - Action Connection + /api/v2/actions/connections/groups: + get: + description: List all connection groups for the organization. This endpoint + supports filtering by integration type, environment, connection group IDs, + and search strings. Pagination is supported using page size and page number + parameters. + operationId: ListConnectionGroups + parameters: + - description: The number of connection groups to return per page. + in: query + name: page[size] + required: false + schema: + default: 50 + example: 1 + format: int64 + type: integer + - description: The page number to return. + in: query + name: page[number] + required: false + schema: + default: 0 + example: 10 + format: int64 + type: integer + - description: Filter by integration type. + explode: true + in: query + name: filter[integration] + required: false + schema: + items: + type: string + type: array + style: form + - description: Filter by environment. + in: query + name: filter[environment] + required: false + schema: + type: string + - description: Filter by connection group IDs. + explode: true + in: query + name: filter[connection_group_ids] + required: false + schema: + items: + type: string + type: array + style: form + - description: Filter by creator ID. + in: query + name: filter[creator_id] + required: false + schema: + type: string + - description: Filter by creator IDs. + explode: true + in: query + name: filter[creator_ids] + required: false + schema: + items: + type: string + type: array + style: form + - description: Search string to filter connection groups. + in: query + name: filter[search] + required: false + schema: + type: string + - description: Sort parameters. + explode: true + in: query + name: sort + required: false + schema: + items: + type: string + type: array + style: form + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ListConnectionGroupsResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Internal Server Error + summary: List connection groups + tags: + - Action Connection + x-unstable: '**Note**: This endpoint is in preview and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/actions/connections/groups/{connection_group_id}: + patch: + description: Update an existing connection group by ID. This endpoint allows + updating the name, description, tag keys, integration type, connections, and + policy attributes of a connection group. + operationId: UpdateConnectionGroup + parameters: + - $ref: '#/components/parameters/ConnectionGroupId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateConnectionGroupRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateConnectionGroupResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Internal Server Error + summary: Update a connection group + tags: + - Action Connection + x-unstable: '**Note**: This endpoint is in preview and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/actions/connections/{connection_id}: delete: description: Delete an existing Action Connection. This API requires a [registered diff --git a/examples/v2/action-connection/ListActionConnections.rb b/examples/v2/action-connection/ListActionConnections.rb new file mode 100644 index 000000000000..aa1ca7b1030e --- /dev/null +++ b/examples/v2/action-connection/ListActionConnections.rb @@ -0,0 +1,8 @@ +# List action connections returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_action_connections".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ActionConnectionAPI.new +p api_instance.list_action_connections() diff --git a/examples/v2/action-connection/ListConnectionGroups.rb b/examples/v2/action-connection/ListConnectionGroups.rb new file mode 100644 index 000000000000..97b279884f90 --- /dev/null +++ b/examples/v2/action-connection/ListConnectionGroups.rb @@ -0,0 +1,8 @@ +# List connection groups returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_connection_groups".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ActionConnectionAPI.new +p api_instance.list_connection_groups() diff --git a/examples/v2/action-connection/UpdateConnectionGroup.rb b/examples/v2/action-connection/UpdateConnectionGroup.rb new file mode 100644 index 000000000000..b37988969015 --- /dev/null +++ b/examples/v2/action-connection/UpdateConnectionGroup.rb @@ -0,0 +1,20 @@ +# Update a connection group returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.update_connection_group".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ActionConnectionAPI.new + +body = DatadogAPIClient::V2::UpdateConnectionGroupRequest.new({ + data: DatadogAPIClient::V2::ConnectionGroupDataRequest.new({ + attributes: DatadogAPIClient::V2::ConnectionGroupDataAttributesRequest.new({ + connections: [], + description: "An updated test connection group for AWS integrations", + name: "My Connection Group Updated", + tag_keys: [], + }), + type: DatadogAPIClient::V2::ConnectionGroupType::CONNECTION_GROUP, + }), +}) +p api_instance.update_connection_group("connection_group_id", body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index d2fea4f627d3..34bceadfb476 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -934,9 +934,35 @@ "v2.RegisterAppKey" => { "app_key_id" => "String", }, + "v2.ListActionConnections" => { + "page_size" => "Integer", + "page_number" => "Integer", + "filter_integration" => "Array", + "filter_tags" => "Array", + "filter_environment" => "String", + "filter_connection_ids" => "Array", + "filter_creator_ids" => "Array", + "filter_search" => "String", + "sort" => "Array", + }, "v2.CreateActionConnection" => { "body" => "CreateActionConnectionRequest", }, + "v2.ListConnectionGroups" => { + "page_size" => "Integer", + "page_number" => "Integer", + "filter_integration" => "Array", + "filter_environment" => "String", + "filter_connection_group_ids" => "Array", + "filter_creator_id" => "String", + "filter_creator_ids" => "Array", + "filter_search" => "String", + "sort" => "Array", + }, + "v2.UpdateConnectionGroup" => { + "connection_group_id" => "String", + "body" => "UpdateConnectionGroupRequest", + }, "v2.DeleteActionConnection" => { "connection_id" => "String", }, diff --git a/features/v2/action_connection.feature b/features/v2/action_connection.feature index 759615a8fd63..1686cae1da80 100644 --- a/features/v2/action_connection.feature +++ b/features/v2/action_connection.feature @@ -97,6 +97,34 @@ Feature: Action Connection When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/action-platform + Scenario: List action connections returns "Bad Request" response + Given operation "ListActionConnections" enabled + And new "ListActionConnections" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/action-platform + Scenario: List action connections returns "OK" response + Given operation "ListActionConnections" enabled + And new "ListActionConnections" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/action-platform + Scenario: List connection groups returns "Bad Request" response + Given operation "ListConnectionGroups" enabled + And new "ListConnectionGroups" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/action-platform + Scenario: List connection groups returns "OK" response + Given operation "ListConnectionGroups" enabled + And new "ListConnectionGroups" request + When the request is sent + Then the response status is 200 OK + @team:DataDog/workflow-automation-dev Scenario: Register a new App Key returns "Bad request" response Given new "RegisterAppKey" request @@ -132,6 +160,33 @@ Feature: Action Connection When the request is sent Then the response status is 404 Not found + @generated @skip @team:DataDog/action-platform + Scenario: Update a connection group returns "Bad Request" response + Given operation "UpdateConnectionGroup" enabled + And new "UpdateConnectionGroup" request + And request contains "connection_group_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"connections": [], "description": "An updated test connection group for AWS integrations", "name": "My Connection Group Updated", "tag_keys": []}, "type": "connection_group"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/action-platform + Scenario: Update a connection group returns "Not Found" response + Given operation "UpdateConnectionGroup" enabled + And new "UpdateConnectionGroup" request + And request contains "connection_group_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"connections": [], "description": "An updated test connection group for AWS integrations", "name": "My Connection Group Updated", "tag_keys": []}, "type": "connection_group"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/action-platform + Scenario: Update a connection group returns "OK" response + Given operation "UpdateConnectionGroup" enabled + And new "UpdateConnectionGroup" request + And request contains "connection_group_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"connections": [], "description": "An updated test connection group for AWS integrations", "name": "My Connection Group Updated", "tag_keys": []}, "type": "connection_group"}} + When the request is sent + Then the response status is 200 OK + @team:DataDog/workflow-automation-dev Scenario: Update an existing Action Connection returns "Bad Request" response Given new "UpdateActionConnection" request diff --git a/features/v2/undo.json b/features/v2/undo.json index 75d0d7f71ed7..4e618c42c5d7 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -202,6 +202,12 @@ "type": "idempotent" } }, + "ListActionConnections": { + "tag": "Action Connection", + "undo": { + "type": "safe" + } + }, "CreateActionConnection": { "tag": "Action Connection", "undo": { @@ -215,6 +221,18 @@ "type": "unsafe" } }, + "ListConnectionGroups": { + "tag": "Action Connection", + "undo": { + "type": "safe" + } + }, + "UpdateConnectionGroup": { + "tag": "Action Connection", + "undo": { + "type": "idempotent" + } + }, "DeleteActionConnection": { "tag": "Action Connection", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index 7124bbe895fb..7b6833dce5a2 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -203,6 +203,9 @@ def initialize "v2.list_fleet_schedules": false, "v2.trigger_fleet_schedule": false, "v2.update_fleet_schedule": false, + "v2.list_action_connections": false, + "v2.list_connection_groups": false, + "v2.update_connection_group": false, "v2.create_open_api": false, "v2.delete_open_api": false, "v2.get_open_api": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 4a0ac91fa81b..07f5b6057af0 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1318,6 +1318,7 @@ def overrides "v2.aws_scan_options_update_attributes" => "AwsScanOptionsUpdateAttributes", "v2.aws_scan_options_update_data" => "AwsScanOptionsUpdateData", "v2.aws_scan_options_update_request" => "AwsScanOptionsUpdateRequest", + "v2.aws_secret_manager" => "AWSSecretManager", "v2.aws_traces_config" => "AWSTracesConfig", "v2.azure_credentials" => "AzureCredentials", "v2.azure_credentials_update" => "AzureCredentialsUpdate", @@ -1692,9 +1693,17 @@ def overrides "v2.connected_team_ref_data" => "ConnectedTeamRefData", "v2.connected_team_ref_data_type" => "ConnectedTeamRefDataType", "v2.connection" => "Connection", + "v2.connection_data_attributes_response" => "ConnectionDataAttributesResponse", + "v2.connection_data_response" => "ConnectionDataResponse", "v2.connection_env" => "ConnectionEnv", "v2.connection_env_env" => "ConnectionEnvEnv", "v2.connection_group" => "ConnectionGroup", + "v2.connection_group_data_attributes_request" => "ConnectionGroupDataAttributesRequest", + "v2.connection_group_data_attributes_response" => "ConnectionGroupDataAttributesResponse", + "v2.connection_group_data_request" => "ConnectionGroupDataRequest", + "v2.connection_group_data_response" => "ConnectionGroupDataResponse", + "v2.connection_group_relationships" => "ConnectionGroupRelationships", + "v2.connection_group_type" => "ConnectionGroupType", "v2.connections_page_pagination" => "ConnectionsPagePagination", "v2.connections_response_meta" => "ConnectionsResponseMeta", "v2.container" => "Container", @@ -1787,6 +1796,9 @@ def overrides "v2.create_data_deletion_request_body_data" => "CreateDataDeletionRequestBodyData", "v2.create_data_deletion_request_body_data_type" => "CreateDataDeletionRequestBodyDataType", "v2.create_data_deletion_response_body" => "CreateDataDeletionResponseBody", + "v2.created_by" => "CreatedBy", + "v2.created_by_relationship" => "CreatedByRelationship", + "v2.created_by_relationship_data" => "CreatedByRelationshipData", "v2.create_degradation_request" => "CreateDegradationRequest", "v2.create_degradation_request_data" => "CreateDegradationRequestData", "v2.create_degradation_request_data_attributes" => "CreateDegradationRequestDataAttributes", @@ -2363,6 +2375,8 @@ def overrides "v2.event_system_attributes_category" => "EventSystemAttributesCategory", "v2.event_system_attributes_integration_id" => "EventSystemAttributesIntegrationId", "v2.event_type" => "EventType", + "v2.external_secrets_manager" => "ExternalSecretsManager", + "v2.external_secrets_manager_one_of" => "ExternalSecretsManagerOneOf", "v2.facet_info_request" => "FacetInfoRequest", "v2.facet_info_request_data" => "FacetInfoRequestData", "v2.facet_info_request_data_attributes" => "FacetInfoRequestDataAttributes", @@ -2863,6 +2877,7 @@ def overrides "v2.input_schema_parameters" => "InputSchemaParameters", "v2.input_schema_parameters_type" => "InputSchemaParametersType", "v2.intake_payload_accepted" => "IntakePayloadAccepted", + "v2.integration_counts" => "IntegrationCounts", "v2.integration_incident" => "IntegrationIncident", "v2.integration_incident_field_mappings_items" => "IntegrationIncidentFieldMappingsItems", "v2.integration_incident_severity_config" => "IntegrationIncidentSeverityConfig", @@ -3018,6 +3033,8 @@ def overrides "v2.leaked_key_type" => "LeakedKeyType", "v2.library" => "Library", "v2.links" => "Links", + "v2.list_action_connections_response" => "ListActionConnectionsResponse", + "v2.list_action_connections_response_meta" => "ListActionConnectionsResponseMeta", "v2.list_apis_response" => "ListAPIsResponse", "v2.list_apis_response_data" => "ListAPIsResponseData", "v2.list_apis_response_data_attributes" => "ListAPIsResponseDataAttributes", @@ -3033,6 +3050,8 @@ def overrides "v2.list_apps_response_meta" => "ListAppsResponseMeta", "v2.list_apps_response_meta_page" => "ListAppsResponseMetaPage", "v2.list_assets_sbo_ms_response" => "ListAssetsSBOMsResponse", + "v2.list_connection_groups_response" => "ListConnectionGroupsResponse", + "v2.list_connection_groups_response_meta" => "ListConnectionGroupsResponseMeta", "v2.list_connections_response" => "ListConnectionsResponse", "v2.list_connections_response_data" => "ListConnectionsResponseData", "v2.list_connections_response_data_attributes" => "ListConnectionsResponseDataAttributes", @@ -3831,6 +3850,7 @@ def overrides "v2.powerpacks_response_meta_pagination" => "PowerpacksResponseMetaPagination", "v2.powerpack_template_variable" => "PowerpackTemplateVariable", "v2.preview_entity_response_data" => "PreviewEntityResponseData", + "v2.private_actions_runner" => "PrivateActionsRunner", "v2.process_summaries_meta" => "ProcessSummariesMeta", "v2.process_summaries_meta_page" => "ProcessSummariesMetaPage", "v2.process_summaries_response" => "ProcessSummariesResponse", @@ -5047,6 +5067,8 @@ def overrides "v2.update_apps_datastore_request" => "UpdateAppsDatastoreRequest", "v2.update_apps_datastore_request_data" => "UpdateAppsDatastoreRequestData", "v2.update_apps_datastore_request_data_attributes" => "UpdateAppsDatastoreRequestDataAttributes", + "v2.update_connection_group_request" => "UpdateConnectionGroupRequest", + "v2.update_connection_group_response" => "UpdateConnectionGroupResponse", "v2.update_connection_request" => "UpdateConnectionRequest", "v2.update_connection_request_data" => "UpdateConnectionRequestData", "v2.update_connection_request_data_attributes" => "UpdateConnectionRequestDataAttributes", diff --git a/lib/datadog_api_client/v2/api/action_connection_api.rb b/lib/datadog_api_client/v2/api/action_connection_api.rb index 8daf140808bc..03216e296752 100644 --- a/lib/datadog_api_client/v2/api/action_connection_api.rb +++ b/lib/datadog_api_client/v2/api/action_connection_api.rb @@ -285,6 +285,91 @@ def get_app_key_registration_with_http_info(app_key_id, opts = {}) return data, status_code, headers end + # List action connections. + # + # @see #list_action_connections_with_http_info + def list_action_connections(opts = {}) + data, _status_code, _headers = list_action_connections_with_http_info(opts) + data + end + + # List action connections. + # + # List all action connections for the organization. This endpoint supports filtering by integration type, tags, environment, and search strings. Pagination is supported using page size and page number parameters. + # + # @param opts [Hash] the optional parameters + # @option opts [Integer] :page_size The number of connections to return per page. + # @option opts [Integer] :page_number The page number to return. + # @option opts [Array] :filter_integration Filter by integration type. + # @option opts [Array] :filter_tags Filter by tags. + # @option opts [String] :filter_environment Filter by environment. + # @option opts [Array] :filter_connection_ids Filter by connection IDs. + # @option opts [Array] :filter_creator_ids Filter by creator IDs. + # @option opts [String] :filter_search Search string to filter connections. + # @option opts [Array] :sort Sort parameters. + # @return [Array<(ListActionConnectionsResponse, Integer, Hash)>] ListActionConnectionsResponse data, response status code and response headers + def list_action_connections_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_action_connections".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_action_connections") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_action_connections")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ActionConnectionAPI.list_action_connections ...' + end + # resource path + local_var_path = '/api/v2/actions/connections' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? + query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? + query_params[:'filter[integration]'] = @api_client.build_collection_param(opts[:'filter_integration'], :multi) if !opts[:'filter_integration'].nil? + query_params[:'filter[tags]'] = @api_client.build_collection_param(opts[:'filter_tags'], :multi) if !opts[:'filter_tags'].nil? + query_params[:'filter[environment]'] = opts[:'filter_environment'] if !opts[:'filter_environment'].nil? + query_params[:'filter[connection_ids]'] = @api_client.build_collection_param(opts[:'filter_connection_ids'], :multi) if !opts[:'filter_connection_ids'].nil? + query_params[:'filter[creator_ids]'] = @api_client.build_collection_param(opts[:'filter_creator_ids'], :multi) if !opts[:'filter_creator_ids'].nil? + query_params[:'filter[search]'] = opts[:'filter_search'] if !opts[:'filter_search'].nil? + query_params[:'sort'] = @api_client.build_collection_param(opts[:'sort'], :multi) if !opts[:'sort'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ListActionConnectionsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_action_connections, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + new_options[:query_string_normalizer] = HTTParty::Request::NON_RAILS_QUERY_STRING_NORMALIZER + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ActionConnectionAPI#list_action_connections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # List App Key Registrations. # # @see #list_app_key_registrations_with_http_info @@ -349,6 +434,91 @@ def list_app_key_registrations_with_http_info(opts = {}) return data, status_code, headers end + # List connection groups. + # + # @see #list_connection_groups_with_http_info + def list_connection_groups(opts = {}) + data, _status_code, _headers = list_connection_groups_with_http_info(opts) + data + end + + # List connection groups. + # + # List all connection groups for the organization. This endpoint supports filtering by integration type, environment, connection group IDs, and search strings. Pagination is supported using page size and page number parameters. + # + # @param opts [Hash] the optional parameters + # @option opts [Integer] :page_size The number of connection groups to return per page. + # @option opts [Integer] :page_number The page number to return. + # @option opts [Array] :filter_integration Filter by integration type. + # @option opts [String] :filter_environment Filter by environment. + # @option opts [Array] :filter_connection_group_ids Filter by connection group IDs. + # @option opts [String] :filter_creator_id Filter by creator ID. + # @option opts [Array] :filter_creator_ids Filter by creator IDs. + # @option opts [String] :filter_search Search string to filter connection groups. + # @option opts [Array] :sort Sort parameters. + # @return [Array<(ListConnectionGroupsResponse, Integer, Hash)>] ListConnectionGroupsResponse data, response status code and response headers + def list_connection_groups_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_connection_groups".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_connection_groups") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_connection_groups")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ActionConnectionAPI.list_connection_groups ...' + end + # resource path + local_var_path = '/api/v2/actions/connections/groups' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? + query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? + query_params[:'filter[integration]'] = @api_client.build_collection_param(opts[:'filter_integration'], :multi) if !opts[:'filter_integration'].nil? + query_params[:'filter[environment]'] = opts[:'filter_environment'] if !opts[:'filter_environment'].nil? + query_params[:'filter[connection_group_ids]'] = @api_client.build_collection_param(opts[:'filter_connection_group_ids'], :multi) if !opts[:'filter_connection_group_ids'].nil? + query_params[:'filter[creator_id]'] = opts[:'filter_creator_id'] if !opts[:'filter_creator_id'].nil? + query_params[:'filter[creator_ids]'] = @api_client.build_collection_param(opts[:'filter_creator_ids'], :multi) if !opts[:'filter_creator_ids'].nil? + query_params[:'filter[search]'] = opts[:'filter_search'] if !opts[:'filter_search'].nil? + query_params[:'sort'] = @api_client.build_collection_param(opts[:'sort'], :multi) if !opts[:'sort'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ListConnectionGroupsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_connection_groups, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + new_options[:query_string_normalizer] = HTTParty::Request::NON_RAILS_QUERY_STRING_NORMALIZER + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ActionConnectionAPI#list_connection_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Register a new App Key. # # @see #register_app_key_with_http_info @@ -550,5 +720,83 @@ def update_action_connection_with_http_info(connection_id, body, opts = {}) end return data, status_code, headers end + + # Update a connection group. + # + # @see #update_connection_group_with_http_info + def update_connection_group(connection_group_id, body, opts = {}) + data, _status_code, _headers = update_connection_group_with_http_info(connection_group_id, body, opts) + data + end + + # Update a connection group. + # + # Update an existing connection group by ID. This endpoint allows updating the name, description, tag keys, integration type, connections, and policy attributes of a connection group. + # + # @param connection_group_id [String] The ID of the connection group. + # @param body [UpdateConnectionGroupRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(UpdateConnectionGroupResponse, Integer, Hash)>] UpdateConnectionGroupResponse data, response status code and response headers + def update_connection_group_with_http_info(connection_group_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.update_connection_group".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_connection_group") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_connection_group")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ActionConnectionAPI.update_connection_group ...' + end + # verify the required parameter 'connection_group_id' is set + if @api_client.config.client_side_validation && connection_group_id.nil? + fail ArgumentError, "Missing the required parameter 'connection_group_id' when calling ActionConnectionAPI.update_connection_group" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling ActionConnectionAPI.update_connection_group" + end + # resource path + local_var_path = '/api/v2/actions/connections/groups/{connection_group_id}'.sub('{connection_group_id}', CGI.escape(connection_group_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'UpdateConnectionGroupResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :update_connection_group, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ActionConnectionAPI#update_connection_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end end end diff --git a/lib/datadog_api_client/v2/models/aws_secret_manager.rb b/lib/datadog_api_client/v2/models/aws_secret_manager.rb new file mode 100644 index 000000000000..852fc23a74b7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aws_secret_manager.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # AWS Secrets Manager configuration. + class AWSSecretManager + include BaseGenericModel + + # The ID of the connection used to access AWS Secrets Manager. + attr_reader :connection_id + + # The AWS region where the secret is stored. + attr_reader :region + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'connection_id' => :'connection_id', + :'region' => :'region' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'connection_id' => :'UUID', + :'region' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AWSSecretManager` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'connection_id') + self.connection_id = attributes[:'connection_id'] + end + + if attributes.key?(:'region') + self.region = attributes[:'region'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @connection_id.nil? + return false if @region.nil? + true + end + + # Custom attribute writer method with validation + # @param connection_id [Object] Object to be assigned + # @!visibility private + def connection_id=(connection_id) + if connection_id.nil? + fail ArgumentError, 'invalid value for "connection_id", connection_id cannot be nil.' + end + @connection_id = connection_id + end + + # Custom attribute writer method with validation + # @param region [Object] Object to be assigned + # @!visibility private + def region=(region) + if region.nil? + fail ArgumentError, 'invalid value for "region", region cannot be nil.' + end + @region = region + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + connection_id == o.connection_id && + region == o.region && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [connection_id, region, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/connection_data_attributes_response.rb b/lib/datadog_api_client/v2/models/connection_data_attributes_response.rb new file mode 100644 index 000000000000..e7401d6d0dbb --- /dev/null +++ b/lib/datadog_api_client/v2/models/connection_data_attributes_response.rb @@ -0,0 +1,279 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of an action connection. + class ConnectionDataAttributesResponse + include BaseGenericModel + + # Indicates if the acting user can resolve the connection. + attr_reader :acting_user_can_resolve + + # The creation timestamp of the connection. + attr_accessor :created_at + + # Information about the user who created the resource. + attr_accessor :created_by + + # The description of the connection. + attr_accessor :description + + # External secrets manager configuration. + attr_reader :external_secrets_manager + + # Integration configuration details. + attr_reader :integration + + # Indicates if the connection is marked as favorite. + attr_reader :is_favorite + + # The last updated timestamp of the connection. + attr_accessor :last_updated + + # The name of the connection. + attr_reader :name + + # Information about the private actions runner. + attr_accessor :private_actions_runner + + # The ID of the runner associated with the connection. + attr_accessor :runner_id + + # Tags associated with the connection. + attr_accessor :tags + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'acting_user_can_resolve' => :'acting_user_can_resolve', + :'created_at' => :'created_at', + :'created_by' => :'created_by', + :'description' => :'description', + :'external_secrets_manager' => :'external_secrets_manager', + :'integration' => :'integration', + :'is_favorite' => :'is_favorite', + :'last_updated' => :'last_updated', + :'name' => :'name', + :'private_actions_runner' => :'private_actions_runner', + :'runner_id' => :'runner_id', + :'tags' => :'tags' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'acting_user_can_resolve' => :'Boolean', + :'created_at' => :'Time', + :'created_by' => :'CreatedBy', + :'description' => :'String', + :'external_secrets_manager' => :'ExternalSecretsManager', + :'integration' => :'Object', + :'is_favorite' => :'Boolean', + :'last_updated' => :'Time', + :'name' => :'String', + :'private_actions_runner' => :'PrivateActionsRunner', + :'runner_id' => :'String', + :'tags' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConnectionDataAttributesResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'acting_user_can_resolve') + self.acting_user_can_resolve = attributes[:'acting_user_can_resolve'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'created_by') + self.created_by = attributes[:'created_by'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'external_secrets_manager') + self.external_secrets_manager = attributes[:'external_secrets_manager'] + end + + if attributes.key?(:'integration') + self.integration = attributes[:'integration'] + end + + if attributes.key?(:'is_favorite') + self.is_favorite = attributes[:'is_favorite'] + end + + if attributes.key?(:'last_updated') + self.last_updated = attributes[:'last_updated'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'private_actions_runner') + self.private_actions_runner = attributes[:'private_actions_runner'] + end + + if attributes.key?(:'runner_id') + self.runner_id = attributes[:'runner_id'] + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @acting_user_can_resolve.nil? + return false if @external_secrets_manager.nil? + return false if @integration.nil? + return false if @is_favorite.nil? + return false if @name.nil? + true + end + + # Custom attribute writer method with validation + # @param acting_user_can_resolve [Object] Object to be assigned + # @!visibility private + def acting_user_can_resolve=(acting_user_can_resolve) + if acting_user_can_resolve.nil? + fail ArgumentError, 'invalid value for "acting_user_can_resolve", acting_user_can_resolve cannot be nil.' + end + @acting_user_can_resolve = acting_user_can_resolve + end + + # Custom attribute writer method with validation + # @param external_secrets_manager [Object] Object to be assigned + # @!visibility private + def external_secrets_manager=(external_secrets_manager) + if external_secrets_manager.nil? + fail ArgumentError, 'invalid value for "external_secrets_manager", external_secrets_manager cannot be nil.' + end + @external_secrets_manager = external_secrets_manager + end + + # Custom attribute writer method with validation + # @param integration [Object] Object to be assigned + # @!visibility private + def integration=(integration) + if integration.nil? + fail ArgumentError, 'invalid value for "integration", integration cannot be nil.' + end + @integration = integration + end + + # Custom attribute writer method with validation + # @param is_favorite [Object] Object to be assigned + # @!visibility private + def is_favorite=(is_favorite) + if is_favorite.nil? + fail ArgumentError, 'invalid value for "is_favorite", is_favorite cannot be nil.' + end + @is_favorite = is_favorite + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + acting_user_can_resolve == o.acting_user_can_resolve && + created_at == o.created_at && + created_by == o.created_by && + description == o.description && + external_secrets_manager == o.external_secrets_manager && + integration == o.integration && + is_favorite == o.is_favorite && + last_updated == o.last_updated && + name == o.name && + private_actions_runner == o.private_actions_runner && + runner_id == o.runner_id && + tags == o.tags && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [acting_user_can_resolve, created_at, created_by, description, external_secrets_manager, integration, is_favorite, last_updated, name, private_actions_runner, runner_id, tags, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/connection_data_response.rb b/lib/datadog_api_client/v2/models/connection_data_response.rb new file mode 100644 index 000000000000..40810c6d91b1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/connection_data_response.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data object for an action connection. + class ConnectionDataResponse + include BaseGenericModel + + # Attributes of an action connection. + attr_reader :attributes + + # The unique identifier of the connection. + attr_reader :id + + # The definition of `ActionConnectionDataType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'ConnectionDataAttributesResponse', + :'id' => :'String', + :'type' => :'ActionConnectionDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConnectionDataResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/connection_group_data_attributes_request.rb b/lib/datadog_api_client/v2/models/connection_group_data_attributes_request.rb new file mode 100644 index 000000000000..7a2021812200 --- /dev/null +++ b/lib/datadog_api_client/v2/models/connection_group_data_attributes_request.rb @@ -0,0 +1,159 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for updating a connection group. + class ConnectionGroupDataAttributesRequest + include BaseGenericModel + + # List of connection IDs associated with the connection group. + attr_accessor :connections + + # The description of the connection group. + attr_accessor :description + + # The integration type of the connection group. + attr_accessor :integration_type + + # The name of the connection group. + attr_accessor :name + + # Policy attributes for the connection group. + attr_accessor :policy_attributes + + # Tag keys associated with the connection group. + attr_accessor :tag_keys + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'connections' => :'connections', + :'description' => :'description', + :'integration_type' => :'integration_type', + :'name' => :'name', + :'policy_attributes' => :'policy_attributes', + :'tag_keys' => :'tag_keys' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'connections' => :'Array', + :'description' => :'String', + :'integration_type' => :'String', + :'name' => :'String', + :'policy_attributes' => :'String', + :'tag_keys' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConnectionGroupDataAttributesRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'connections') + if (value = attributes[:'connections']).is_a?(Array) + self.connections = value + end + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'integration_type') + self.integration_type = attributes[:'integration_type'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'policy_attributes') + self.policy_attributes = attributes[:'policy_attributes'] + end + + if attributes.key?(:'tag_keys') + if (value = attributes[:'tag_keys']).is_a?(Array) + self.tag_keys = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + connections == o.connections && + description == o.description && + integration_type == o.integration_type && + name == o.name && + policy_attributes == o.policy_attributes && + tag_keys == o.tag_keys && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [connections, description, integration_type, name, policy_attributes, tag_keys, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/connection_group_data_attributes_response.rb b/lib/datadog_api_client/v2/models/connection_group_data_attributes_response.rb new file mode 100644 index 000000000000..cbc686e3a236 --- /dev/null +++ b/lib/datadog_api_client/v2/models/connection_group_data_attributes_response.rb @@ -0,0 +1,252 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a connection group. + class ConnectionGroupDataAttributesResponse + include BaseGenericModel + + # List of connection IDs associated with the connection group. + attr_accessor :connections + + # The creation timestamp of the connection group. + attr_reader :created_at + + # The description of the connection group. + attr_accessor :description + + # The integration type of the connection group. + attr_reader :integration_type + + # Indicates if the connection group is marked as favorite. + attr_reader :is_favorite + + # The last updated timestamp of the connection group. + attr_reader :last_updated_at + + # The name of the connection group. + attr_reader :name + + # Tag keys associated with the connection group. + attr_reader :tag_keys + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'connections' => :'connections', + :'created_at' => :'created_at', + :'description' => :'description', + :'integration_type' => :'integration_type', + :'is_favorite' => :'is_favorite', + :'last_updated_at' => :'last_updated_at', + :'name' => :'name', + :'tag_keys' => :'tag_keys' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'connections' => :'Array', + :'created_at' => :'Time', + :'description' => :'String', + :'integration_type' => :'String', + :'is_favorite' => :'Boolean', + :'last_updated_at' => :'Time', + :'name' => :'String', + :'tag_keys' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConnectionGroupDataAttributesResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'connections') + if (value = attributes[:'connections']).is_a?(Array) + self.connections = value + end + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'integration_type') + self.integration_type = attributes[:'integration_type'] + end + + if attributes.key?(:'is_favorite') + self.is_favorite = attributes[:'is_favorite'] + end + + if attributes.key?(:'last_updated_at') + self.last_updated_at = attributes[:'last_updated_at'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'tag_keys') + if (value = attributes[:'tag_keys']).is_a?(Array) + self.tag_keys = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @created_at.nil? + return false if @integration_type.nil? + return false if @is_favorite.nil? + return false if @last_updated_at.nil? + return false if @name.nil? + return false if @tag_keys.nil? + true + end + + # Custom attribute writer method with validation + # @param created_at [Object] Object to be assigned + # @!visibility private + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'invalid value for "created_at", created_at cannot be nil.' + end + @created_at = created_at + end + + # Custom attribute writer method with validation + # @param integration_type [Object] Object to be assigned + # @!visibility private + def integration_type=(integration_type) + if integration_type.nil? + fail ArgumentError, 'invalid value for "integration_type", integration_type cannot be nil.' + end + @integration_type = integration_type + end + + # Custom attribute writer method with validation + # @param is_favorite [Object] Object to be assigned + # @!visibility private + def is_favorite=(is_favorite) + if is_favorite.nil? + fail ArgumentError, 'invalid value for "is_favorite", is_favorite cannot be nil.' + end + @is_favorite = is_favorite + end + + # Custom attribute writer method with validation + # @param last_updated_at [Object] Object to be assigned + # @!visibility private + def last_updated_at=(last_updated_at) + if last_updated_at.nil? + fail ArgumentError, 'invalid value for "last_updated_at", last_updated_at cannot be nil.' + end + @last_updated_at = last_updated_at + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param tag_keys [Object] Object to be assigned + # @!visibility private + def tag_keys=(tag_keys) + if tag_keys.nil? + fail ArgumentError, 'invalid value for "tag_keys", tag_keys cannot be nil.' + end + @tag_keys = tag_keys + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + connections == o.connections && + created_at == o.created_at && + description == o.description && + integration_type == o.integration_type && + is_favorite == o.is_favorite && + last_updated_at == o.last_updated_at && + name == o.name && + tag_keys == o.tag_keys && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [connections, created_at, description, integration_type, is_favorite, last_updated_at, name, tag_keys, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/connection_group_data_request.rb b/lib/datadog_api_client/v2/models/connection_group_data_request.rb new file mode 100644 index 000000000000..580eeb683f39 --- /dev/null +++ b/lib/datadog_api_client/v2/models/connection_group_data_request.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data object for updating a connection group. + class ConnectionGroupDataRequest + include BaseGenericModel + + # Attributes for updating a connection group. + attr_accessor :attributes + + # The definition of `ConnectionGroupType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'ConnectionGroupDataAttributesRequest', + :'type' => :'ConnectionGroupType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConnectionGroupDataRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/connection_group_data_response.rb b/lib/datadog_api_client/v2/models/connection_group_data_response.rb new file mode 100644 index 000000000000..83433d8d30f6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/connection_group_data_response.rb @@ -0,0 +1,175 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data object for a connection group. + class ConnectionGroupDataResponse + include BaseGenericModel + + # Attributes of a connection group. + attr_reader :attributes + + # The unique identifier of the connection group. + attr_reader :id + + # Relationships for a connection group. + attr_accessor :relationships + + # The definition of `ConnectionGroupType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'relationships' => :'relationships', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'ConnectionGroupDataAttributesResponse', + :'id' => :'String', + :'relationships' => :'ConnectionGroupRelationships', + :'type' => :'ConnectionGroupType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConnectionGroupDataResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'relationships') + self.relationships = attributes[:'relationships'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + relationships == o.relationships && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, relationships, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/connection_group_relationships.rb b/lib/datadog_api_client/v2/models/connection_group_relationships.rb new file mode 100644 index 000000000000..78310343c7f9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/connection_group_relationships.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Relationships for a connection group. + class ConnectionGroupRelationships + include BaseGenericModel + + # Relationship to the user who created the resource. + attr_accessor :created_by + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created_by' => :'created_by' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created_by' => :'CreatedByRelationship' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConnectionGroupRelationships` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'created_by') + self.created_by = attributes[:'created_by'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + created_by == o.created_by && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [created_by, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/connection_group_type.rb b/lib/datadog_api_client/v2/models/connection_group_type.rb new file mode 100644 index 000000000000..646295a92f1a --- /dev/null +++ b/lib/datadog_api_client/v2/models/connection_group_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `ConnectionGroupType` object. + class ConnectionGroupType + include BaseEnumModel + + CONNECTION_GROUP = "connection_group".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/created_by.rb b/lib/datadog_api_client/v2/models/created_by.rb new file mode 100644 index 000000000000..23637792a6b8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/created_by.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Information about the user who created the resource. + class CreatedBy + include BaseGenericModel + + # The unique identifier of the user. + attr_reader :id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreatedBy` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/created_by_relationship.rb b/lib/datadog_api_client/v2/models/created_by_relationship.rb new file mode 100644 index 000000000000..46e07f8f9fad --- /dev/null +++ b/lib/datadog_api_client/v2/models/created_by_relationship.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Relationship to the user who created the resource. + class CreatedByRelationship + include BaseGenericModel + + # Data for the created_by relationship. + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'CreatedByRelationshipData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreatedByRelationship` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/created_by_relationship_data.rb b/lib/datadog_api_client/v2/models/created_by_relationship_data.rb new file mode 100644 index 000000000000..2b4b2d0ab5c3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/created_by_relationship_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data for the created_by relationship. + class CreatedByRelationshipData + include BaseGenericModel + + # The unique identifier of the user. + attr_reader :id + + # The type of the relationship. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreatedByRelationshipData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/external_secrets_manager.rb b/lib/datadog_api_client/v2/models/external_secrets_manager.rb new file mode 100644 index 000000000000..6cfb3ba2d6db --- /dev/null +++ b/lib/datadog_api_client/v2/models/external_secrets_manager.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # External secrets manager configuration. + module ExternalSecretsManager + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'ExternalSecretsManagerOneOf' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/external_secrets_manager_one_of.rb b/lib/datadog_api_client/v2/models/external_secrets_manager_one_of.rb new file mode 100644 index 000000000000..36b7d6361744 --- /dev/null +++ b/lib/datadog_api_client/v2/models/external_secrets_manager_one_of.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class ExternalSecretsManagerOneOf + include BaseGenericModel + + # AWS Secrets Manager configuration. + attr_reader :aws + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'aws' => :'aws' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'aws' => :'AWSSecretManager' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ExternalSecretsManagerOneOf` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'aws') + self.aws = attributes[:'aws'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @aws.nil? + true + end + + # Custom attribute writer method with validation + # @param aws [Object] Object to be assigned + # @!visibility private + def aws=(aws) + if aws.nil? + fail ArgumentError, 'invalid value for "aws", aws cannot be nil.' + end + @aws = aws + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + aws == o.aws && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [aws, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/integration_counts.rb b/lib/datadog_api_client/v2/models/integration_counts.rb new file mode 100644 index 000000000000..1e6be5d386eb --- /dev/null +++ b/lib/datadog_api_client/v2/models/integration_counts.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Count of integrations by type. + class IntegrationCounts + include BaseGenericModel + + # The filtered count of integrations. + attr_accessor :filtered_count + + # The integration type. + attr_accessor :integration_type + + # The total count of integrations. + attr_accessor :total_count + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'filtered_count' => :'filtered_count', + :'integration_type' => :'integration_type', + :'total_count' => :'total_count' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'filtered_count' => :'Integer', + :'integration_type' => :'String', + :'total_count' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IntegrationCounts` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'filtered_count') + self.filtered_count = attributes[:'filtered_count'] + end + + if attributes.key?(:'integration_type') + self.integration_type = attributes[:'integration_type'] + end + + if attributes.key?(:'total_count') + self.total_count = attributes[:'total_count'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + filtered_count == o.filtered_count && + integration_type == o.integration_type && + total_count == o.total_count && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [filtered_count, integration_type, total_count, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/list_action_connections_response.rb b/lib/datadog_api_client/v2/models/list_action_connections_response.rb new file mode 100644 index 000000000000..f576f1b0d38b --- /dev/null +++ b/lib/datadog_api_client/v2/models/list_action_connections_response.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response for listing action connections. + class ListActionConnectionsResponse + include BaseGenericModel + + # An array of action connections. + attr_reader :data + + # Metadata for the list connections response. + attr_accessor :meta + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'meta' => :'meta' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array', + :'meta' => :'ListActionConnectionsResponseMeta' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListActionConnectionsResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + meta == o.meta && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, meta, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/list_action_connections_response_meta.rb b/lib/datadog_api_client/v2/models/list_action_connections_response_meta.rb new file mode 100644 index 000000000000..94d2d914b060 --- /dev/null +++ b/lib/datadog_api_client/v2/models/list_action_connections_response_meta.rb @@ -0,0 +1,164 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Metadata for the list connections response. + class ListActionConnectionsResponseMeta + include BaseGenericModel + + # Count of integrations by type. + attr_accessor :integration_counts + + # The total number of connections. + attr_reader :total + + # The total number of connections that match the specified filters. + attr_reader :total_filtered + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'integration_counts' => :'integration_counts', + :'total' => :'total', + :'total_filtered' => :'total_filtered' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'integration_counts' => :'Array', + :'total' => :'Integer', + :'total_filtered' => :'Integer' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'integration_counts', + ]) + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListActionConnectionsResponseMeta` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'integration_counts') + if (value = attributes[:'integration_counts']).is_a?(Array) + self.integration_counts = value + end + end + + if attributes.key?(:'total') + self.total = attributes[:'total'] + end + + if attributes.key?(:'total_filtered') + self.total_filtered = attributes[:'total_filtered'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @total.nil? + return false if @total_filtered.nil? + true + end + + # Custom attribute writer method with validation + # @param total [Object] Object to be assigned + # @!visibility private + def total=(total) + if total.nil? + fail ArgumentError, 'invalid value for "total", total cannot be nil.' + end + @total = total + end + + # Custom attribute writer method with validation + # @param total_filtered [Object] Object to be assigned + # @!visibility private + def total_filtered=(total_filtered) + if total_filtered.nil? + fail ArgumentError, 'invalid value for "total_filtered", total_filtered cannot be nil.' + end + @total_filtered = total_filtered + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + integration_counts == o.integration_counts && + total == o.total && + total_filtered == o.total_filtered && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [integration_counts, total, total_filtered, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/list_connection_groups_response.rb b/lib/datadog_api_client/v2/models/list_connection_groups_response.rb new file mode 100644 index 000000000000..86d133d8e4e2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/list_connection_groups_response.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response for listing connection groups. + class ListConnectionGroupsResponse + include BaseGenericModel + + # An array of connection groups. + attr_reader :data + + # Metadata for the list connection groups response. + attr_accessor :meta + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'meta' => :'meta' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array', + :'meta' => :'ListConnectionGroupsResponseMeta' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListConnectionGroupsResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + meta == o.meta && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, meta, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/list_connection_groups_response_meta.rb b/lib/datadog_api_client/v2/models/list_connection_groups_response_meta.rb new file mode 100644 index 000000000000..f7a43b02383a --- /dev/null +++ b/lib/datadog_api_client/v2/models/list_connection_groups_response_meta.rb @@ -0,0 +1,164 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Metadata for the list connection groups response. + class ListConnectionGroupsResponseMeta + include BaseGenericModel + + # Count of integrations by type. + attr_accessor :integration_counts + + # The total number of connection groups. + attr_reader :total + + # The total number of connection groups that match the specified filters. + attr_reader :total_filtered + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'integration_counts' => :'integration_counts', + :'total' => :'total', + :'total_filtered' => :'total_filtered' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'integration_counts' => :'Array', + :'total' => :'Integer', + :'total_filtered' => :'Integer' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'integration_counts', + ]) + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListConnectionGroupsResponseMeta` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'integration_counts') + if (value = attributes[:'integration_counts']).is_a?(Array) + self.integration_counts = value + end + end + + if attributes.key?(:'total') + self.total = attributes[:'total'] + end + + if attributes.key?(:'total_filtered') + self.total_filtered = attributes[:'total_filtered'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @total.nil? + return false if @total_filtered.nil? + true + end + + # Custom attribute writer method with validation + # @param total [Object] Object to be assigned + # @!visibility private + def total=(total) + if total.nil? + fail ArgumentError, 'invalid value for "total", total cannot be nil.' + end + @total = total + end + + # Custom attribute writer method with validation + # @param total_filtered [Object] Object to be assigned + # @!visibility private + def total_filtered=(total_filtered) + if total_filtered.nil? + fail ArgumentError, 'invalid value for "total_filtered", total_filtered cannot be nil.' + end + @total_filtered = total_filtered + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + integration_counts == o.integration_counts && + total == o.total && + total_filtered == o.total_filtered && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [integration_counts, total, total_filtered, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/private_actions_runner.rb b/lib/datadog_api_client/v2/models/private_actions_runner.rb new file mode 100644 index 000000000000..6ad10ae6b45d --- /dev/null +++ b/lib/datadog_api_client/v2/models/private_actions_runner.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Information about the private actions runner. + class PrivateActionsRunner + include BaseGenericModel + + # The unique identifier of the runner. + attr_reader :id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PrivateActionsRunner` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_connection_group_request.rb b/lib/datadog_api_client/v2/models/update_connection_group_request.rb new file mode 100644 index 000000000000..169ad1d95af9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_connection_group_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request for updating a connection group. + class UpdateConnectionGroupRequest + include BaseGenericModel + + # Data object for updating a connection group. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'ConnectionGroupDataRequest' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UpdateConnectionGroupRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_connection_group_response.rb b/lib/datadog_api_client/v2/models/update_connection_group_response.rb new file mode 100644 index 000000000000..48cb116e28e3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_connection_group_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response for updating a connection group. + class UpdateConnectionGroupResponse + include BaseGenericModel + + # Data object for a connection group. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'ConnectionGroupDataResponse' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UpdateConnectionGroupResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end