diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml
index a8908359f48..c3ecc0f72ec 100644
--- a/.generator/schemas/v2/openapi.yaml
+++ b/.generator/schemas/v2/openapi.yaml
@@ -1161,6 +1161,14 @@ components:
example: 1706803070
format: int64
type: integer
+ TokenHashParam:
+ description: The enrollment token hash.
+ in: path
+ name: token_hash
+ required: true
+ schema:
+ example: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ type: string
UserID:
description: The ID of the user.
in: path
@@ -43316,6 +43324,276 @@ components:
type: string
x-enum-varnames:
- ON_DEMAND_CONCURRENCY_CAP
+ OnPremManagementServiceCreateEnrollmentRequest:
+ description: Request to create an enrollment for an on-prem runner.
+ properties:
+ data:
+ $ref: '#/components/schemas/OnPremManagementServiceEnrollmentDataRequest'
+ required:
+ - data
+ type: object
+ OnPremManagementServiceCreateEnrollmentResponse:
+ description: Response for creating an enrollment.
+ properties:
+ data:
+ $ref: '#/components/schemas/OnPremManagementServiceCreateEnrollmentResponseData'
+ required:
+ - data
+ type: object
+ OnPremManagementServiceCreateEnrollmentResponseAttributes:
+ description: Attributes for the created enrollment.
+ properties:
+ token:
+ description: The enrollment token.
+ example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
+ type: string
+ required:
+ - token
+ type: object
+ OnPremManagementServiceCreateEnrollmentResponseData:
+ description: Data for the created enrollment.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/OnPremManagementServiceCreateEnrollmentResponseAttributes'
+ id:
+ description: The token hash identifier.
+ example: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ type: string
+ type:
+ $ref: '#/components/schemas/OnPremManagementServiceCreateEnrollmentResponseType'
+ required:
+ - id
+ - type
+ - attributes
+ type: object
+ OnPremManagementServiceCreateEnrollmentResponseType:
+ description: The type of the resource. The value should always be createEnrollmentResponse.
+ enum:
+ - createEnrollmentResponse
+ example: createEnrollmentResponse
+ type: string
+ x-enum-varnames:
+ - CREATEENROLLMENTRESPONSE
+ OnPremManagementServiceEnrollmentAttributes:
+ description: Attributes for creating an enrollment.
+ properties:
+ actions_allowlist:
+ description: List of allowed actions for the runner.
+ example:
+ - com.datadoghq.jenkins.*
+ items:
+ type: string
+ type: array
+ runner_host:
+ description: The hostname for the runner. Required when push mode is enabled.
+ example: runner.example.com
+ type: string
+ runner_modes:
+ description: The modes the runner should operate in.
+ example:
+ - workflow_automation
+ items:
+ $ref: '#/components/schemas/OnPremManagementServiceEnrollmentAttributesRunnerModesItems'
+ type: array
+ runner_name:
+ description: The name of the on-prem runner.
+ example: my-runner
+ type: string
+ required:
+ - runner_name
+ - runner_modes
+ - actions_allowlist
+ type: object
+ OnPremManagementServiceEnrollmentAttributesRunnerModesItems:
+ enum:
+ - workflow_automation
+ - app_builder
+ type: string
+ x-enum-varnames:
+ - WORKFLOW_AUTOMATION
+ - APP_BUILDER
+ OnPremManagementServiceEnrollmentDataRequest:
+ description: Data for creating an enrollment.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/OnPremManagementServiceEnrollmentAttributes'
+ type:
+ $ref: '#/components/schemas/OnPremManagementServiceEnrollmentType'
+ required:
+ - type
+ - attributes
+ type: object
+ OnPremManagementServiceEnrollmentType:
+ description: The type of the resource. The value should always be enrollment.
+ enum:
+ - enrollment
+ example: enrollment
+ type: string
+ x-enum-varnames:
+ - ENROLLMENT
+ OnPremManagementServiceGetEnrollmentResponse:
+ description: Response for getting an enrollment status.
+ properties:
+ data:
+ $ref: '#/components/schemas/OnPremManagementServiceGetEnrollmentResponseData'
+ required:
+ - data
+ type: object
+ OnPremManagementServiceGetEnrollmentResponseAttributes:
+ description: Attributes for the enrollment status.
+ properties:
+ failure_reason:
+ description: The reason for enrollment failure, if applicable.
+ example: ''
+ type: string
+ runner_id:
+ description: The runner identifier, if enrollment was successful.
+ example: runner-GBUyh2Tm6oKS6ap4kt8Bbx
+ type: string
+ status:
+ $ref: '#/components/schemas/OnPremManagementServiceGetEnrollmentResponseAttributesStatus'
+ required:
+ - status
+ - failure_reason
+ - runner_id
+ type: object
+ OnPremManagementServiceGetEnrollmentResponseAttributesStatus:
+ description: The status of the enrollment.
+ enum:
+ - new
+ - success
+ - failed
+ example: success
+ type: string
+ x-enum-varnames:
+ - NEW
+ - SUCCESS
+ - FAILED
+ OnPremManagementServiceGetEnrollmentResponseData:
+ description: Data for the enrollment status.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/OnPremManagementServiceGetEnrollmentResponseAttributes'
+ id:
+ description: The token hash identifier.
+ example: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ type: string
+ type:
+ $ref: '#/components/schemas/OnPremManagementServiceGetEnrollmentResponseType'
+ required:
+ - id
+ - type
+ - attributes
+ type: object
+ OnPremManagementServiceGetEnrollmentResponseType:
+ description: The type of the resource. The value should always be getEnrollmentResponse.
+ enum:
+ - getEnrollmentResponse
+ example: getEnrollmentResponse
+ type: string
+ x-enum-varnames:
+ - GETENROLLMENTRESPONSE
+ OnPremManagementServiceRegisterTokenAttributes:
+ description: Attributes for registering a token.
+ properties:
+ app_id:
+ description: The application identifier.
+ example: 9a93d314-ca37-461d-b18e-0587f03c6e2a
+ format: uuid
+ type: string
+ app_version:
+ description: The application version.
+ example: 5
+ format: int64
+ type: integer
+ connection_id:
+ description: The connection identifier.
+ example: 2f66ec56-d1f3-4a18-908d-5e8c12dfb3b0
+ format: uuid
+ type: string
+ query_id:
+ description: The query identifier.
+ example: 8744d459-18aa-405b-821e-df9bb101c01e
+ format: uuid
+ type: string
+ runner_id:
+ description: The on-prem runner identifier.
+ example: runner-GBUyh2Tm6oKS6ap4kt8Bbx
+ type: string
+ required:
+ - runner_id
+ - connection_id
+ type: object
+ OnPremManagementServiceRegisterTokenDataRequest:
+ description: Data for registering a token.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/OnPremManagementServiceRegisterTokenAttributes'
+ type:
+ $ref: '#/components/schemas/OnPremManagementServiceRegisterTokenType'
+ required:
+ - type
+ - attributes
+ type: object
+ OnPremManagementServiceRegisterTokenRequest:
+ description: Request to register a token for query execution.
+ properties:
+ data:
+ $ref: '#/components/schemas/OnPremManagementServiceRegisterTokenDataRequest'
+ required:
+ - data
+ type: object
+ OnPremManagementServiceRegisterTokenResponse:
+ description: Response for registering a token.
+ properties:
+ data:
+ $ref: '#/components/schemas/OnPremManagementServiceRegisterTokenResponseData'
+ required:
+ - data
+ type: object
+ OnPremManagementServiceRegisterTokenResponseAttributes:
+ description: Attributes for the registered token.
+ properties:
+ token_string:
+ description: The token string.
+ example: token123
+ type: string
+ required:
+ - token_string
+ type: object
+ OnPremManagementServiceRegisterTokenResponseData:
+ description: Data for the registered token.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/OnPremManagementServiceRegisterTokenResponseAttributes'
+ id:
+ description: The token identifier.
+ example: 88a1d16d-3ebc-4ca1-9f3e-d7ab7b34c6df
+ format: uuid
+ type: string
+ type:
+ $ref: '#/components/schemas/OnPremManagementServiceRegisterTokenResponseType'
+ required:
+ - id
+ - type
+ - attributes
+ type: object
+ OnPremManagementServiceRegisterTokenResponseType:
+ description: The type of the resource. The value should always be tokenDefinitions.
+ enum:
+ - tokenDefinitions
+ example: tokenDefinitions
+ type: string
+ x-enum-varnames:
+ - TOKENDEFINITIONS
+ OnPremManagementServiceRegisterTokenType:
+ description: The type of the resource. The value should always be registerTokenRequest.
+ enum:
+ - registerTokenRequest
+ example: registerTokenRequest
+ type: string
+ x-enum-varnames:
+ - REGISTERTOKENREQUEST
OpenAIAPIKey:
description: The definition of the `OpenAIAPIKey` object.
properties:
@@ -86762,6 +87040,175 @@ paths:
operator: OR
permissions:
- on_call_read
+ /api/v2/on-prem-management-service/enrollments:
+ post:
+ description: Create a new enrollment for an on-prem runner. This endpoint initiates
+ the enrollment process and returns a token that the runner will use to complete
+ the enrollment.
+ operationId: CreateOnPremManagementServiceEnrollment
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OnPremManagementServiceCreateEnrollmentRequest'
+ required: true
+ responses:
+ '201':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OnPremManagementServiceCreateEnrollmentResponse'
+ description: Created
+ '400':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Bad Request
+ '401':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Unauthorized
+ '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
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ summary: Create an enrollment
+ tags:
+ - On Prem Management Service
+ 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/on-prem-management-service/enrollments/{token_hash}:
+ get:
+ description: Get the status of an enrollment for an on-prem runner using the
+ enrollment token hash.
+ operationId: GetOnPremManagementServiceEnrollment
+ parameters:
+ - $ref: '#/components/parameters/TokenHashParam'
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OnPremManagementServiceGetEnrollmentResponse'
+ description: OK
+ '400':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Bad Request
+ '401':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Unauthorized
+ '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
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ summary: Get enrollment status
+ tags:
+ - On Prem Management Service
+ 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/on-prem-management-service/tokens/register:
+ post:
+ description: Register a token for query execution. This endpoint allows an on-prem
+ runner to register a token that will be used to execute queries on a specific
+ connection.
+ operationId: RegisterOnPremManagementServiceToken
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OnPremManagementServiceRegisterTokenRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OnPremManagementServiceRegisterTokenResponse'
+ description: OK
+ '400':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Bad Request
+ '401':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Unauthorized
+ '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
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ summary: Register a token
+ tags:
+ - On Prem Management Service
+ 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/org_configs:
get:
description: Returns all Org Configs (name, description, and value).
@@ -102697,6 +103144,10 @@ tags:
- description: Configure your [Datadog Okta integration](https://docs.datadoghq.com/integrations/okta/)
directly through the Datadog API.
name: Okta Integration
+- description: Manage on-premises runners for workflow automation and app builder.
+ Use these endpoints to enroll runners, check enrollment status, and register tokens
+ for query execution.
+ name: On Prem Management Service
- description: 'Configure your [Datadog On-Call](https://docs.datadoghq.com/service_management/on-call/)
directly through the Datadog API.'
diff --git a/examples/v2/on-prem-management-service/CreateOnPremManagementServiceEnrollment.java b/examples/v2/on-prem-management-service/CreateOnPremManagementServiceEnrollment.java
new file mode 100644
index 00000000000..94ffd615a68
--- /dev/null
+++ b/examples/v2/on-prem-management-service/CreateOnPremManagementServiceEnrollment.java
@@ -0,0 +1,49 @@
+// Create an enrollment returns "Created" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.OnPremManagementServiceApi;
+import com.datadog.api.client.v2.model.OnPremManagementServiceCreateEnrollmentRequest;
+import com.datadog.api.client.v2.model.OnPremManagementServiceCreateEnrollmentResponse;
+import com.datadog.api.client.v2.model.OnPremManagementServiceEnrollmentAttributes;
+import com.datadog.api.client.v2.model.OnPremManagementServiceEnrollmentAttributesRunnerModesItems;
+import com.datadog.api.client.v2.model.OnPremManagementServiceEnrollmentDataRequest;
+import com.datadog.api.client.v2.model.OnPremManagementServiceEnrollmentType;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.createOnPremManagementServiceEnrollment", true);
+ OnPremManagementServiceApi apiInstance = new OnPremManagementServiceApi(defaultClient);
+
+ OnPremManagementServiceCreateEnrollmentRequest body =
+ new OnPremManagementServiceCreateEnrollmentRequest()
+ .data(
+ new OnPremManagementServiceEnrollmentDataRequest()
+ .attributes(
+ new OnPremManagementServiceEnrollmentAttributes()
+ .actionsAllowlist(Collections.singletonList("com.datadoghq.jenkins.*"))
+ .runnerHost("runner.example.com")
+ .runnerModes(
+ Collections.singletonList(
+ OnPremManagementServiceEnrollmentAttributesRunnerModesItems
+ .WORKFLOW_AUTOMATION))
+ .runnerName("my-runner"))
+ .type(OnPremManagementServiceEnrollmentType.ENROLLMENT));
+
+ try {
+ OnPremManagementServiceCreateEnrollmentResponse result =
+ apiInstance.createOnPremManagementServiceEnrollment(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println(
+ "Exception when calling"
+ + " OnPremManagementServiceApi#createOnPremManagementServiceEnrollment");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/on-prem-management-service/GetOnPremManagementServiceEnrollment.java b/examples/v2/on-prem-management-service/GetOnPremManagementServiceEnrollment.java
new file mode 100644
index 00000000000..d5a5110f070
--- /dev/null
+++ b/examples/v2/on-prem-management-service/GetOnPremManagementServiceEnrollment.java
@@ -0,0 +1,28 @@
+// Get enrollment status returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.OnPremManagementServiceApi;
+import com.datadog.api.client.v2.model.OnPremManagementServiceGetEnrollmentResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.getOnPremManagementServiceEnrollment", true);
+ OnPremManagementServiceApi apiInstance = new OnPremManagementServiceApi(defaultClient);
+
+ try {
+ OnPremManagementServiceGetEnrollmentResponse result =
+ apiInstance.getOnPremManagementServiceEnrollment(
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println(
+ "Exception when calling OnPremManagementServiceApi#getOnPremManagementServiceEnrollment");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/on-prem-management-service/RegisterOnPremManagementServiceToken.java b/examples/v2/on-prem-management-service/RegisterOnPremManagementServiceToken.java
new file mode 100644
index 00000000000..d9452a07457
--- /dev/null
+++ b/examples/v2/on-prem-management-service/RegisterOnPremManagementServiceToken.java
@@ -0,0 +1,45 @@
+// Register a token returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.OnPremManagementServiceApi;
+import com.datadog.api.client.v2.model.OnPremManagementServiceRegisterTokenAttributes;
+import com.datadog.api.client.v2.model.OnPremManagementServiceRegisterTokenDataRequest;
+import com.datadog.api.client.v2.model.OnPremManagementServiceRegisterTokenRequest;
+import com.datadog.api.client.v2.model.OnPremManagementServiceRegisterTokenResponse;
+import com.datadog.api.client.v2.model.OnPremManagementServiceRegisterTokenType;
+import java.util.UUID;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.registerOnPremManagementServiceToken", true);
+ OnPremManagementServiceApi apiInstance = new OnPremManagementServiceApi(defaultClient);
+
+ OnPremManagementServiceRegisterTokenRequest body =
+ new OnPremManagementServiceRegisterTokenRequest()
+ .data(
+ new OnPremManagementServiceRegisterTokenDataRequest()
+ .attributes(
+ new OnPremManagementServiceRegisterTokenAttributes()
+ .appId(UUID.fromString("9a93d314-ca37-461d-b18e-0587f03c6e2a"))
+ .appVersion(5L)
+ .connectionId(UUID.fromString("2f66ec56-d1f3-4a18-908d-5e8c12dfb3b0"))
+ .queryId(UUID.fromString("8744d459-18aa-405b-821e-df9bb101c01e"))
+ .runnerId("runner-GBUyh2Tm6oKS6ap4kt8Bbx"))
+ .type(OnPremManagementServiceRegisterTokenType.REGISTERTOKENREQUEST));
+
+ try {
+ OnPremManagementServiceRegisterTokenResponse result =
+ apiInstance.registerOnPremManagementServiceToken(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println(
+ "Exception when calling OnPremManagementServiceApi#registerOnPremManagementServiceToken");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java
index ed7b5418859..3fe7e869282 100644
--- a/src/main/java/com/datadog/api/client/ApiClient.java
+++ b/src/main/java/com/datadog/api/client/ApiClient.java
@@ -894,6 +894,9 @@ public class ApiClient {
put("v2.updateMonitorUserTemplate", false);
put("v2.validateExistingMonitorUserTemplate", false);
put("v2.validateMonitorUserTemplate", false);
+ put("v2.createOnPremManagementServiceEnrollment", false);
+ put("v2.getOnPremManagementServiceEnrollment", false);
+ put("v2.registerOnPremManagementServiceToken", false);
put("v2.listRoleTemplates", false);
put("v2.createConnection", false);
put("v2.deleteConnection", false);
diff --git a/src/main/java/com/datadog/api/client/v2/api/OnPremManagementServiceApi.java b/src/main/java/com/datadog/api/client/v2/api/OnPremManagementServiceApi.java
new file mode 100644
index 00000000000..ec6b0bb9394
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/api/OnPremManagementServiceApi.java
@@ -0,0 +1,542 @@
+package com.datadog.api.client.v2.api;
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.ApiResponse;
+import com.datadog.api.client.Pair;
+import com.datadog.api.client.v2.model.OnPremManagementServiceCreateEnrollmentRequest;
+import com.datadog.api.client.v2.model.OnPremManagementServiceCreateEnrollmentResponse;
+import com.datadog.api.client.v2.model.OnPremManagementServiceGetEnrollmentResponse;
+import com.datadog.api.client.v2.model.OnPremManagementServiceRegisterTokenRequest;
+import com.datadog.api.client.v2.model.OnPremManagementServiceRegisterTokenResponse;
+import jakarta.ws.rs.client.Invocation;
+import jakarta.ws.rs.core.GenericType;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.CompletableFuture;
+
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OnPremManagementServiceApi {
+ private ApiClient apiClient;
+
+ public OnPremManagementServiceApi() {
+ this(ApiClient.getDefaultApiClient());
+ }
+
+ public OnPremManagementServiceApi(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Get the API client.
+ *
+ * @return API client
+ */
+ public ApiClient getApiClient() {
+ return apiClient;
+ }
+
+ /**
+ * Set the API client.
+ *
+ * @param apiClient an instance of API client
+ */
+ public void setApiClient(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Create an enrollment.
+ *
+ *
See {@link #createOnPremManagementServiceEnrollmentWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return OnPremManagementServiceCreateEnrollmentResponse
+ * @throws ApiException if fails to make API call
+ */
+ public OnPremManagementServiceCreateEnrollmentResponse createOnPremManagementServiceEnrollment(
+ OnPremManagementServiceCreateEnrollmentRequest body) throws ApiException {
+ return createOnPremManagementServiceEnrollmentWithHttpInfo(body).getData();
+ }
+
+ /**
+ * Create an enrollment.
+ *
+ *
See {@link #createOnPremManagementServiceEnrollmentWithHttpInfoAsync}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<OnPremManagementServiceCreateEnrollmentResponse>
+ */
+ public CompletableFuture
+ createOnPremManagementServiceEnrollmentAsync(
+ OnPremManagementServiceCreateEnrollmentRequest body) {
+ return createOnPremManagementServiceEnrollmentWithHttpInfoAsync(body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Create a new enrollment for an on-prem runner. This endpoint initiates the enrollment process
+ * and returns a token that the runner will use to complete the enrollment.
+ *
+ * @param body (required)
+ * @return ApiResponse<OnPremManagementServiceCreateEnrollmentResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 201 | Created | - |
+ * | 400 | Bad Request | - |
+ * | 401 | Unauthorized | - |
+ * | 403 | Forbidden | - |
+ * | 429 | Too many requests | - |
+ * | 500 | Internal Server Error | - |
+ *
+ */
+ public ApiResponse
+ createOnPremManagementServiceEnrollmentWithHttpInfo(
+ OnPremManagementServiceCreateEnrollmentRequest body) throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "createOnPremManagementServiceEnrollment";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
+ }
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400,
+ "Missing the required parameter 'body' when calling"
+ + " createOnPremManagementServiceEnrollment");
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/on-prem-management-service/enrollments";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.OnPremManagementServiceApi.createOnPremManagementServiceEnrollment",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Create an enrollment.
+ *
+ * See {@link #createOnPremManagementServiceEnrollmentWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return
+ * CompletableFuture<ApiResponse<OnPremManagementServiceCreateEnrollmentResponse>>
+ */
+ public CompletableFuture>
+ createOnPremManagementServiceEnrollmentWithHttpInfoAsync(
+ OnPremManagementServiceCreateEnrollmentRequest body) {
+ // Check if unstable operation is enabled
+ String operationId = "createOnPremManagementServiceEnrollment";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
+ return result;
+ }
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'body' when calling"
+ + " createOnPremManagementServiceEnrollment"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/on-prem-management-service/enrollments";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.OnPremManagementServiceApi.createOnPremManagementServiceEnrollment",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Get enrollment status.
+ *
+ * See {@link #getOnPremManagementServiceEnrollmentWithHttpInfo}.
+ *
+ * @param tokenHash The enrollment token hash. (required)
+ * @return OnPremManagementServiceGetEnrollmentResponse
+ * @throws ApiException if fails to make API call
+ */
+ public OnPremManagementServiceGetEnrollmentResponse getOnPremManagementServiceEnrollment(
+ String tokenHash) throws ApiException {
+ return getOnPremManagementServiceEnrollmentWithHttpInfo(tokenHash).getData();
+ }
+
+ /**
+ * Get enrollment status.
+ *
+ *
See {@link #getOnPremManagementServiceEnrollmentWithHttpInfoAsync}.
+ *
+ * @param tokenHash The enrollment token hash. (required)
+ * @return CompletableFuture<OnPremManagementServiceGetEnrollmentResponse>
+ */
+ public CompletableFuture
+ getOnPremManagementServiceEnrollmentAsync(String tokenHash) {
+ return getOnPremManagementServiceEnrollmentWithHttpInfoAsync(tokenHash)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get the status of an enrollment for an on-prem runner using the enrollment token hash.
+ *
+ * @param tokenHash The enrollment token hash. (required)
+ * @return ApiResponse<OnPremManagementServiceGetEnrollmentResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 401 | Unauthorized | - |
+ * | 403 | Forbidden | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ * | 500 | Internal Server Error | - |
+ *
+ */
+ public ApiResponse
+ getOnPremManagementServiceEnrollmentWithHttpInfo(String tokenHash) throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "getOnPremManagementServiceEnrollment";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
+ }
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'tokenHash' is set
+ if (tokenHash == null) {
+ throw new ApiException(
+ 400,
+ "Missing the required parameter 'tokenHash' when calling"
+ + " getOnPremManagementServiceEnrollment");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/on-prem-management-service/enrollments/{token_hash}"
+ .replaceAll("\\{" + "token_hash" + "\\}", apiClient.escapeString(tokenHash.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.OnPremManagementServiceApi.getOnPremManagementServiceEnrollment",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Get enrollment status.
+ *
+ * See {@link #getOnPremManagementServiceEnrollmentWithHttpInfo}.
+ *
+ * @param tokenHash The enrollment token hash. (required)
+ * @return
+ * CompletableFuture<ApiResponse<OnPremManagementServiceGetEnrollmentResponse>>
+ */
+ public CompletableFuture>
+ getOnPremManagementServiceEnrollmentWithHttpInfoAsync(String tokenHash) {
+ // Check if unstable operation is enabled
+ String operationId = "getOnPremManagementServiceEnrollment";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
+ return result;
+ }
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'tokenHash' is set
+ if (tokenHash == null) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'tokenHash' when calling"
+ + " getOnPremManagementServiceEnrollment"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/on-prem-management-service/enrollments/{token_hash}"
+ .replaceAll("\\{" + "token_hash" + "\\}", apiClient.escapeString(tokenHash.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.OnPremManagementServiceApi.getOnPremManagementServiceEnrollment",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Register a token.
+ *
+ * See {@link #registerOnPremManagementServiceTokenWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return OnPremManagementServiceRegisterTokenResponse
+ * @throws ApiException if fails to make API call
+ */
+ public OnPremManagementServiceRegisterTokenResponse registerOnPremManagementServiceToken(
+ OnPremManagementServiceRegisterTokenRequest body) throws ApiException {
+ return registerOnPremManagementServiceTokenWithHttpInfo(body).getData();
+ }
+
+ /**
+ * Register a token.
+ *
+ *
See {@link #registerOnPremManagementServiceTokenWithHttpInfoAsync}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<OnPremManagementServiceRegisterTokenResponse>
+ */
+ public CompletableFuture
+ registerOnPremManagementServiceTokenAsync(OnPremManagementServiceRegisterTokenRequest body) {
+ return registerOnPremManagementServiceTokenWithHttpInfoAsync(body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Register a token for query execution. This endpoint allows an on-prem runner to register a
+ * token that will be used to execute queries on a specific connection.
+ *
+ * @param body (required)
+ * @return ApiResponse<OnPremManagementServiceRegisterTokenResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 401 | Unauthorized | - |
+ * | 403 | Forbidden | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ * | 500 | Internal Server Error | - |
+ *
+ */
+ public ApiResponse
+ registerOnPremManagementServiceTokenWithHttpInfo(
+ OnPremManagementServiceRegisterTokenRequest body) throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "registerOnPremManagementServiceToken";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
+ }
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400,
+ "Missing the required parameter 'body' when calling"
+ + " registerOnPremManagementServiceToken");
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/on-prem-management-service/tokens/register";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.OnPremManagementServiceApi.registerOnPremManagementServiceToken",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Register a token.
+ *
+ * See {@link #registerOnPremManagementServiceTokenWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return
+ * CompletableFuture<ApiResponse<OnPremManagementServiceRegisterTokenResponse>>
+ */
+ public CompletableFuture>
+ registerOnPremManagementServiceTokenWithHttpInfoAsync(
+ OnPremManagementServiceRegisterTokenRequest body) {
+ // Check if unstable operation is enabled
+ String operationId = "registerOnPremManagementServiceToken";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
+ return result;
+ }
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'body' when calling"
+ + " registerOnPremManagementServiceToken"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/on-prem-management-service/tokens/register";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.OnPremManagementServiceApi.registerOnPremManagementServiceToken",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceCreateEnrollmentRequest.java b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceCreateEnrollmentRequest.java
new file mode 100644
index 00000000000..756f31f1d80
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceCreateEnrollmentRequest.java
@@ -0,0 +1,151 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Request to create an enrollment for an on-prem runner. */
+@JsonPropertyOrder({OnPremManagementServiceCreateEnrollmentRequest.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OnPremManagementServiceCreateEnrollmentRequest {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private OnPremManagementServiceEnrollmentDataRequest data;
+
+ public OnPremManagementServiceCreateEnrollmentRequest() {}
+
+ @JsonCreator
+ public OnPremManagementServiceCreateEnrollmentRequest(
+ @JsonProperty(required = true, value = JSON_PROPERTY_DATA)
+ OnPremManagementServiceEnrollmentDataRequest data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ }
+
+ public OnPremManagementServiceCreateEnrollmentRequest data(
+ OnPremManagementServiceEnrollmentDataRequest data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * Data for creating an enrollment.
+ *
+ * @return data
+ */
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OnPremManagementServiceEnrollmentDataRequest getData() {
+ return data;
+ }
+
+ public void setData(OnPremManagementServiceEnrollmentDataRequest data) {
+ this.data = data;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OnPremManagementServiceCreateEnrollmentRequest
+ */
+ @JsonAnySetter
+ public OnPremManagementServiceCreateEnrollmentRequest putAdditionalProperty(
+ String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this OnPremManagementServiceCreateEnrollmentRequest object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OnPremManagementServiceCreateEnrollmentRequest onPremManagementServiceCreateEnrollmentRequest =
+ (OnPremManagementServiceCreateEnrollmentRequest) o;
+ return Objects.equals(this.data, onPremManagementServiceCreateEnrollmentRequest.data)
+ && Objects.equals(
+ this.additionalProperties,
+ onPremManagementServiceCreateEnrollmentRequest.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OnPremManagementServiceCreateEnrollmentRequest {\n");
+ sb.append(" data: ").append(toIndentedString(data)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceCreateEnrollmentResponse.java b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceCreateEnrollmentResponse.java
new file mode 100644
index 00000000000..018fa04fadb
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceCreateEnrollmentResponse.java
@@ -0,0 +1,152 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Response for creating an enrollment. */
+@JsonPropertyOrder({OnPremManagementServiceCreateEnrollmentResponse.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OnPremManagementServiceCreateEnrollmentResponse {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private OnPremManagementServiceCreateEnrollmentResponseData data;
+
+ public OnPremManagementServiceCreateEnrollmentResponse() {}
+
+ @JsonCreator
+ public OnPremManagementServiceCreateEnrollmentResponse(
+ @JsonProperty(required = true, value = JSON_PROPERTY_DATA)
+ OnPremManagementServiceCreateEnrollmentResponseData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ }
+
+ public OnPremManagementServiceCreateEnrollmentResponse data(
+ OnPremManagementServiceCreateEnrollmentResponseData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * Data for the created enrollment.
+ *
+ * @return data
+ */
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OnPremManagementServiceCreateEnrollmentResponseData getData() {
+ return data;
+ }
+
+ public void setData(OnPremManagementServiceCreateEnrollmentResponseData data) {
+ this.data = data;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OnPremManagementServiceCreateEnrollmentResponse
+ */
+ @JsonAnySetter
+ public OnPremManagementServiceCreateEnrollmentResponse putAdditionalProperty(
+ String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this OnPremManagementServiceCreateEnrollmentResponse object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OnPremManagementServiceCreateEnrollmentResponse
+ onPremManagementServiceCreateEnrollmentResponse =
+ (OnPremManagementServiceCreateEnrollmentResponse) o;
+ return Objects.equals(this.data, onPremManagementServiceCreateEnrollmentResponse.data)
+ && Objects.equals(
+ this.additionalProperties,
+ onPremManagementServiceCreateEnrollmentResponse.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OnPremManagementServiceCreateEnrollmentResponse {\n");
+ sb.append(" data: ").append(toIndentedString(data)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceCreateEnrollmentResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceCreateEnrollmentResponseAttributes.java
new file mode 100644
index 00000000000..003c00c82e1
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceCreateEnrollmentResponseAttributes.java
@@ -0,0 +1,152 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Attributes for the created enrollment. */
+@JsonPropertyOrder({OnPremManagementServiceCreateEnrollmentResponseAttributes.JSON_PROPERTY_TOKEN})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OnPremManagementServiceCreateEnrollmentResponseAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_TOKEN = "token";
+ private String token;
+
+ public OnPremManagementServiceCreateEnrollmentResponseAttributes() {}
+
+ @JsonCreator
+ public OnPremManagementServiceCreateEnrollmentResponseAttributes(
+ @JsonProperty(required = true, value = JSON_PROPERTY_TOKEN) String token) {
+ this.token = token;
+ }
+
+ public OnPremManagementServiceCreateEnrollmentResponseAttributes token(String token) {
+ this.token = token;
+ return this;
+ }
+
+ /**
+ * The enrollment token.
+ *
+ * @return token
+ */
+ @JsonProperty(JSON_PROPERTY_TOKEN)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getToken() {
+ return token;
+ }
+
+ public void setToken(String token) {
+ this.token = token;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OnPremManagementServiceCreateEnrollmentResponseAttributes
+ */
+ @JsonAnySetter
+ public OnPremManagementServiceCreateEnrollmentResponseAttributes putAdditionalProperty(
+ String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /**
+ * Return true if this OnPremManagementServiceCreateEnrollmentResponseAttributes object is equal
+ * to o.
+ */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OnPremManagementServiceCreateEnrollmentResponseAttributes
+ onPremManagementServiceCreateEnrollmentResponseAttributes =
+ (OnPremManagementServiceCreateEnrollmentResponseAttributes) o;
+ return Objects.equals(
+ this.token, onPremManagementServiceCreateEnrollmentResponseAttributes.token)
+ && Objects.equals(
+ this.additionalProperties,
+ onPremManagementServiceCreateEnrollmentResponseAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(token, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OnPremManagementServiceCreateEnrollmentResponseAttributes {\n");
+ sb.append(" token: ").append(toIndentedString(token)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceCreateEnrollmentResponseData.java b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceCreateEnrollmentResponseData.java
new file mode 100644
index 00000000000..1f145d8ed35
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceCreateEnrollmentResponseData.java
@@ -0,0 +1,220 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Data for the created enrollment. */
+@JsonPropertyOrder({
+ OnPremManagementServiceCreateEnrollmentResponseData.JSON_PROPERTY_ATTRIBUTES,
+ OnPremManagementServiceCreateEnrollmentResponseData.JSON_PROPERTY_ID,
+ OnPremManagementServiceCreateEnrollmentResponseData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OnPremManagementServiceCreateEnrollmentResponseData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private OnPremManagementServiceCreateEnrollmentResponseAttributes attributes;
+
+ public static final String JSON_PROPERTY_ID = "id";
+ private String id;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private OnPremManagementServiceCreateEnrollmentResponseType type;
+
+ public OnPremManagementServiceCreateEnrollmentResponseData() {}
+
+ @JsonCreator
+ public OnPremManagementServiceCreateEnrollmentResponseData(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES)
+ OnPremManagementServiceCreateEnrollmentResponseAttributes attributes,
+ @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE)
+ OnPremManagementServiceCreateEnrollmentResponseType type) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ this.id = id;
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public OnPremManagementServiceCreateEnrollmentResponseData attributes(
+ OnPremManagementServiceCreateEnrollmentResponseAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * Attributes for the created enrollment.
+ *
+ * @return attributes
+ */
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OnPremManagementServiceCreateEnrollmentResponseAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(OnPremManagementServiceCreateEnrollmentResponseAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public OnPremManagementServiceCreateEnrollmentResponseData id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The token hash identifier.
+ *
+ * @return id
+ */
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public OnPremManagementServiceCreateEnrollmentResponseData type(
+ OnPremManagementServiceCreateEnrollmentResponseType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * The type of the resource. The value should always be createEnrollmentResponse.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OnPremManagementServiceCreateEnrollmentResponseType getType() {
+ return type;
+ }
+
+ public void setType(OnPremManagementServiceCreateEnrollmentResponseType type) {
+ if (!type.isValid()) {
+ this.unparsed = true;
+ }
+ this.type = type;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OnPremManagementServiceCreateEnrollmentResponseData
+ */
+ @JsonAnySetter
+ public OnPremManagementServiceCreateEnrollmentResponseData putAdditionalProperty(
+ String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /**
+ * Return true if this OnPremManagementServiceCreateEnrollmentResponseData object is equal to o.
+ */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OnPremManagementServiceCreateEnrollmentResponseData
+ onPremManagementServiceCreateEnrollmentResponseData =
+ (OnPremManagementServiceCreateEnrollmentResponseData) o;
+ return Objects.equals(
+ this.attributes, onPremManagementServiceCreateEnrollmentResponseData.attributes)
+ && Objects.equals(this.id, onPremManagementServiceCreateEnrollmentResponseData.id)
+ && Objects.equals(this.type, onPremManagementServiceCreateEnrollmentResponseData.type)
+ && Objects.equals(
+ this.additionalProperties,
+ onPremManagementServiceCreateEnrollmentResponseData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, id, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OnPremManagementServiceCreateEnrollmentResponseData {\n");
+ sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceCreateEnrollmentResponseType.java b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceCreateEnrollmentResponseType.java
new file mode 100644
index 00000000000..3ee5203c986
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceCreateEnrollmentResponseType.java
@@ -0,0 +1,63 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.datadog.api.client.ModelEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+/** The type of the resource. The value should always be createEnrollmentResponse. */
+@JsonSerialize(
+ using =
+ OnPremManagementServiceCreateEnrollmentResponseType
+ .OnPremManagementServiceCreateEnrollmentResponseTypeSerializer.class)
+public class OnPremManagementServiceCreateEnrollmentResponseType extends ModelEnum {
+
+ private static final Set allowedValues =
+ new HashSet(Arrays.asList("createEnrollmentResponse"));
+
+ public static final OnPremManagementServiceCreateEnrollmentResponseType CREATEENROLLMENTRESPONSE =
+ new OnPremManagementServiceCreateEnrollmentResponseType("createEnrollmentResponse");
+
+ OnPremManagementServiceCreateEnrollmentResponseType(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class OnPremManagementServiceCreateEnrollmentResponseTypeSerializer
+ extends StdSerializer {
+ public OnPremManagementServiceCreateEnrollmentResponseTypeSerializer(
+ Class t) {
+ super(t);
+ }
+
+ public OnPremManagementServiceCreateEnrollmentResponseTypeSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ OnPremManagementServiceCreateEnrollmentResponseType value,
+ JsonGenerator jgen,
+ SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static OnPremManagementServiceCreateEnrollmentResponseType fromValue(String value) {
+ return new OnPremManagementServiceCreateEnrollmentResponseType(value);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceEnrollmentAttributes.java b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceEnrollmentAttributes.java
new file mode 100644
index 00000000000..a17b6a7392f
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceEnrollmentAttributes.java
@@ -0,0 +1,255 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+/** Attributes for creating an enrollment. */
+@JsonPropertyOrder({
+ OnPremManagementServiceEnrollmentAttributes.JSON_PROPERTY_ACTIONS_ALLOWLIST,
+ OnPremManagementServiceEnrollmentAttributes.JSON_PROPERTY_RUNNER_HOST,
+ OnPremManagementServiceEnrollmentAttributes.JSON_PROPERTY_RUNNER_MODES,
+ OnPremManagementServiceEnrollmentAttributes.JSON_PROPERTY_RUNNER_NAME
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OnPremManagementServiceEnrollmentAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ACTIONS_ALLOWLIST = "actions_allowlist";
+ private List actionsAllowlist = new ArrayList<>();
+
+ public static final String JSON_PROPERTY_RUNNER_HOST = "runner_host";
+ private String runnerHost;
+
+ public static final String JSON_PROPERTY_RUNNER_MODES = "runner_modes";
+ private List runnerModes =
+ new ArrayList<>();
+
+ public static final String JSON_PROPERTY_RUNNER_NAME = "runner_name";
+ private String runnerName;
+
+ public OnPremManagementServiceEnrollmentAttributes() {}
+
+ @JsonCreator
+ public OnPremManagementServiceEnrollmentAttributes(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ACTIONS_ALLOWLIST)
+ List actionsAllowlist,
+ @JsonProperty(required = true, value = JSON_PROPERTY_RUNNER_MODES)
+ List runnerModes,
+ @JsonProperty(required = true, value = JSON_PROPERTY_RUNNER_NAME) String runnerName) {
+ this.actionsAllowlist = actionsAllowlist;
+ this.runnerModes = runnerModes;
+ this.runnerName = runnerName;
+ }
+
+ public OnPremManagementServiceEnrollmentAttributes actionsAllowlist(
+ List actionsAllowlist) {
+ this.actionsAllowlist = actionsAllowlist;
+ return this;
+ }
+
+ public OnPremManagementServiceEnrollmentAttributes addActionsAllowlistItem(
+ String actionsAllowlistItem) {
+ this.actionsAllowlist.add(actionsAllowlistItem);
+ return this;
+ }
+
+ /**
+ * List of allowed actions for the runner.
+ *
+ * @return actionsAllowlist
+ */
+ @JsonProperty(JSON_PROPERTY_ACTIONS_ALLOWLIST)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public List getActionsAllowlist() {
+ return actionsAllowlist;
+ }
+
+ public void setActionsAllowlist(List actionsAllowlist) {
+ this.actionsAllowlist = actionsAllowlist;
+ }
+
+ public OnPremManagementServiceEnrollmentAttributes runnerHost(String runnerHost) {
+ this.runnerHost = runnerHost;
+ return this;
+ }
+
+ /**
+ * The hostname for the runner. Required when push mode is enabled.
+ *
+ * @return runnerHost
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_RUNNER_HOST)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getRunnerHost() {
+ return runnerHost;
+ }
+
+ public void setRunnerHost(String runnerHost) {
+ this.runnerHost = runnerHost;
+ }
+
+ public OnPremManagementServiceEnrollmentAttributes runnerModes(
+ List runnerModes) {
+ this.runnerModes = runnerModes;
+ return this;
+ }
+
+ public OnPremManagementServiceEnrollmentAttributes addRunnerModesItem(
+ OnPremManagementServiceEnrollmentAttributesRunnerModesItems runnerModesItem) {
+ this.runnerModes.add(runnerModesItem);
+ this.unparsed |= !runnerModesItem.isValid();
+ return this;
+ }
+
+ /**
+ * The modes the runner should operate in.
+ *
+ * @return runnerModes
+ */
+ @JsonProperty(JSON_PROPERTY_RUNNER_MODES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public List getRunnerModes() {
+ return runnerModes;
+ }
+
+ public void setRunnerModes(
+ List runnerModes) {
+ this.runnerModes = runnerModes;
+ }
+
+ public OnPremManagementServiceEnrollmentAttributes runnerName(String runnerName) {
+ this.runnerName = runnerName;
+ return this;
+ }
+
+ /**
+ * The name of the on-prem runner.
+ *
+ * @return runnerName
+ */
+ @JsonProperty(JSON_PROPERTY_RUNNER_NAME)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getRunnerName() {
+ return runnerName;
+ }
+
+ public void setRunnerName(String runnerName) {
+ this.runnerName = runnerName;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OnPremManagementServiceEnrollmentAttributes
+ */
+ @JsonAnySetter
+ public OnPremManagementServiceEnrollmentAttributes putAdditionalProperty(
+ String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this OnPremManagementServiceEnrollmentAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OnPremManagementServiceEnrollmentAttributes onPremManagementServiceEnrollmentAttributes =
+ (OnPremManagementServiceEnrollmentAttributes) o;
+ return Objects.equals(
+ this.actionsAllowlist, onPremManagementServiceEnrollmentAttributes.actionsAllowlist)
+ && Objects.equals(this.runnerHost, onPremManagementServiceEnrollmentAttributes.runnerHost)
+ && Objects.equals(this.runnerModes, onPremManagementServiceEnrollmentAttributes.runnerModes)
+ && Objects.equals(this.runnerName, onPremManagementServiceEnrollmentAttributes.runnerName)
+ && Objects.equals(
+ this.additionalProperties,
+ onPremManagementServiceEnrollmentAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(
+ actionsAllowlist, runnerHost, runnerModes, runnerName, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OnPremManagementServiceEnrollmentAttributes {\n");
+ sb.append(" actionsAllowlist: ").append(toIndentedString(actionsAllowlist)).append("\n");
+ sb.append(" runnerHost: ").append(toIndentedString(runnerHost)).append("\n");
+ sb.append(" runnerModes: ").append(toIndentedString(runnerModes)).append("\n");
+ sb.append(" runnerName: ").append(toIndentedString(runnerName)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceEnrollmentAttributesRunnerModesItems.java b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceEnrollmentAttributesRunnerModesItems.java
new file mode 100644
index 00000000000..d41bd1c785e
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceEnrollmentAttributesRunnerModesItems.java
@@ -0,0 +1,67 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.datadog.api.client.ModelEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+/** */
+@JsonSerialize(
+ using =
+ OnPremManagementServiceEnrollmentAttributesRunnerModesItems
+ .OnPremManagementServiceEnrollmentAttributesRunnerModesItemsSerializer.class)
+public class OnPremManagementServiceEnrollmentAttributesRunnerModesItems extends ModelEnum {
+
+ private static final Set allowedValues =
+ new HashSet(Arrays.asList("workflow_automation", "app_builder"));
+
+ public static final OnPremManagementServiceEnrollmentAttributesRunnerModesItems
+ WORKFLOW_AUTOMATION =
+ new OnPremManagementServiceEnrollmentAttributesRunnerModesItems("workflow_automation");
+ public static final OnPremManagementServiceEnrollmentAttributesRunnerModesItems APP_BUILDER =
+ new OnPremManagementServiceEnrollmentAttributesRunnerModesItems("app_builder");
+
+ OnPremManagementServiceEnrollmentAttributesRunnerModesItems(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class OnPremManagementServiceEnrollmentAttributesRunnerModesItemsSerializer
+ extends StdSerializer {
+ public OnPremManagementServiceEnrollmentAttributesRunnerModesItemsSerializer(
+ Class t) {
+ super(t);
+ }
+
+ public OnPremManagementServiceEnrollmentAttributesRunnerModesItemsSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ OnPremManagementServiceEnrollmentAttributesRunnerModesItems value,
+ JsonGenerator jgen,
+ SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static OnPremManagementServiceEnrollmentAttributesRunnerModesItems fromValue(
+ String value) {
+ return new OnPremManagementServiceEnrollmentAttributesRunnerModesItems(value);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceEnrollmentDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceEnrollmentDataRequest.java
new file mode 100644
index 00000000000..0160705ea67
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceEnrollmentDataRequest.java
@@ -0,0 +1,188 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Data for creating an enrollment. */
+@JsonPropertyOrder({
+ OnPremManagementServiceEnrollmentDataRequest.JSON_PROPERTY_ATTRIBUTES,
+ OnPremManagementServiceEnrollmentDataRequest.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OnPremManagementServiceEnrollmentDataRequest {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private OnPremManagementServiceEnrollmentAttributes attributes;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private OnPremManagementServiceEnrollmentType type;
+
+ public OnPremManagementServiceEnrollmentDataRequest() {}
+
+ @JsonCreator
+ public OnPremManagementServiceEnrollmentDataRequest(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES)
+ OnPremManagementServiceEnrollmentAttributes attributes,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE)
+ OnPremManagementServiceEnrollmentType type) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public OnPremManagementServiceEnrollmentDataRequest attributes(
+ OnPremManagementServiceEnrollmentAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * Attributes for creating an enrollment.
+ *
+ * @return attributes
+ */
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OnPremManagementServiceEnrollmentAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(OnPremManagementServiceEnrollmentAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public OnPremManagementServiceEnrollmentDataRequest type(
+ OnPremManagementServiceEnrollmentType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * The type of the resource. The value should always be enrollment.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OnPremManagementServiceEnrollmentType getType() {
+ return type;
+ }
+
+ public void setType(OnPremManagementServiceEnrollmentType type) {
+ if (!type.isValid()) {
+ this.unparsed = true;
+ }
+ this.type = type;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OnPremManagementServiceEnrollmentDataRequest
+ */
+ @JsonAnySetter
+ public OnPremManagementServiceEnrollmentDataRequest putAdditionalProperty(
+ String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this OnPremManagementServiceEnrollmentDataRequest object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OnPremManagementServiceEnrollmentDataRequest onPremManagementServiceEnrollmentDataRequest =
+ (OnPremManagementServiceEnrollmentDataRequest) o;
+ return Objects.equals(this.attributes, onPremManagementServiceEnrollmentDataRequest.attributes)
+ && Objects.equals(this.type, onPremManagementServiceEnrollmentDataRequest.type)
+ && Objects.equals(
+ this.additionalProperties,
+ onPremManagementServiceEnrollmentDataRequest.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OnPremManagementServiceEnrollmentDataRequest {\n");
+ sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceEnrollmentType.java b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceEnrollmentType.java
new file mode 100644
index 00000000000..265740222f1
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceEnrollmentType.java
@@ -0,0 +1,61 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.datadog.api.client.ModelEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+/** The type of the resource. The value should always be enrollment. */
+@JsonSerialize(
+ using =
+ OnPremManagementServiceEnrollmentType.OnPremManagementServiceEnrollmentTypeSerializer.class)
+public class OnPremManagementServiceEnrollmentType extends ModelEnum {
+
+ private static final Set allowedValues = new HashSet(Arrays.asList("enrollment"));
+
+ public static final OnPremManagementServiceEnrollmentType ENROLLMENT =
+ new OnPremManagementServiceEnrollmentType("enrollment");
+
+ OnPremManagementServiceEnrollmentType(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class OnPremManagementServiceEnrollmentTypeSerializer
+ extends StdSerializer {
+ public OnPremManagementServiceEnrollmentTypeSerializer(
+ Class t) {
+ super(t);
+ }
+
+ public OnPremManagementServiceEnrollmentTypeSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ OnPremManagementServiceEnrollmentType value,
+ JsonGenerator jgen,
+ SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static OnPremManagementServiceEnrollmentType fromValue(String value) {
+ return new OnPremManagementServiceEnrollmentType(value);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceGetEnrollmentResponse.java b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceGetEnrollmentResponse.java
new file mode 100644
index 00000000000..5a61d436440
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceGetEnrollmentResponse.java
@@ -0,0 +1,151 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Response for getting an enrollment status. */
+@JsonPropertyOrder({OnPremManagementServiceGetEnrollmentResponse.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OnPremManagementServiceGetEnrollmentResponse {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private OnPremManagementServiceGetEnrollmentResponseData data;
+
+ public OnPremManagementServiceGetEnrollmentResponse() {}
+
+ @JsonCreator
+ public OnPremManagementServiceGetEnrollmentResponse(
+ @JsonProperty(required = true, value = JSON_PROPERTY_DATA)
+ OnPremManagementServiceGetEnrollmentResponseData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ }
+
+ public OnPremManagementServiceGetEnrollmentResponse data(
+ OnPremManagementServiceGetEnrollmentResponseData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * Data for the enrollment status.
+ *
+ * @return data
+ */
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OnPremManagementServiceGetEnrollmentResponseData getData() {
+ return data;
+ }
+
+ public void setData(OnPremManagementServiceGetEnrollmentResponseData data) {
+ this.data = data;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OnPremManagementServiceGetEnrollmentResponse
+ */
+ @JsonAnySetter
+ public OnPremManagementServiceGetEnrollmentResponse putAdditionalProperty(
+ String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this OnPremManagementServiceGetEnrollmentResponse object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OnPremManagementServiceGetEnrollmentResponse onPremManagementServiceGetEnrollmentResponse =
+ (OnPremManagementServiceGetEnrollmentResponse) o;
+ return Objects.equals(this.data, onPremManagementServiceGetEnrollmentResponse.data)
+ && Objects.equals(
+ this.additionalProperties,
+ onPremManagementServiceGetEnrollmentResponse.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OnPremManagementServiceGetEnrollmentResponse {\n");
+ sb.append(" data: ").append(toIndentedString(data)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceGetEnrollmentResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceGetEnrollmentResponseAttributes.java
new file mode 100644
index 00000000000..24b3efe3e97
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceGetEnrollmentResponseAttributes.java
@@ -0,0 +1,221 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Attributes for the enrollment status. */
+@JsonPropertyOrder({
+ OnPremManagementServiceGetEnrollmentResponseAttributes.JSON_PROPERTY_FAILURE_REASON,
+ OnPremManagementServiceGetEnrollmentResponseAttributes.JSON_PROPERTY_RUNNER_ID,
+ OnPremManagementServiceGetEnrollmentResponseAttributes.JSON_PROPERTY_STATUS
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OnPremManagementServiceGetEnrollmentResponseAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_FAILURE_REASON = "failure_reason";
+ private String failureReason;
+
+ public static final String JSON_PROPERTY_RUNNER_ID = "runner_id";
+ private String runnerId;
+
+ public static final String JSON_PROPERTY_STATUS = "status";
+ private OnPremManagementServiceGetEnrollmentResponseAttributesStatus status;
+
+ public OnPremManagementServiceGetEnrollmentResponseAttributes() {}
+
+ @JsonCreator
+ public OnPremManagementServiceGetEnrollmentResponseAttributes(
+ @JsonProperty(required = true, value = JSON_PROPERTY_FAILURE_REASON) String failureReason,
+ @JsonProperty(required = true, value = JSON_PROPERTY_RUNNER_ID) String runnerId,
+ @JsonProperty(required = true, value = JSON_PROPERTY_STATUS)
+ OnPremManagementServiceGetEnrollmentResponseAttributesStatus status) {
+ this.failureReason = failureReason;
+ this.runnerId = runnerId;
+ this.status = status;
+ this.unparsed |= !status.isValid();
+ }
+
+ public OnPremManagementServiceGetEnrollmentResponseAttributes failureReason(
+ String failureReason) {
+ this.failureReason = failureReason;
+ return this;
+ }
+
+ /**
+ * The reason for enrollment failure, if applicable.
+ *
+ * @return failureReason
+ */
+ @JsonProperty(JSON_PROPERTY_FAILURE_REASON)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getFailureReason() {
+ return failureReason;
+ }
+
+ public void setFailureReason(String failureReason) {
+ this.failureReason = failureReason;
+ }
+
+ public OnPremManagementServiceGetEnrollmentResponseAttributes runnerId(String runnerId) {
+ this.runnerId = runnerId;
+ return this;
+ }
+
+ /**
+ * The runner identifier, if enrollment was successful.
+ *
+ * @return runnerId
+ */
+ @JsonProperty(JSON_PROPERTY_RUNNER_ID)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getRunnerId() {
+ return runnerId;
+ }
+
+ public void setRunnerId(String runnerId) {
+ this.runnerId = runnerId;
+ }
+
+ public OnPremManagementServiceGetEnrollmentResponseAttributes status(
+ OnPremManagementServiceGetEnrollmentResponseAttributesStatus status) {
+ this.status = status;
+ this.unparsed |= !status.isValid();
+ return this;
+ }
+
+ /**
+ * The status of the enrollment.
+ *
+ * @return status
+ */
+ @JsonProperty(JSON_PROPERTY_STATUS)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OnPremManagementServiceGetEnrollmentResponseAttributesStatus getStatus() {
+ return status;
+ }
+
+ public void setStatus(OnPremManagementServiceGetEnrollmentResponseAttributesStatus status) {
+ if (!status.isValid()) {
+ this.unparsed = true;
+ }
+ this.status = status;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OnPremManagementServiceGetEnrollmentResponseAttributes
+ */
+ @JsonAnySetter
+ public OnPremManagementServiceGetEnrollmentResponseAttributes putAdditionalProperty(
+ String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /**
+ * Return true if this OnPremManagementServiceGetEnrollmentResponseAttributes object is equal to
+ * o.
+ */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OnPremManagementServiceGetEnrollmentResponseAttributes
+ onPremManagementServiceGetEnrollmentResponseAttributes =
+ (OnPremManagementServiceGetEnrollmentResponseAttributes) o;
+ return Objects.equals(
+ this.failureReason,
+ onPremManagementServiceGetEnrollmentResponseAttributes.failureReason)
+ && Objects.equals(
+ this.runnerId, onPremManagementServiceGetEnrollmentResponseAttributes.runnerId)
+ && Objects.equals(
+ this.status, onPremManagementServiceGetEnrollmentResponseAttributes.status)
+ && Objects.equals(
+ this.additionalProperties,
+ onPremManagementServiceGetEnrollmentResponseAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(failureReason, runnerId, status, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OnPremManagementServiceGetEnrollmentResponseAttributes {\n");
+ sb.append(" failureReason: ").append(toIndentedString(failureReason)).append("\n");
+ sb.append(" runnerId: ").append(toIndentedString(runnerId)).append("\n");
+ sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceGetEnrollmentResponseAttributesStatus.java b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceGetEnrollmentResponseAttributesStatus.java
new file mode 100644
index 00000000000..de6db485f46
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceGetEnrollmentResponseAttributesStatus.java
@@ -0,0 +1,69 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.datadog.api.client.ModelEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+/** The status of the enrollment. */
+@JsonSerialize(
+ using =
+ OnPremManagementServiceGetEnrollmentResponseAttributesStatus
+ .OnPremManagementServiceGetEnrollmentResponseAttributesStatusSerializer.class)
+public class OnPremManagementServiceGetEnrollmentResponseAttributesStatus
+ extends ModelEnum {
+
+ private static final Set allowedValues =
+ new HashSet(Arrays.asList("new", "success", "failed"));
+
+ public static final OnPremManagementServiceGetEnrollmentResponseAttributesStatus NEW =
+ new OnPremManagementServiceGetEnrollmentResponseAttributesStatus("new");
+ public static final OnPremManagementServiceGetEnrollmentResponseAttributesStatus SUCCESS =
+ new OnPremManagementServiceGetEnrollmentResponseAttributesStatus("success");
+ public static final OnPremManagementServiceGetEnrollmentResponseAttributesStatus FAILED =
+ new OnPremManagementServiceGetEnrollmentResponseAttributesStatus("failed");
+
+ OnPremManagementServiceGetEnrollmentResponseAttributesStatus(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class OnPremManagementServiceGetEnrollmentResponseAttributesStatusSerializer
+ extends StdSerializer {
+ public OnPremManagementServiceGetEnrollmentResponseAttributesStatusSerializer(
+ Class t) {
+ super(t);
+ }
+
+ public OnPremManagementServiceGetEnrollmentResponseAttributesStatusSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ OnPremManagementServiceGetEnrollmentResponseAttributesStatus value,
+ JsonGenerator jgen,
+ SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static OnPremManagementServiceGetEnrollmentResponseAttributesStatus fromValue(
+ String value) {
+ return new OnPremManagementServiceGetEnrollmentResponseAttributesStatus(value);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceGetEnrollmentResponseData.java b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceGetEnrollmentResponseData.java
new file mode 100644
index 00000000000..fbc0494c2ef
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceGetEnrollmentResponseData.java
@@ -0,0 +1,218 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Data for the enrollment status. */
+@JsonPropertyOrder({
+ OnPremManagementServiceGetEnrollmentResponseData.JSON_PROPERTY_ATTRIBUTES,
+ OnPremManagementServiceGetEnrollmentResponseData.JSON_PROPERTY_ID,
+ OnPremManagementServiceGetEnrollmentResponseData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OnPremManagementServiceGetEnrollmentResponseData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private OnPremManagementServiceGetEnrollmentResponseAttributes attributes;
+
+ public static final String JSON_PROPERTY_ID = "id";
+ private String id;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private OnPremManagementServiceGetEnrollmentResponseType type;
+
+ public OnPremManagementServiceGetEnrollmentResponseData() {}
+
+ @JsonCreator
+ public OnPremManagementServiceGetEnrollmentResponseData(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES)
+ OnPremManagementServiceGetEnrollmentResponseAttributes attributes,
+ @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE)
+ OnPremManagementServiceGetEnrollmentResponseType type) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ this.id = id;
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public OnPremManagementServiceGetEnrollmentResponseData attributes(
+ OnPremManagementServiceGetEnrollmentResponseAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * Attributes for the enrollment status.
+ *
+ * @return attributes
+ */
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OnPremManagementServiceGetEnrollmentResponseAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(OnPremManagementServiceGetEnrollmentResponseAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public OnPremManagementServiceGetEnrollmentResponseData id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The token hash identifier.
+ *
+ * @return id
+ */
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public OnPremManagementServiceGetEnrollmentResponseData type(
+ OnPremManagementServiceGetEnrollmentResponseType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * The type of the resource. The value should always be getEnrollmentResponse.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OnPremManagementServiceGetEnrollmentResponseType getType() {
+ return type;
+ }
+
+ public void setType(OnPremManagementServiceGetEnrollmentResponseType type) {
+ if (!type.isValid()) {
+ this.unparsed = true;
+ }
+ this.type = type;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OnPremManagementServiceGetEnrollmentResponseData
+ */
+ @JsonAnySetter
+ public OnPremManagementServiceGetEnrollmentResponseData putAdditionalProperty(
+ String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this OnPremManagementServiceGetEnrollmentResponseData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OnPremManagementServiceGetEnrollmentResponseData
+ onPremManagementServiceGetEnrollmentResponseData =
+ (OnPremManagementServiceGetEnrollmentResponseData) o;
+ return Objects.equals(
+ this.attributes, onPremManagementServiceGetEnrollmentResponseData.attributes)
+ && Objects.equals(this.id, onPremManagementServiceGetEnrollmentResponseData.id)
+ && Objects.equals(this.type, onPremManagementServiceGetEnrollmentResponseData.type)
+ && Objects.equals(
+ this.additionalProperties,
+ onPremManagementServiceGetEnrollmentResponseData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, id, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OnPremManagementServiceGetEnrollmentResponseData {\n");
+ sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceGetEnrollmentResponseType.java b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceGetEnrollmentResponseType.java
new file mode 100644
index 00000000000..c4e07e5f739
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceGetEnrollmentResponseType.java
@@ -0,0 +1,63 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.datadog.api.client.ModelEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+/** The type of the resource. The value should always be getEnrollmentResponse. */
+@JsonSerialize(
+ using =
+ OnPremManagementServiceGetEnrollmentResponseType
+ .OnPremManagementServiceGetEnrollmentResponseTypeSerializer.class)
+public class OnPremManagementServiceGetEnrollmentResponseType extends ModelEnum {
+
+ private static final Set allowedValues =
+ new HashSet(Arrays.asList("getEnrollmentResponse"));
+
+ public static final OnPremManagementServiceGetEnrollmentResponseType GETENROLLMENTRESPONSE =
+ new OnPremManagementServiceGetEnrollmentResponseType("getEnrollmentResponse");
+
+ OnPremManagementServiceGetEnrollmentResponseType(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class OnPremManagementServiceGetEnrollmentResponseTypeSerializer
+ extends StdSerializer {
+ public OnPremManagementServiceGetEnrollmentResponseTypeSerializer(
+ Class t) {
+ super(t);
+ }
+
+ public OnPremManagementServiceGetEnrollmentResponseTypeSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ OnPremManagementServiceGetEnrollmentResponseType value,
+ JsonGenerator jgen,
+ SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static OnPremManagementServiceGetEnrollmentResponseType fromValue(String value) {
+ return new OnPremManagementServiceGetEnrollmentResponseType(value);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceRegisterTokenAttributes.java b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceRegisterTokenAttributes.java
new file mode 100644
index 00000000000..6995065f74a
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceRegisterTokenAttributes.java
@@ -0,0 +1,261 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.UUID;
+
+/** Attributes for registering a token. */
+@JsonPropertyOrder({
+ OnPremManagementServiceRegisterTokenAttributes.JSON_PROPERTY_APP_ID,
+ OnPremManagementServiceRegisterTokenAttributes.JSON_PROPERTY_APP_VERSION,
+ OnPremManagementServiceRegisterTokenAttributes.JSON_PROPERTY_CONNECTION_ID,
+ OnPremManagementServiceRegisterTokenAttributes.JSON_PROPERTY_QUERY_ID,
+ OnPremManagementServiceRegisterTokenAttributes.JSON_PROPERTY_RUNNER_ID
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OnPremManagementServiceRegisterTokenAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_APP_ID = "app_id";
+ private UUID appId;
+
+ public static final String JSON_PROPERTY_APP_VERSION = "app_version";
+ private Long appVersion;
+
+ public static final String JSON_PROPERTY_CONNECTION_ID = "connection_id";
+ private UUID connectionId;
+
+ public static final String JSON_PROPERTY_QUERY_ID = "query_id";
+ private UUID queryId;
+
+ public static final String JSON_PROPERTY_RUNNER_ID = "runner_id";
+ private String runnerId;
+
+ public OnPremManagementServiceRegisterTokenAttributes() {}
+
+ @JsonCreator
+ public OnPremManagementServiceRegisterTokenAttributes(
+ @JsonProperty(required = true, value = JSON_PROPERTY_CONNECTION_ID) UUID connectionId,
+ @JsonProperty(required = true, value = JSON_PROPERTY_RUNNER_ID) String runnerId) {
+ this.connectionId = connectionId;
+ this.runnerId = runnerId;
+ }
+
+ public OnPremManagementServiceRegisterTokenAttributes appId(UUID appId) {
+ this.appId = appId;
+ return this;
+ }
+
+ /**
+ * The application identifier.
+ *
+ * @return appId
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_APP_ID)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public UUID getAppId() {
+ return appId;
+ }
+
+ public void setAppId(UUID appId) {
+ this.appId = appId;
+ }
+
+ public OnPremManagementServiceRegisterTokenAttributes appVersion(Long appVersion) {
+ this.appVersion = appVersion;
+ return this;
+ }
+
+ /**
+ * The application version.
+ *
+ * @return appVersion
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_APP_VERSION)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public Long getAppVersion() {
+ return appVersion;
+ }
+
+ public void setAppVersion(Long appVersion) {
+ this.appVersion = appVersion;
+ }
+
+ public OnPremManagementServiceRegisterTokenAttributes connectionId(UUID connectionId) {
+ this.connectionId = connectionId;
+ return this;
+ }
+
+ /**
+ * The connection identifier.
+ *
+ * @return connectionId
+ */
+ @JsonProperty(JSON_PROPERTY_CONNECTION_ID)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public UUID getConnectionId() {
+ return connectionId;
+ }
+
+ public void setConnectionId(UUID connectionId) {
+ this.connectionId = connectionId;
+ }
+
+ public OnPremManagementServiceRegisterTokenAttributes queryId(UUID queryId) {
+ this.queryId = queryId;
+ return this;
+ }
+
+ /**
+ * The query identifier.
+ *
+ * @return queryId
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_QUERY_ID)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public UUID getQueryId() {
+ return queryId;
+ }
+
+ public void setQueryId(UUID queryId) {
+ this.queryId = queryId;
+ }
+
+ public OnPremManagementServiceRegisterTokenAttributes runnerId(String runnerId) {
+ this.runnerId = runnerId;
+ return this;
+ }
+
+ /**
+ * The on-prem runner identifier.
+ *
+ * @return runnerId
+ */
+ @JsonProperty(JSON_PROPERTY_RUNNER_ID)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getRunnerId() {
+ return runnerId;
+ }
+
+ public void setRunnerId(String runnerId) {
+ this.runnerId = runnerId;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OnPremManagementServiceRegisterTokenAttributes
+ */
+ @JsonAnySetter
+ public OnPremManagementServiceRegisterTokenAttributes putAdditionalProperty(
+ String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this OnPremManagementServiceRegisterTokenAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OnPremManagementServiceRegisterTokenAttributes onPremManagementServiceRegisterTokenAttributes =
+ (OnPremManagementServiceRegisterTokenAttributes) o;
+ return Objects.equals(this.appId, onPremManagementServiceRegisterTokenAttributes.appId)
+ && Objects.equals(
+ this.appVersion, onPremManagementServiceRegisterTokenAttributes.appVersion)
+ && Objects.equals(
+ this.connectionId, onPremManagementServiceRegisterTokenAttributes.connectionId)
+ && Objects.equals(this.queryId, onPremManagementServiceRegisterTokenAttributes.queryId)
+ && Objects.equals(this.runnerId, onPremManagementServiceRegisterTokenAttributes.runnerId)
+ && Objects.equals(
+ this.additionalProperties,
+ onPremManagementServiceRegisterTokenAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(appId, appVersion, connectionId, queryId, runnerId, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OnPremManagementServiceRegisterTokenAttributes {\n");
+ sb.append(" appId: ").append(toIndentedString(appId)).append("\n");
+ sb.append(" appVersion: ").append(toIndentedString(appVersion)).append("\n");
+ sb.append(" connectionId: ").append(toIndentedString(connectionId)).append("\n");
+ sb.append(" queryId: ").append(toIndentedString(queryId)).append("\n");
+ sb.append(" runnerId: ").append(toIndentedString(runnerId)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceRegisterTokenDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceRegisterTokenDataRequest.java
new file mode 100644
index 00000000000..7953ebf0c99
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceRegisterTokenDataRequest.java
@@ -0,0 +1,190 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Data for registering a token. */
+@JsonPropertyOrder({
+ OnPremManagementServiceRegisterTokenDataRequest.JSON_PROPERTY_ATTRIBUTES,
+ OnPremManagementServiceRegisterTokenDataRequest.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OnPremManagementServiceRegisterTokenDataRequest {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private OnPremManagementServiceRegisterTokenAttributes attributes;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private OnPremManagementServiceRegisterTokenType type;
+
+ public OnPremManagementServiceRegisterTokenDataRequest() {}
+
+ @JsonCreator
+ public OnPremManagementServiceRegisterTokenDataRequest(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES)
+ OnPremManagementServiceRegisterTokenAttributes attributes,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE)
+ OnPremManagementServiceRegisterTokenType type) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public OnPremManagementServiceRegisterTokenDataRequest attributes(
+ OnPremManagementServiceRegisterTokenAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * Attributes for registering a token.
+ *
+ * @return attributes
+ */
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OnPremManagementServiceRegisterTokenAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(OnPremManagementServiceRegisterTokenAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public OnPremManagementServiceRegisterTokenDataRequest type(
+ OnPremManagementServiceRegisterTokenType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * The type of the resource. The value should always be registerTokenRequest.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OnPremManagementServiceRegisterTokenType getType() {
+ return type;
+ }
+
+ public void setType(OnPremManagementServiceRegisterTokenType type) {
+ if (!type.isValid()) {
+ this.unparsed = true;
+ }
+ this.type = type;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OnPremManagementServiceRegisterTokenDataRequest
+ */
+ @JsonAnySetter
+ public OnPremManagementServiceRegisterTokenDataRequest putAdditionalProperty(
+ String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this OnPremManagementServiceRegisterTokenDataRequest object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OnPremManagementServiceRegisterTokenDataRequest
+ onPremManagementServiceRegisterTokenDataRequest =
+ (OnPremManagementServiceRegisterTokenDataRequest) o;
+ return Objects.equals(
+ this.attributes, onPremManagementServiceRegisterTokenDataRequest.attributes)
+ && Objects.equals(this.type, onPremManagementServiceRegisterTokenDataRequest.type)
+ && Objects.equals(
+ this.additionalProperties,
+ onPremManagementServiceRegisterTokenDataRequest.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OnPremManagementServiceRegisterTokenDataRequest {\n");
+ sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceRegisterTokenRequest.java b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceRegisterTokenRequest.java
new file mode 100644
index 00000000000..525f7beef6c
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceRegisterTokenRequest.java
@@ -0,0 +1,151 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Request to register a token for query execution. */
+@JsonPropertyOrder({OnPremManagementServiceRegisterTokenRequest.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OnPremManagementServiceRegisterTokenRequest {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private OnPremManagementServiceRegisterTokenDataRequest data;
+
+ public OnPremManagementServiceRegisterTokenRequest() {}
+
+ @JsonCreator
+ public OnPremManagementServiceRegisterTokenRequest(
+ @JsonProperty(required = true, value = JSON_PROPERTY_DATA)
+ OnPremManagementServiceRegisterTokenDataRequest data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ }
+
+ public OnPremManagementServiceRegisterTokenRequest data(
+ OnPremManagementServiceRegisterTokenDataRequest data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * Data for registering a token.
+ *
+ * @return data
+ */
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OnPremManagementServiceRegisterTokenDataRequest getData() {
+ return data;
+ }
+
+ public void setData(OnPremManagementServiceRegisterTokenDataRequest data) {
+ this.data = data;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OnPremManagementServiceRegisterTokenRequest
+ */
+ @JsonAnySetter
+ public OnPremManagementServiceRegisterTokenRequest putAdditionalProperty(
+ String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this OnPremManagementServiceRegisterTokenRequest object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OnPremManagementServiceRegisterTokenRequest onPremManagementServiceRegisterTokenRequest =
+ (OnPremManagementServiceRegisterTokenRequest) o;
+ return Objects.equals(this.data, onPremManagementServiceRegisterTokenRequest.data)
+ && Objects.equals(
+ this.additionalProperties,
+ onPremManagementServiceRegisterTokenRequest.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OnPremManagementServiceRegisterTokenRequest {\n");
+ sb.append(" data: ").append(toIndentedString(data)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceRegisterTokenResponse.java b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceRegisterTokenResponse.java
new file mode 100644
index 00000000000..f3c79c17cbe
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceRegisterTokenResponse.java
@@ -0,0 +1,151 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Response for registering a token. */
+@JsonPropertyOrder({OnPremManagementServiceRegisterTokenResponse.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OnPremManagementServiceRegisterTokenResponse {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private OnPremManagementServiceRegisterTokenResponseData data;
+
+ public OnPremManagementServiceRegisterTokenResponse() {}
+
+ @JsonCreator
+ public OnPremManagementServiceRegisterTokenResponse(
+ @JsonProperty(required = true, value = JSON_PROPERTY_DATA)
+ OnPremManagementServiceRegisterTokenResponseData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ }
+
+ public OnPremManagementServiceRegisterTokenResponse data(
+ OnPremManagementServiceRegisterTokenResponseData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * Data for the registered token.
+ *
+ * @return data
+ */
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OnPremManagementServiceRegisterTokenResponseData getData() {
+ return data;
+ }
+
+ public void setData(OnPremManagementServiceRegisterTokenResponseData data) {
+ this.data = data;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OnPremManagementServiceRegisterTokenResponse
+ */
+ @JsonAnySetter
+ public OnPremManagementServiceRegisterTokenResponse putAdditionalProperty(
+ String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this OnPremManagementServiceRegisterTokenResponse object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OnPremManagementServiceRegisterTokenResponse onPremManagementServiceRegisterTokenResponse =
+ (OnPremManagementServiceRegisterTokenResponse) o;
+ return Objects.equals(this.data, onPremManagementServiceRegisterTokenResponse.data)
+ && Objects.equals(
+ this.additionalProperties,
+ onPremManagementServiceRegisterTokenResponse.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OnPremManagementServiceRegisterTokenResponse {\n");
+ sb.append(" data: ").append(toIndentedString(data)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceRegisterTokenResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceRegisterTokenResponseAttributes.java
new file mode 100644
index 00000000000..8a9533af5b4
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceRegisterTokenResponseAttributes.java
@@ -0,0 +1,154 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Attributes for the registered token. */
+@JsonPropertyOrder({
+ OnPremManagementServiceRegisterTokenResponseAttributes.JSON_PROPERTY_TOKEN_STRING
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OnPremManagementServiceRegisterTokenResponseAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_TOKEN_STRING = "token_string";
+ private String tokenString;
+
+ public OnPremManagementServiceRegisterTokenResponseAttributes() {}
+
+ @JsonCreator
+ public OnPremManagementServiceRegisterTokenResponseAttributes(
+ @JsonProperty(required = true, value = JSON_PROPERTY_TOKEN_STRING) String tokenString) {
+ this.tokenString = tokenString;
+ }
+
+ public OnPremManagementServiceRegisterTokenResponseAttributes tokenString(String tokenString) {
+ this.tokenString = tokenString;
+ return this;
+ }
+
+ /**
+ * The token string.
+ *
+ * @return tokenString
+ */
+ @JsonProperty(JSON_PROPERTY_TOKEN_STRING)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getTokenString() {
+ return tokenString;
+ }
+
+ public void setTokenString(String tokenString) {
+ this.tokenString = tokenString;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OnPremManagementServiceRegisterTokenResponseAttributes
+ */
+ @JsonAnySetter
+ public OnPremManagementServiceRegisterTokenResponseAttributes putAdditionalProperty(
+ String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /**
+ * Return true if this OnPremManagementServiceRegisterTokenResponseAttributes object is equal to
+ * o.
+ */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OnPremManagementServiceRegisterTokenResponseAttributes
+ onPremManagementServiceRegisterTokenResponseAttributes =
+ (OnPremManagementServiceRegisterTokenResponseAttributes) o;
+ return Objects.equals(
+ this.tokenString, onPremManagementServiceRegisterTokenResponseAttributes.tokenString)
+ && Objects.equals(
+ this.additionalProperties,
+ onPremManagementServiceRegisterTokenResponseAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(tokenString, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OnPremManagementServiceRegisterTokenResponseAttributes {\n");
+ sb.append(" tokenString: ").append(toIndentedString(tokenString)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceRegisterTokenResponseData.java b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceRegisterTokenResponseData.java
new file mode 100644
index 00000000000..e17a0f3c4f3
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceRegisterTokenResponseData.java
@@ -0,0 +1,219 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.UUID;
+
+/** Data for the registered token. */
+@JsonPropertyOrder({
+ OnPremManagementServiceRegisterTokenResponseData.JSON_PROPERTY_ATTRIBUTES,
+ OnPremManagementServiceRegisterTokenResponseData.JSON_PROPERTY_ID,
+ OnPremManagementServiceRegisterTokenResponseData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OnPremManagementServiceRegisterTokenResponseData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private OnPremManagementServiceRegisterTokenResponseAttributes attributes;
+
+ public static final String JSON_PROPERTY_ID = "id";
+ private UUID id;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private OnPremManagementServiceRegisterTokenResponseType type;
+
+ public OnPremManagementServiceRegisterTokenResponseData() {}
+
+ @JsonCreator
+ public OnPremManagementServiceRegisterTokenResponseData(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES)
+ OnPremManagementServiceRegisterTokenResponseAttributes attributes,
+ @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE)
+ OnPremManagementServiceRegisterTokenResponseType type) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ this.id = id;
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public OnPremManagementServiceRegisterTokenResponseData attributes(
+ OnPremManagementServiceRegisterTokenResponseAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * Attributes for the registered token.
+ *
+ * @return attributes
+ */
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OnPremManagementServiceRegisterTokenResponseAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(OnPremManagementServiceRegisterTokenResponseAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public OnPremManagementServiceRegisterTokenResponseData id(UUID id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The token identifier.
+ *
+ * @return id
+ */
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public UUID getId() {
+ return id;
+ }
+
+ public void setId(UUID id) {
+ this.id = id;
+ }
+
+ public OnPremManagementServiceRegisterTokenResponseData type(
+ OnPremManagementServiceRegisterTokenResponseType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * The type of the resource. The value should always be tokenDefinitions.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OnPremManagementServiceRegisterTokenResponseType getType() {
+ return type;
+ }
+
+ public void setType(OnPremManagementServiceRegisterTokenResponseType type) {
+ if (!type.isValid()) {
+ this.unparsed = true;
+ }
+ this.type = type;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OnPremManagementServiceRegisterTokenResponseData
+ */
+ @JsonAnySetter
+ public OnPremManagementServiceRegisterTokenResponseData putAdditionalProperty(
+ String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this OnPremManagementServiceRegisterTokenResponseData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OnPremManagementServiceRegisterTokenResponseData
+ onPremManagementServiceRegisterTokenResponseData =
+ (OnPremManagementServiceRegisterTokenResponseData) o;
+ return Objects.equals(
+ this.attributes, onPremManagementServiceRegisterTokenResponseData.attributes)
+ && Objects.equals(this.id, onPremManagementServiceRegisterTokenResponseData.id)
+ && Objects.equals(this.type, onPremManagementServiceRegisterTokenResponseData.type)
+ && Objects.equals(
+ this.additionalProperties,
+ onPremManagementServiceRegisterTokenResponseData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, id, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OnPremManagementServiceRegisterTokenResponseData {\n");
+ sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceRegisterTokenResponseType.java b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceRegisterTokenResponseType.java
new file mode 100644
index 00000000000..c1539dd0a49
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceRegisterTokenResponseType.java
@@ -0,0 +1,63 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.datadog.api.client.ModelEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+/** The type of the resource. The value should always be tokenDefinitions. */
+@JsonSerialize(
+ using =
+ OnPremManagementServiceRegisterTokenResponseType
+ .OnPremManagementServiceRegisterTokenResponseTypeSerializer.class)
+public class OnPremManagementServiceRegisterTokenResponseType extends ModelEnum {
+
+ private static final Set allowedValues =
+ new HashSet(Arrays.asList("tokenDefinitions"));
+
+ public static final OnPremManagementServiceRegisterTokenResponseType TOKENDEFINITIONS =
+ new OnPremManagementServiceRegisterTokenResponseType("tokenDefinitions");
+
+ OnPremManagementServiceRegisterTokenResponseType(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class OnPremManagementServiceRegisterTokenResponseTypeSerializer
+ extends StdSerializer {
+ public OnPremManagementServiceRegisterTokenResponseTypeSerializer(
+ Class t) {
+ super(t);
+ }
+
+ public OnPremManagementServiceRegisterTokenResponseTypeSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ OnPremManagementServiceRegisterTokenResponseType value,
+ JsonGenerator jgen,
+ SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static OnPremManagementServiceRegisterTokenResponseType fromValue(String value) {
+ return new OnPremManagementServiceRegisterTokenResponseType(value);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceRegisterTokenType.java b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceRegisterTokenType.java
new file mode 100644
index 00000000000..d6c7b7fcd12
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OnPremManagementServiceRegisterTokenType.java
@@ -0,0 +1,63 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.datadog.api.client.ModelEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+/** The type of the resource. The value should always be registerTokenRequest. */
+@JsonSerialize(
+ using =
+ OnPremManagementServiceRegisterTokenType.OnPremManagementServiceRegisterTokenTypeSerializer
+ .class)
+public class OnPremManagementServiceRegisterTokenType extends ModelEnum {
+
+ private static final Set allowedValues =
+ new HashSet(Arrays.asList("registerTokenRequest"));
+
+ public static final OnPremManagementServiceRegisterTokenType REGISTERTOKENREQUEST =
+ new OnPremManagementServiceRegisterTokenType("registerTokenRequest");
+
+ OnPremManagementServiceRegisterTokenType(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class OnPremManagementServiceRegisterTokenTypeSerializer
+ extends StdSerializer {
+ public OnPremManagementServiceRegisterTokenTypeSerializer(
+ Class t) {
+ super(t);
+ }
+
+ public OnPremManagementServiceRegisterTokenTypeSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ OnPremManagementServiceRegisterTokenType value,
+ JsonGenerator jgen,
+ SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static OnPremManagementServiceRegisterTokenType fromValue(String value) {
+ return new OnPremManagementServiceRegisterTokenType(value);
+ }
+}
diff --git a/src/test/resources/com/datadog/api/client/v2/api/on-prem_management_service.feature b/src/test/resources/com/datadog/api/client/v2/api/on-prem_management_service.feature
new file mode 100644
index 00000000000..c6c2ef5939b
--- /dev/null
+++ b/src/test/resources/com/datadog/api/client/v2/api/on-prem_management_service.feature
@@ -0,0 +1,74 @@
+@endpoint(on-prem-management-service) @endpoint(on-prem-management-service-v2)
+Feature: On-Prem Management Service
+ Manage on-premises runners for workflow automation and app builder. Use
+ these endpoints to enroll runners, check enrollment status, and register
+ tokens for query execution.
+
+ Background:
+ Given a valid "apiKeyAuth" key in the system
+ And a valid "appKeyAuth" key in the system
+ And an instance of "OnPremManagementService" API
+
+ @generated @skip @team:DataDog/action-platform
+ Scenario: Create an enrollment returns "Bad Request" response
+ Given operation "CreateOnPremManagementServiceEnrollment" enabled
+ And new "CreateOnPremManagementServiceEnrollment" request
+ And body with value {"data": {"attributes": {"actions_allowlist": ["com.datadoghq.jenkins.*"], "runner_host": "runner.example.com", "runner_modes": ["workflow_automation"], "runner_name": "my-runner"}, "type": "enrollment"}}
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @generated @skip @team:DataDog/action-platform
+ Scenario: Create an enrollment returns "Created" response
+ Given operation "CreateOnPremManagementServiceEnrollment" enabled
+ And new "CreateOnPremManagementServiceEnrollment" request
+ And body with value {"data": {"attributes": {"actions_allowlist": ["com.datadoghq.jenkins.*"], "runner_host": "runner.example.com", "runner_modes": ["workflow_automation"], "runner_name": "my-runner"}, "type": "enrollment"}}
+ When the request is sent
+ Then the response status is 201 Created
+
+ @generated @skip @team:DataDog/action-platform
+ Scenario: Get enrollment status returns "Bad Request" response
+ Given operation "GetOnPremManagementServiceEnrollment" enabled
+ And new "GetOnPremManagementServiceEnrollment" request
+ And request contains "token_hash" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @generated @skip @team:DataDog/action-platform
+ Scenario: Get enrollment status returns "Not Found" response
+ Given operation "GetOnPremManagementServiceEnrollment" enabled
+ And new "GetOnPremManagementServiceEnrollment" request
+ And request contains "token_hash" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 404 Not Found
+
+ @generated @skip @team:DataDog/action-platform
+ Scenario: Get enrollment status returns "OK" response
+ Given operation "GetOnPremManagementServiceEnrollment" enabled
+ And new "GetOnPremManagementServiceEnrollment" request
+ And request contains "token_hash" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 200 OK
+
+ @generated @skip @team:DataDog/action-platform
+ Scenario: Register a token returns "Bad Request" response
+ Given operation "RegisterOnPremManagementServiceToken" enabled
+ And new "RegisterOnPremManagementServiceToken" request
+ And body with value {"data": {"attributes": {"app_id": "9a93d314-ca37-461d-b18e-0587f03c6e2a", "app_version": 5, "connection_id": "2f66ec56-d1f3-4a18-908d-5e8c12dfb3b0", "query_id": "8744d459-18aa-405b-821e-df9bb101c01e", "runner_id": "runner-GBUyh2Tm6oKS6ap4kt8Bbx"}, "type": "registerTokenRequest"}}
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @generated @skip @team:DataDog/action-platform
+ Scenario: Register a token returns "Not Found" response
+ Given operation "RegisterOnPremManagementServiceToken" enabled
+ And new "RegisterOnPremManagementServiceToken" request
+ And body with value {"data": {"attributes": {"app_id": "9a93d314-ca37-461d-b18e-0587f03c6e2a", "app_version": 5, "connection_id": "2f66ec56-d1f3-4a18-908d-5e8c12dfb3b0", "query_id": "8744d459-18aa-405b-821e-df9bb101c01e", "runner_id": "runner-GBUyh2Tm6oKS6ap4kt8Bbx"}, "type": "registerTokenRequest"}}
+ When the request is sent
+ Then the response status is 404 Not Found
+
+ @generated @skip @team:DataDog/action-platform
+ Scenario: Register a token returns "OK" response
+ Given operation "RegisterOnPremManagementServiceToken" enabled
+ And new "RegisterOnPremManagementServiceToken" request
+ And body with value {"data": {"attributes": {"app_id": "9a93d314-ca37-461d-b18e-0587f03c6e2a", "app_version": 5, "connection_id": "2f66ec56-d1f3-4a18-908d-5e8c12dfb3b0", "query_id": "8744d459-18aa-405b-821e-df9bb101c01e", "runner_id": "runner-GBUyh2Tm6oKS6ap4kt8Bbx"}, "type": "registerTokenRequest"}}
+ When the request is sent
+ Then the response status is 200 OK
diff --git a/src/test/resources/com/datadog/api/client/v2/api/on_prem_management_service.feature b/src/test/resources/com/datadog/api/client/v2/api/on_prem_management_service.feature
new file mode 100644
index 00000000000..db64af2a859
--- /dev/null
+++ b/src/test/resources/com/datadog/api/client/v2/api/on_prem_management_service.feature
@@ -0,0 +1,74 @@
+@endpoint(on-prem-management-service) @endpoint(on-prem-management-service-v2)
+Feature: On Prem Management Service
+ Manage on-premises runners for workflow automation and app builder. Use
+ these endpoints to enroll runners, check enrollment status, and register
+ tokens for query execution.
+
+ Background:
+ Given a valid "apiKeyAuth" key in the system
+ And a valid "appKeyAuth" key in the system
+ And an instance of "OnPremManagementService" API
+
+ @generated @skip @team:DataDog/action-platform
+ Scenario: Create an enrollment returns "Bad Request" response
+ Given operation "CreateOnPremManagementServiceEnrollment" enabled
+ And new "CreateOnPremManagementServiceEnrollment" request
+ And body with value {"data": {"attributes": {"actions_allowlist": ["com.datadoghq.jenkins.*"], "runner_host": "runner.example.com", "runner_modes": ["workflow_automation"], "runner_name": "my-runner"}, "type": "enrollment"}}
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @generated @skip @team:DataDog/action-platform
+ Scenario: Create an enrollment returns "Created" response
+ Given operation "CreateOnPremManagementServiceEnrollment" enabled
+ And new "CreateOnPremManagementServiceEnrollment" request
+ And body with value {"data": {"attributes": {"actions_allowlist": ["com.datadoghq.jenkins.*"], "runner_host": "runner.example.com", "runner_modes": ["workflow_automation"], "runner_name": "my-runner"}, "type": "enrollment"}}
+ When the request is sent
+ Then the response status is 201 Created
+
+ @generated @skip @team:DataDog/action-platform
+ Scenario: Get enrollment status returns "Bad Request" response
+ Given operation "GetOnPremManagementServiceEnrollment" enabled
+ And new "GetOnPremManagementServiceEnrollment" request
+ And request contains "token_hash" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @generated @skip @team:DataDog/action-platform
+ Scenario: Get enrollment status returns "Not Found" response
+ Given operation "GetOnPremManagementServiceEnrollment" enabled
+ And new "GetOnPremManagementServiceEnrollment" request
+ And request contains "token_hash" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 404 Not Found
+
+ @generated @skip @team:DataDog/action-platform
+ Scenario: Get enrollment status returns "OK" response
+ Given operation "GetOnPremManagementServiceEnrollment" enabled
+ And new "GetOnPremManagementServiceEnrollment" request
+ And request contains "token_hash" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 200 OK
+
+ @generated @skip @team:DataDog/action-platform
+ Scenario: Register a token returns "Bad Request" response
+ Given operation "RegisterOnPremManagementServiceToken" enabled
+ And new "RegisterOnPremManagementServiceToken" request
+ And body with value {"data": {"attributes": {"app_id": "9a93d314-ca37-461d-b18e-0587f03c6e2a", "app_version": 5, "connection_id": "2f66ec56-d1f3-4a18-908d-5e8c12dfb3b0", "query_id": "8744d459-18aa-405b-821e-df9bb101c01e", "runner_id": "runner-GBUyh2Tm6oKS6ap4kt8Bbx"}, "type": "registerTokenRequest"}}
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @generated @skip @team:DataDog/action-platform
+ Scenario: Register a token returns "Not Found" response
+ Given operation "RegisterOnPremManagementServiceToken" enabled
+ And new "RegisterOnPremManagementServiceToken" request
+ And body with value {"data": {"attributes": {"app_id": "9a93d314-ca37-461d-b18e-0587f03c6e2a", "app_version": 5, "connection_id": "2f66ec56-d1f3-4a18-908d-5e8c12dfb3b0", "query_id": "8744d459-18aa-405b-821e-df9bb101c01e", "runner_id": "runner-GBUyh2Tm6oKS6ap4kt8Bbx"}, "type": "registerTokenRequest"}}
+ When the request is sent
+ Then the response status is 404 Not Found
+
+ @generated @skip @team:DataDog/action-platform
+ Scenario: Register a token returns "OK" response
+ Given operation "RegisterOnPremManagementServiceToken" enabled
+ And new "RegisterOnPremManagementServiceToken" request
+ And body with value {"data": {"attributes": {"app_id": "9a93d314-ca37-461d-b18e-0587f03c6e2a", "app_version": 5, "connection_id": "2f66ec56-d1f3-4a18-908d-5e8c12dfb3b0", "query_id": "8744d459-18aa-405b-821e-df9bb101c01e", "runner_id": "runner-GBUyh2Tm6oKS6ap4kt8Bbx"}, "type": "registerTokenRequest"}}
+ When the request is sent
+ Then the response status is 200 OK
diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json
index 7e549784ee6..30c80633b80 100644
--- a/src/test/resources/com/datadog/api/client/v2/api/undo.json
+++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json
@@ -3332,6 +3332,28 @@
"type": "safe"
}
},
+ "CreateOnPremManagementServiceEnrollment": {
+ "tag": "On Prem Management Service",
+ "undo": {
+ "operationId": "TODO",
+ "parameters": [],
+ "type": "unsafe"
+ }
+ },
+ "GetOnPremManagementServiceEnrollment": {
+ "tag": "On Prem Management Service",
+ "undo": {
+ "type": "safe"
+ }
+ },
+ "RegisterOnPremManagementServiceToken": {
+ "tag": "On Prem Management Service",
+ "undo": {
+ "operationId": "TODO",
+ "parameters": [],
+ "type": "unsafe"
+ }
+ },
"ListOrgConfigs": {
"tag": "Organizations",
"undo": {