diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 188cceacbd7..7d5e372cbe7 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -87671,6 +87671,69 @@ components: $ref: "#/components/schemas/SecurityMonitoringCriticalAsset" type: array type: object + SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes: + description: The attributes of a CrowdStrike entity context sync configuration to create. + properties: + domain: + description: The domain associated with the external entity source. + example: api.crowdstrike.com + type: string + integration_type: + $ref: "#/components/schemas/SecurityMonitoringIntegrationTypeCrowdStrike" + name: + description: The display name for the entity context sync configuration. + example: My CrowdStrike Integration + type: string + secrets: + $ref: "#/components/schemas/SecurityMonitoringIntegrationConfigCrowdStrikeSecrets" + settings: + $ref: "#/components/schemas/SecurityMonitoringIntegrationConfigSettings" + required: + - integration_type + - domain + - name + - secrets + type: object + SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes: + description: Fields to update on a CrowdStrike entity context sync configuration. + properties: + domain: + description: The new domain associated with the external entity source. + example: api.crowdstrike.com + type: string + enabled: + description: Whether the entity context sync should be enabled. + example: true + type: boolean + integration_type: + $ref: "#/components/schemas/SecurityMonitoringIntegrationTypeCrowdStrike" + name: + description: The new display name for the entity context sync configuration. + example: My CrowdStrike Integration (renamed) + type: string + secrets: + $ref: "#/components/schemas/SecurityMonitoringIntegrationConfigCrowdStrikeSecrets" + settings: + $ref: "#/components/schemas/SecurityMonitoringIntegrationConfigSettings" + required: + - integration_type + type: object + SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes: + description: The CrowdStrike credentials to validate against the external entity source. + properties: + domain: + description: The domain associated with the external entity source. + example: api.crowdstrike.com + type: string + integration_type: + $ref: "#/components/schemas/SecurityMonitoringIntegrationTypeCrowdStrike" + secrets: + $ref: "#/components/schemas/SecurityMonitoringIntegrationConfigCrowdStrikeSecrets" + required: + - integration_type + - domain + - secrets + type: object SecurityMonitoringDatasetAttributesRequest: description: The attributes of a dataset create or update request. properties: @@ -88229,6 +88292,61 @@ components: required: - data type: object + SecurityMonitoringEntraIdIntegrationConfigCreateAttributes: + description: The attributes of an Entra ID entity context sync configuration to create. + properties: + domain: + description: The domain associated with the external entity source. + example: siem-test.com + type: string + integration_type: + $ref: "#/components/schemas/SecurityMonitoringIntegrationTypeEntraId" + name: + description: The display name for the entity context sync configuration. + example: My Entra ID Integration + type: string + settings: + $ref: "#/components/schemas/SecurityMonitoringIntegrationConfigSettings" + required: + - integration_type + - domain + - name + type: object + SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes: + description: Fields to update on an Entra ID entity context sync configuration. + properties: + domain: + description: The new domain associated with the external entity source. + example: siem-test.com + type: string + enabled: + description: Whether the entity context sync should be enabled. + example: true + type: boolean + integration_type: + $ref: "#/components/schemas/SecurityMonitoringIntegrationTypeEntraId" + name: + description: The new display name for the entity context sync configuration. + example: My Entra ID Integration (renamed) + type: string + settings: + $ref: "#/components/schemas/SecurityMonitoringIntegrationConfigSettings" + required: + - integration_type + type: object + SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes: + description: The Entra ID credentials to validate against the external entity source. + properties: + domain: + description: The domain associated with the external entity source. + example: siem-test.com + type: string + integration_type: + $ref: "#/components/schemas/SecurityMonitoringIntegrationTypeEntraId" + required: + - integration_type + - domain + type: object SecurityMonitoringFilter: description: The rule's suppression filter. properties: @@ -88247,6 +88365,69 @@ components: x-enum-varnames: - REQUIRE - SUPPRESS + SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes: + description: The attributes of a Google Workspace entity context sync configuration to create. + properties: + domain: + description: The domain associated with the external entity source. + example: siem-test.com + type: string + integration_type: + $ref: "#/components/schemas/SecurityMonitoringIntegrationTypeGoogleWorkspace" + name: + description: The display name for the entity context sync configuration. + example: My GWS Integration + type: string + secrets: + $ref: "#/components/schemas/SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets" + settings: + $ref: "#/components/schemas/SecurityMonitoringIntegrationConfigSettings" + required: + - integration_type + - domain + - name + - secrets + type: object + SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes: + description: Fields to update on a Google Workspace entity context sync configuration. + properties: + domain: + description: The new domain associated with the external entity source. + example: siem-test.com + type: string + enabled: + description: Whether the entity context sync should be enabled. + example: true + type: boolean + integration_type: + $ref: "#/components/schemas/SecurityMonitoringIntegrationTypeGoogleWorkspace" + name: + description: The new display name for the entity context sync configuration. + example: My GWS Integration (renamed) + type: string + secrets: + $ref: "#/components/schemas/SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets" + settings: + $ref: "#/components/schemas/SecurityMonitoringIntegrationConfigSettings" + required: + - integration_type + type: object + SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes: + description: The Google Workspace credentials to validate against the external entity source. + properties: + domain: + description: The domain associated with the external entity source. + example: siem-test.com + type: string + integration_type: + $ref: "#/components/schemas/SecurityMonitoringIntegrationTypeGoogleWorkspace" + secrets: + $ref: "#/components/schemas/SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets" + required: + - integration_type + - domain + - secrets + type: object SecurityMonitoringIntegrationActivateAttributes: description: Overrides applied when activating the integration. All fields are optional. properties: @@ -88322,26 +88503,20 @@ components: type: object SecurityMonitoringIntegrationConfigCreateAttributes: description: The attributes of the entity context sync configuration to create. - properties: - domain: - description: The domain associated with the external entity source. - example: siem-test.com - type: string - integration_type: - $ref: "#/components/schemas/SecurityMonitoringIntegrationType" - name: - description: The display name for the entity context sync configuration. - example: My GWS Integration - type: string - secrets: - $ref: "#/components/schemas/SecurityMonitoringIntegrationConfigSecrets" - settings: - $ref: "#/components/schemas/SecurityMonitoringIntegrationConfigSettings" - required: - - integration_type - - domain - - name - type: object + discriminator: + mapping: + CROWDSTRIKE: "#/components/schemas/SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes" + ENTRA_ID: "#/components/schemas/SecurityMonitoringEntraIdIntegrationConfigCreateAttributes" + GOOGLE_WORKSPACE: "#/components/schemas/SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes" + OKTA: "#/components/schemas/SecurityMonitoringOktaIntegrationConfigCreateAttributes" + SENTINELONE: "#/components/schemas/SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes" + propertyName: integration_type + oneOf: + - $ref: "#/components/schemas/SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes" + - $ref: "#/components/schemas/SecurityMonitoringOktaIntegrationConfigCreateAttributes" + - $ref: "#/components/schemas/SecurityMonitoringEntraIdIntegrationConfigCreateAttributes" + - $ref: "#/components/schemas/SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes" + - $ref: "#/components/schemas/SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes" SecurityMonitoringIntegrationConfigCreateData: description: The entity context sync configuration to create. properties: @@ -88361,6 +88536,21 @@ components: required: - data type: object + SecurityMonitoringIntegrationConfigCrowdStrikeSecrets: + description: Credentials for a CrowdStrike entity context sync. + properties: + client_id: + description: The CrowdStrike API client ID. + example: abcdef0123456789abcdef0123456789 + type: string + client_secret: + description: The CrowdStrike API client secret. + example: aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789ABCDEF + type: string + required: + - client_id + - client_secret + type: object SecurityMonitoringIntegrationConfigData: description: An entity context sync configuration. properties: @@ -88377,6 +88567,54 @@ components: - type - attributes type: object + SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets: + description: Credentials for a Google Workspace entity context sync. + properties: + admin_email: + description: The admin email to impersonate for domain-wide delegation. + example: admin@example.com + type: string + service_account_json: + $ref: "#/components/schemas/SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount" + required: + - service_account_json + type: object + SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount: + additionalProperties: {} + description: The Google Cloud service account JSON used to authenticate against the Google Workspace Admin SDK. Additional keys beyond those documented are preserved. + properties: + client_email: + description: The service account client email. + example: svc@my-project.iam.gserviceaccount.com + type: string + private_key: + description: The service account private key. + example: "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----" + type: string + project_id: + description: The Google Cloud project ID that owns the service account. + example: my-project + type: string + type: + description: The service account type. Must be `service_account`. + example: service_account + type: string + required: + - type + - project_id + - private_key + - client_email + type: object + SecurityMonitoringIntegrationConfigOktaSecrets: + description: Credentials for an Okta entity context sync. + properties: + api_token: + description: The Okta API token used to authenticate against the Okta API. + example: 00aBcDeFgHiJkLmNoPqRsTuVwXyZ + type: string + required: + - api_token + type: object SecurityMonitoringIntegrationConfigResourceType: default: integration_config description: The type of the resource. The value should always be `integration_config`. @@ -88394,13 +88632,15 @@ components: required: - data type: object - SecurityMonitoringIntegrationConfigSecrets: - additionalProperties: {} - description: |- - The secrets used to authenticate against the external entity source. The accepted keys depend on the source type - (for example, `admin_email` for Google Workspace). Not required for source types that do not use secrets (for example, `ENTRA_ID`). - example: - admin_email: test@example.com + SecurityMonitoringIntegrationConfigSentinelOneSecrets: + description: Credentials for a SentinelOne entity context sync. + properties: + api_token: + description: The SentinelOne API token. + example: aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789 + type: string + required: + - api_token type: object SecurityMonitoringIntegrationConfigSettings: additionalProperties: {} @@ -88421,27 +88661,21 @@ components: - INVALID - INITIALIZING SecurityMonitoringIntegrationConfigUpdateAttributes: - description: Fields to update on the entity context sync configuration. All fields are optional. - properties: - domain: - description: The new domain associated with the external entity source. - example: siem-test.com - type: string - enabled: - description: Whether the entity context sync should be enabled. - example: true - type: boolean - integration_type: - $ref: "#/components/schemas/SecurityMonitoringIntegrationType" - name: - description: The new display name for the entity context sync configuration. - example: My GWS Integration (renamed) - type: string - secrets: - $ref: "#/components/schemas/SecurityMonitoringIntegrationConfigSecrets" - settings: - $ref: "#/components/schemas/SecurityMonitoringIntegrationConfigSettings" - type: object + description: Fields to update on the entity context sync configuration. All fields other than the integration type are optional. + discriminator: + mapping: + CROWDSTRIKE: "#/components/schemas/SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes" + ENTRA_ID: "#/components/schemas/SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes" + GOOGLE_WORKSPACE: "#/components/schemas/SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes" + OKTA: "#/components/schemas/SecurityMonitoringOktaIntegrationConfigUpdateAttributes" + SENTINELONE: "#/components/schemas/SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes" + propertyName: integration_type + oneOf: + - $ref: "#/components/schemas/SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes" + - $ref: "#/components/schemas/SecurityMonitoringOktaIntegrationConfigUpdateAttributes" + - $ref: "#/components/schemas/SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes" + - $ref: "#/components/schemas/SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes" + - $ref: "#/components/schemas/SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes" SecurityMonitoringIntegrationConfigUpdateData: description: The entity context sync configuration fields to update. properties: @@ -88474,19 +88708,20 @@ components: type: object SecurityMonitoringIntegrationCredentialsValidateAttributes: description: The credentials to validate against the external entity source. - properties: - domain: - description: The domain associated with the external entity source. - example: siem-test.com - type: string - integration_type: - $ref: "#/components/schemas/SecurityMonitoringIntegrationType" - secrets: - $ref: "#/components/schemas/SecurityMonitoringIntegrationConfigSecrets" - required: - - integration_type - - domain - type: object + discriminator: + mapping: + CROWDSTRIKE: "#/components/schemas/SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes" + ENTRA_ID: "#/components/schemas/SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes" + GOOGLE_WORKSPACE: "#/components/schemas/SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes" + OKTA: "#/components/schemas/SecurityMonitoringOktaIntegrationCredentialsValidateAttributes" + SENTINELONE: "#/components/schemas/SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes" + propertyName: integration_type + oneOf: + - $ref: "#/components/schemas/SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes" + - $ref: "#/components/schemas/SecurityMonitoringOktaIntegrationCredentialsValidateAttributes" + - $ref: "#/components/schemas/SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes" + - $ref: "#/components/schemas/SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes" + - $ref: "#/components/schemas/SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes" SecurityMonitoringIntegrationCredentialsValidateData: description: The credentials to validate. properties: @@ -88512,12 +88747,56 @@ components: - GOOGLE_WORKSPACE - OKTA - ENTRA_ID + - CROWDSTRIKE + - SENTINELONE example: GOOGLE_WORKSPACE type: string x-enum-varnames: - GOOGLE_WORKSPACE - OKTA - ENTRA_ID + - CROWDSTRIKE + - SENTINELONE + SecurityMonitoringIntegrationTypeCrowdStrike: + description: The source type for a CrowdStrike entity context sync. + enum: + - CROWDSTRIKE + example: CROWDSTRIKE + type: string + x-enum-varnames: + - CROWDSTRIKE + SecurityMonitoringIntegrationTypeEntraId: + description: The source type for an Entra ID entity context sync. + enum: + - ENTRA_ID + example: ENTRA_ID + type: string + x-enum-varnames: + - ENTRA_ID + SecurityMonitoringIntegrationTypeGoogleWorkspace: + description: The source type for a Google Workspace entity context sync. + enum: + - GOOGLE_WORKSPACE + example: GOOGLE_WORKSPACE + type: string + x-enum-varnames: + - GOOGLE_WORKSPACE + SecurityMonitoringIntegrationTypeOkta: + description: The source type for an Okta entity context sync. + enum: + - OKTA + example: OKTA + type: string + x-enum-varnames: + - OKTA + SecurityMonitoringIntegrationTypeSentinelOne: + description: The source type for a SentinelOne entity context sync. + enum: + - SENTINELONE + example: SENTINELONE + type: string + x-enum-varnames: + - SENTINELONE SecurityMonitoringListRulesResponse: description: List of rules. properties: @@ -88529,6 +88808,69 @@ components: meta: $ref: "#/components/schemas/ResponseMetaAttributes" type: object + SecurityMonitoringOktaIntegrationConfigCreateAttributes: + description: The attributes of an Okta entity context sync configuration to create. + properties: + domain: + description: The domain associated with the external entity source. + example: siem-test.com + type: string + integration_type: + $ref: "#/components/schemas/SecurityMonitoringIntegrationTypeOkta" + name: + description: The display name for the entity context sync configuration. + example: My Okta Integration + type: string + secrets: + $ref: "#/components/schemas/SecurityMonitoringIntegrationConfigOktaSecrets" + settings: + $ref: "#/components/schemas/SecurityMonitoringIntegrationConfigSettings" + required: + - integration_type + - domain + - name + - secrets + type: object + SecurityMonitoringOktaIntegrationConfigUpdateAttributes: + description: Fields to update on an Okta entity context sync configuration. + properties: + domain: + description: The new domain associated with the external entity source. + example: siem-test.com + type: string + enabled: + description: Whether the entity context sync should be enabled. + example: true + type: boolean + integration_type: + $ref: "#/components/schemas/SecurityMonitoringIntegrationTypeOkta" + name: + description: The new display name for the entity context sync configuration. + example: My Okta Integration (renamed) + type: string + secrets: + $ref: "#/components/schemas/SecurityMonitoringIntegrationConfigOktaSecrets" + settings: + $ref: "#/components/schemas/SecurityMonitoringIntegrationConfigSettings" + required: + - integration_type + type: object + SecurityMonitoringOktaIntegrationCredentialsValidateAttributes: + description: The Okta credentials to validate against the external entity source. + properties: + domain: + description: The domain associated with the external entity source. + example: siem-test.com + type: string + integration_type: + $ref: "#/components/schemas/SecurityMonitoringIntegrationTypeOkta" + secrets: + $ref: "#/components/schemas/SecurityMonitoringIntegrationConfigOktaSecrets" + required: + - integration_type + - domain + - secrets + type: object SecurityMonitoringPaginatedSuppressionsResponse: description: Response object containing the available suppression rules with pagination metadata. properties: @@ -89489,6 +89831,69 @@ components: example: America/New_York type: string type: object + SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes: + description: The attributes of a SentinelOne entity context sync configuration to create. + properties: + domain: + description: The domain associated with the external entity source. + example: acme.sentinelone.net + type: string + integration_type: + $ref: "#/components/schemas/SecurityMonitoringIntegrationTypeSentinelOne" + name: + description: The display name for the entity context sync configuration. + example: My SentinelOne Integration + type: string + secrets: + $ref: "#/components/schemas/SecurityMonitoringIntegrationConfigSentinelOneSecrets" + settings: + $ref: "#/components/schemas/SecurityMonitoringIntegrationConfigSettings" + required: + - integration_type + - domain + - name + - secrets + type: object + SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes: + description: Fields to update on a SentinelOne entity context sync configuration. + properties: + domain: + description: The new domain associated with the external entity source. + example: acme.sentinelone.net + type: string + enabled: + description: Whether the entity context sync should be enabled. + example: true + type: boolean + integration_type: + $ref: "#/components/schemas/SecurityMonitoringIntegrationTypeSentinelOne" + name: + description: The new display name for the entity context sync configuration. + example: My SentinelOne Integration (renamed) + type: string + secrets: + $ref: "#/components/schemas/SecurityMonitoringIntegrationConfigSentinelOneSecrets" + settings: + $ref: "#/components/schemas/SecurityMonitoringIntegrationConfigSettings" + required: + - integration_type + type: object + SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes: + description: The SentinelOne credentials to validate against the external entity source. + properties: + domain: + description: The domain associated with the external entity source. + example: acme.sentinelone.net + type: string + integration_type: + $ref: "#/components/schemas/SecurityMonitoringIntegrationTypeSentinelOne" + secrets: + $ref: "#/components/schemas/SecurityMonitoringIntegrationConfigSentinelOneSecrets" + required: + - integration_type + - domain + - secrets + type: object SecurityMonitoringSignal: description: Object description of a security signal. properties: diff --git a/examples/v2/security-monitoring/CreateSecurityMonitoringIntegrationConfig.java b/examples/v2/security-monitoring/CreateSecurityMonitoringIntegrationConfig.java index d8bef892ebe..2381dd57f72 100644 --- a/examples/v2/security-monitoring/CreateSecurityMonitoringIntegrationConfig.java +++ b/examples/v2/security-monitoring/CreateSecurityMonitoringIntegrationConfig.java @@ -3,12 +3,15 @@ import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes; import com.datadog.api.client.v2.model.SecurityMonitoringIntegrationConfigCreateAttributes; import com.datadog.api.client.v2.model.SecurityMonitoringIntegrationConfigCreateData; import com.datadog.api.client.v2.model.SecurityMonitoringIntegrationConfigCreateRequest; +import com.datadog.api.client.v2.model.SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets; +import com.datadog.api.client.v2.model.SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount; import com.datadog.api.client.v2.model.SecurityMonitoringIntegrationConfigResourceType; import com.datadog.api.client.v2.model.SecurityMonitoringIntegrationConfigResponse; -import com.datadog.api.client.v2.model.SecurityMonitoringIntegrationType; +import com.datadog.api.client.v2.model.SecurityMonitoringIntegrationTypeGoogleWorkspace; import java.util.Map; public class Example { @@ -22,12 +25,29 @@ public static void main(String[] args) { .data( new SecurityMonitoringIntegrationConfigCreateData() .attributes( - new SecurityMonitoringIntegrationConfigCreateAttributes() - .domain("siem-test.com") - .integrationType(SecurityMonitoringIntegrationType.GOOGLE_WORKSPACE) - .name("My GWS Integration") - .secrets(Map.ofEntries(Map.entry("admin_email", "test@example.com"))) - .settings(Map.ofEntries(Map.entry("setting1", "value1")))) + new SecurityMonitoringIntegrationConfigCreateAttributes( + new SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes() + .domain("siem-test.com") + .integrationType( + SecurityMonitoringIntegrationTypeGoogleWorkspace + .GOOGLE_WORKSPACE) + .name("My GWS Integration") + .secrets( + new SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets() + .adminEmail("admin@example.com") + .serviceAccountJson( + new SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount() + .clientEmail( + "svc@my-project.iam.gserviceaccount.com") + .privateKey( + """ +-----BEGIN PRIVATE KEY----- +... +-----END PRIVATE KEY----- +""") + .projectId("my-project") + .type("service_account"))) + .settings(Map.ofEntries(Map.entry("setting1", "value1"))))) .type(SecurityMonitoringIntegrationConfigResourceType.INTEGRATION_CONFIG)); try { diff --git a/examples/v2/security-monitoring/UpdateSecurityMonitoringIntegrationConfig.java b/examples/v2/security-monitoring/UpdateSecurityMonitoringIntegrationConfig.java index 93fd59484df..4e7458b0a20 100644 --- a/examples/v2/security-monitoring/UpdateSecurityMonitoringIntegrationConfig.java +++ b/examples/v2/security-monitoring/UpdateSecurityMonitoringIntegrationConfig.java @@ -3,12 +3,15 @@ import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes; +import com.datadog.api.client.v2.model.SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets; +import com.datadog.api.client.v2.model.SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount; import com.datadog.api.client.v2.model.SecurityMonitoringIntegrationConfigResourceType; import com.datadog.api.client.v2.model.SecurityMonitoringIntegrationConfigResponse; import com.datadog.api.client.v2.model.SecurityMonitoringIntegrationConfigUpdateAttributes; import com.datadog.api.client.v2.model.SecurityMonitoringIntegrationConfigUpdateData; import com.datadog.api.client.v2.model.SecurityMonitoringIntegrationConfigUpdateRequest; -import com.datadog.api.client.v2.model.SecurityMonitoringIntegrationType; +import com.datadog.api.client.v2.model.SecurityMonitoringIntegrationTypeGoogleWorkspace; import java.util.Map; public class Example { @@ -22,13 +25,30 @@ public static void main(String[] args) { .data( new SecurityMonitoringIntegrationConfigUpdateData() .attributes( - new SecurityMonitoringIntegrationConfigUpdateAttributes() - .domain("siem-test.com") - .enabled(true) - .integrationType(SecurityMonitoringIntegrationType.GOOGLE_WORKSPACE) - .name("My GWS Integration (renamed)") - .secrets(Map.ofEntries(Map.entry("admin_email", "test@example.com"))) - .settings(Map.ofEntries(Map.entry("setting1", "value1")))) + new SecurityMonitoringIntegrationConfigUpdateAttributes( + new SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes() + .domain("siem-test.com") + .enabled(true) + .integrationType( + SecurityMonitoringIntegrationTypeGoogleWorkspace + .GOOGLE_WORKSPACE) + .name("My GWS Integration (renamed)") + .secrets( + new SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets() + .adminEmail("admin@example.com") + .serviceAccountJson( + new SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount() + .clientEmail( + "svc@my-project.iam.gserviceaccount.com") + .privateKey( + """ +-----BEGIN PRIVATE KEY----- +... +-----END PRIVATE KEY----- +""") + .projectId("my-project") + .type("service_account"))) + .settings(Map.ofEntries(Map.entry("setting1", "value1"))))) .type(SecurityMonitoringIntegrationConfigResourceType.INTEGRATION_CONFIG)); try { diff --git a/examples/v2/security-monitoring/ValidateSecurityMonitoringIntegrationCredentials.java b/examples/v2/security-monitoring/ValidateSecurityMonitoringIntegrationCredentials.java index e06735e4bdc..0d751201c99 100644 --- a/examples/v2/security-monitoring/ValidateSecurityMonitoringIntegrationCredentials.java +++ b/examples/v2/security-monitoring/ValidateSecurityMonitoringIntegrationCredentials.java @@ -3,12 +3,14 @@ import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes; +import com.datadog.api.client.v2.model.SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets; +import com.datadog.api.client.v2.model.SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount; import com.datadog.api.client.v2.model.SecurityMonitoringIntegrationConfigResourceType; import com.datadog.api.client.v2.model.SecurityMonitoringIntegrationCredentialsValidateAttributes; import com.datadog.api.client.v2.model.SecurityMonitoringIntegrationCredentialsValidateData; import com.datadog.api.client.v2.model.SecurityMonitoringIntegrationCredentialsValidateRequest; -import com.datadog.api.client.v2.model.SecurityMonitoringIntegrationType; -import java.util.Map; +import com.datadog.api.client.v2.model.SecurityMonitoringIntegrationTypeGoogleWorkspace; public class Example { public static void main(String[] args) { @@ -22,10 +24,27 @@ public static void main(String[] args) { .data( new SecurityMonitoringIntegrationCredentialsValidateData() .attributes( - new SecurityMonitoringIntegrationCredentialsValidateAttributes() - .domain("siem-test.com") - .integrationType(SecurityMonitoringIntegrationType.GOOGLE_WORKSPACE) - .secrets(Map.ofEntries(Map.entry("admin_email", "test@example.com")))) + new SecurityMonitoringIntegrationCredentialsValidateAttributes( + new SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes() + .domain("siem-test.com") + .integrationType( + SecurityMonitoringIntegrationTypeGoogleWorkspace + .GOOGLE_WORKSPACE) + .secrets( + new SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets() + .adminEmail("admin@example.com") + .serviceAccountJson( + new SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount() + .clientEmail( + "svc@my-project.iam.gserviceaccount.com") + .privateKey( + """ +-----BEGIN PRIVATE KEY----- +... +-----END PRIVATE KEY----- +""") + .projectId("my-project") + .type("service_account"))))) .type(SecurityMonitoringIntegrationConfigResourceType.INTEGRATION_CONFIG)); try { diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes.java new file mode 100644 index 00000000000..99814aa4b8c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes.java @@ -0,0 +1,292 @@ +/* + * 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; + +/** The attributes of a CrowdStrike entity context sync configuration to create. */ +@JsonPropertyOrder({ + SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes.JSON_PROPERTY_DOMAIN, + SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes.JSON_PROPERTY_INTEGRATION_TYPE, + SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes.JSON_PROPERTY_NAME, + SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes.JSON_PROPERTY_SECRETS, + SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DOMAIN = "domain"; + private String domain; + + public static final String JSON_PROPERTY_INTEGRATION_TYPE = "integration_type"; + private SecurityMonitoringIntegrationTypeCrowdStrike integrationType; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SECRETS = "secrets"; + private SecurityMonitoringIntegrationConfigCrowdStrikeSecrets secrets; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private Map settings = null; + + public SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes() {} + + @JsonCreator + public SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_DOMAIN) String domain, + @JsonProperty(required = true, value = JSON_PROPERTY_INTEGRATION_TYPE) + SecurityMonitoringIntegrationTypeCrowdStrike integrationType, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_SECRETS) + SecurityMonitoringIntegrationConfigCrowdStrikeSecrets secrets) { + this.domain = domain; + this.integrationType = integrationType; + this.unparsed |= !integrationType.isValid(); + this.name = name; + this.secrets = secrets; + this.unparsed |= secrets.unparsed; + } + + public SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes domain(String domain) { + this.domain = domain; + return this; + } + + /** + * The domain associated with the external entity source. + * + * @return domain + */ + @JsonProperty(JSON_PROPERTY_DOMAIN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes integrationType( + SecurityMonitoringIntegrationTypeCrowdStrike integrationType) { + this.integrationType = integrationType; + this.unparsed |= !integrationType.isValid(); + return this; + } + + /** + * The source type for a CrowdStrike entity context sync. + * + * @return integrationType + */ + @JsonProperty(JSON_PROPERTY_INTEGRATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringIntegrationTypeCrowdStrike getIntegrationType() { + return integrationType; + } + + public void setIntegrationType(SecurityMonitoringIntegrationTypeCrowdStrike integrationType) { + if (!integrationType.isValid()) { + this.unparsed = true; + } + this.integrationType = integrationType; + } + + public SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The display name for the entity context sync configuration. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes secrets( + SecurityMonitoringIntegrationConfigCrowdStrikeSecrets secrets) { + this.secrets = secrets; + this.unparsed |= secrets.unparsed; + return this; + } + + /** + * Credentials for a CrowdStrike entity context sync. + * + * @return secrets + */ + @JsonProperty(JSON_PROPERTY_SECRETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringIntegrationConfigCrowdStrikeSecrets getSecrets() { + return secrets; + } + + public void setSecrets(SecurityMonitoringIntegrationConfigCrowdStrikeSecrets secrets) { + this.secrets = secrets; + } + + public SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes settings( + Map settings) { + this.settings = settings; + return this; + } + + public SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes putSettingsItem( + String key, Object settingsItem) { + if (this.settings == null) { + this.settings = new HashMap<>(); + } + this.settings.put(key, settingsItem); + return this; + } + + /** + * Free-form, non-sensitive settings for the entity context sync. The accepted keys depend on the + * source type. + * + * @return settings + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getSettings() { + return settings; + } + + public void setSettings(Map settings) { + this.settings = settings; + } + + /** + * 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 SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes + */ + @JsonAnySetter + public SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes 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 SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes + securityMonitoringCrowdStrikeIntegrationConfigCreateAttributes = + (SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes) o; + return Objects.equals( + this.domain, securityMonitoringCrowdStrikeIntegrationConfigCreateAttributes.domain) + && Objects.equals( + this.integrationType, + securityMonitoringCrowdStrikeIntegrationConfigCreateAttributes.integrationType) + && Objects.equals( + this.name, securityMonitoringCrowdStrikeIntegrationConfigCreateAttributes.name) + && Objects.equals( + this.secrets, securityMonitoringCrowdStrikeIntegrationConfigCreateAttributes.secrets) + && Objects.equals( + this.settings, securityMonitoringCrowdStrikeIntegrationConfigCreateAttributes.settings) + && Objects.equals( + this.additionalProperties, + securityMonitoringCrowdStrikeIntegrationConfigCreateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(domain, integrationType, name, secrets, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes {\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" integrationType: ").append(toIndentedString(integrationType)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" secrets: ").append(toIndentedString(secrets)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).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/SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes.java new file mode 100644 index 00000000000..805f497fb28 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes.java @@ -0,0 +1,316 @@ +/* + * 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; + +/** Fields to update on a CrowdStrike entity context sync configuration. */ +@JsonPropertyOrder({ + SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes.JSON_PROPERTY_DOMAIN, + SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes.JSON_PROPERTY_ENABLED, + SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes.JSON_PROPERTY_INTEGRATION_TYPE, + SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes.JSON_PROPERTY_NAME, + SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes.JSON_PROPERTY_SECRETS, + SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DOMAIN = "domain"; + private String domain; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_INTEGRATION_TYPE = "integration_type"; + private SecurityMonitoringIntegrationTypeCrowdStrike integrationType; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SECRETS = "secrets"; + private SecurityMonitoringIntegrationConfigCrowdStrikeSecrets secrets; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private Map settings = null; + + public SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes() {} + + @JsonCreator + public SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_INTEGRATION_TYPE) + SecurityMonitoringIntegrationTypeCrowdStrike integrationType) { + this.integrationType = integrationType; + this.unparsed |= !integrationType.isValid(); + } + + public SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes domain(String domain) { + this.domain = domain; + return this; + } + + /** + * The new domain associated with the external entity source. + * + * @return domain + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DOMAIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the entity context sync should be enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes integrationType( + SecurityMonitoringIntegrationTypeCrowdStrike integrationType) { + this.integrationType = integrationType; + this.unparsed |= !integrationType.isValid(); + return this; + } + + /** + * The source type for a CrowdStrike entity context sync. + * + * @return integrationType + */ + @JsonProperty(JSON_PROPERTY_INTEGRATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringIntegrationTypeCrowdStrike getIntegrationType() { + return integrationType; + } + + public void setIntegrationType(SecurityMonitoringIntegrationTypeCrowdStrike integrationType) { + if (!integrationType.isValid()) { + this.unparsed = true; + } + this.integrationType = integrationType; + } + + public SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The new display name for the entity context sync configuration. + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes secrets( + SecurityMonitoringIntegrationConfigCrowdStrikeSecrets secrets) { + this.secrets = secrets; + this.unparsed |= secrets.unparsed; + return this; + } + + /** + * Credentials for a CrowdStrike entity context sync. + * + * @return secrets + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SECRETS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringIntegrationConfigCrowdStrikeSecrets getSecrets() { + return secrets; + } + + public void setSecrets(SecurityMonitoringIntegrationConfigCrowdStrikeSecrets secrets) { + this.secrets = secrets; + } + + public SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes settings( + Map settings) { + this.settings = settings; + return this; + } + + public SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes putSettingsItem( + String key, Object settingsItem) { + if (this.settings == null) { + this.settings = new HashMap<>(); + } + this.settings.put(key, settingsItem); + return this; + } + + /** + * Free-form, non-sensitive settings for the entity context sync. The accepted keys depend on the + * source type. + * + * @return settings + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getSettings() { + return settings; + } + + public void setSettings(Map settings) { + this.settings = settings; + } + + /** + * 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 SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes + */ + @JsonAnySetter + public SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes 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 SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes + securityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes = + (SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes) o; + return Objects.equals( + this.domain, securityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes.domain) + && Objects.equals( + this.enabled, securityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes.enabled) + && Objects.equals( + this.integrationType, + securityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes.integrationType) + && Objects.equals( + this.name, securityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes.name) + && Objects.equals( + this.secrets, securityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes.secrets) + && Objects.equals( + this.settings, securityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes.settings) + && Objects.equals( + this.additionalProperties, + securityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + domain, enabled, integrationType, name, secrets, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes {\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" integrationType: ").append(toIndentedString(integrationType)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" secrets: ").append(toIndentedString(secrets)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).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/SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes.java new file mode 100644 index 00000000000..6b98163808f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes.java @@ -0,0 +1,229 @@ +/* + * 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; + +/** The CrowdStrike credentials to validate against the external entity source. */ +@JsonPropertyOrder({ + SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes.JSON_PROPERTY_DOMAIN, + SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes + .JSON_PROPERTY_INTEGRATION_TYPE, + SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes.JSON_PROPERTY_SECRETS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DOMAIN = "domain"; + private String domain; + + public static final String JSON_PROPERTY_INTEGRATION_TYPE = "integration_type"; + private SecurityMonitoringIntegrationTypeCrowdStrike integrationType; + + public static final String JSON_PROPERTY_SECRETS = "secrets"; + private SecurityMonitoringIntegrationConfigCrowdStrikeSecrets secrets; + + public SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes() {} + + @JsonCreator + public SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_DOMAIN) String domain, + @JsonProperty(required = true, value = JSON_PROPERTY_INTEGRATION_TYPE) + SecurityMonitoringIntegrationTypeCrowdStrike integrationType, + @JsonProperty(required = true, value = JSON_PROPERTY_SECRETS) + SecurityMonitoringIntegrationConfigCrowdStrikeSecrets secrets) { + this.domain = domain; + this.integrationType = integrationType; + this.unparsed |= !integrationType.isValid(); + this.secrets = secrets; + this.unparsed |= secrets.unparsed; + } + + public SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes domain( + String domain) { + this.domain = domain; + return this; + } + + /** + * The domain associated with the external entity source. + * + * @return domain + */ + @JsonProperty(JSON_PROPERTY_DOMAIN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes integrationType( + SecurityMonitoringIntegrationTypeCrowdStrike integrationType) { + this.integrationType = integrationType; + this.unparsed |= !integrationType.isValid(); + return this; + } + + /** + * The source type for a CrowdStrike entity context sync. + * + * @return integrationType + */ + @JsonProperty(JSON_PROPERTY_INTEGRATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringIntegrationTypeCrowdStrike getIntegrationType() { + return integrationType; + } + + public void setIntegrationType(SecurityMonitoringIntegrationTypeCrowdStrike integrationType) { + if (!integrationType.isValid()) { + this.unparsed = true; + } + this.integrationType = integrationType; + } + + public SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes secrets( + SecurityMonitoringIntegrationConfigCrowdStrikeSecrets secrets) { + this.secrets = secrets; + this.unparsed |= secrets.unparsed; + return this; + } + + /** + * Credentials for a CrowdStrike entity context sync. + * + * @return secrets + */ + @JsonProperty(JSON_PROPERTY_SECRETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringIntegrationConfigCrowdStrikeSecrets getSecrets() { + return secrets; + } + + public void setSecrets(SecurityMonitoringIntegrationConfigCrowdStrikeSecrets secrets) { + this.secrets = secrets; + } + + /** + * 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 SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes + */ + @JsonAnySetter + public SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes + 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 SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes + * object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes + securityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes = + (SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes) o; + return Objects.equals( + this.domain, + securityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes.domain) + && Objects.equals( + this.integrationType, + securityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes.integrationType) + && Objects.equals( + this.secrets, + securityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes.secrets) + && Objects.equals( + this.additionalProperties, + securityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes + .additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(domain, integrationType, secrets, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes {\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" integrationType: ").append(toIndentedString(integrationType)).append("\n"); + sb.append(" secrets: ").append(toIndentedString(secrets)).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/SecurityMonitoringEntraIdIntegrationConfigCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringEntraIdIntegrationConfigCreateAttributes.java new file mode 100644 index 00000000000..3b45134dace --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringEntraIdIntegrationConfigCreateAttributes.java @@ -0,0 +1,259 @@ +/* + * 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; + +/** The attributes of an Entra ID entity context sync configuration to create. */ +@JsonPropertyOrder({ + SecurityMonitoringEntraIdIntegrationConfigCreateAttributes.JSON_PROPERTY_DOMAIN, + SecurityMonitoringEntraIdIntegrationConfigCreateAttributes.JSON_PROPERTY_INTEGRATION_TYPE, + SecurityMonitoringEntraIdIntegrationConfigCreateAttributes.JSON_PROPERTY_NAME, + SecurityMonitoringEntraIdIntegrationConfigCreateAttributes.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringEntraIdIntegrationConfigCreateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DOMAIN = "domain"; + private String domain; + + public static final String JSON_PROPERTY_INTEGRATION_TYPE = "integration_type"; + private SecurityMonitoringIntegrationTypeEntraId integrationType; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private Map settings = null; + + public SecurityMonitoringEntraIdIntegrationConfigCreateAttributes() {} + + @JsonCreator + public SecurityMonitoringEntraIdIntegrationConfigCreateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_DOMAIN) String domain, + @JsonProperty(required = true, value = JSON_PROPERTY_INTEGRATION_TYPE) + SecurityMonitoringIntegrationTypeEntraId integrationType, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { + this.domain = domain; + this.integrationType = integrationType; + this.unparsed |= !integrationType.isValid(); + this.name = name; + } + + public SecurityMonitoringEntraIdIntegrationConfigCreateAttributes domain(String domain) { + this.domain = domain; + return this; + } + + /** + * The domain associated with the external entity source. + * + * @return domain + */ + @JsonProperty(JSON_PROPERTY_DOMAIN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public SecurityMonitoringEntraIdIntegrationConfigCreateAttributes integrationType( + SecurityMonitoringIntegrationTypeEntraId integrationType) { + this.integrationType = integrationType; + this.unparsed |= !integrationType.isValid(); + return this; + } + + /** + * The source type for an Entra ID entity context sync. + * + * @return integrationType + */ + @JsonProperty(JSON_PROPERTY_INTEGRATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringIntegrationTypeEntraId getIntegrationType() { + return integrationType; + } + + public void setIntegrationType(SecurityMonitoringIntegrationTypeEntraId integrationType) { + if (!integrationType.isValid()) { + this.unparsed = true; + } + this.integrationType = integrationType; + } + + public SecurityMonitoringEntraIdIntegrationConfigCreateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The display name for the entity context sync configuration. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public SecurityMonitoringEntraIdIntegrationConfigCreateAttributes settings( + Map settings) { + this.settings = settings; + return this; + } + + public SecurityMonitoringEntraIdIntegrationConfigCreateAttributes putSettingsItem( + String key, Object settingsItem) { + if (this.settings == null) { + this.settings = new HashMap<>(); + } + this.settings.put(key, settingsItem); + return this; + } + + /** + * Free-form, non-sensitive settings for the entity context sync. The accepted keys depend on the + * source type. + * + * @return settings + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getSettings() { + return settings; + } + + public void setSettings(Map settings) { + this.settings = settings; + } + + /** + * 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 SecurityMonitoringEntraIdIntegrationConfigCreateAttributes + */ + @JsonAnySetter + public SecurityMonitoringEntraIdIntegrationConfigCreateAttributes 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 SecurityMonitoringEntraIdIntegrationConfigCreateAttributes object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringEntraIdIntegrationConfigCreateAttributes + securityMonitoringEntraIdIntegrationConfigCreateAttributes = + (SecurityMonitoringEntraIdIntegrationConfigCreateAttributes) o; + return Objects.equals( + this.domain, securityMonitoringEntraIdIntegrationConfigCreateAttributes.domain) + && Objects.equals( + this.integrationType, + securityMonitoringEntraIdIntegrationConfigCreateAttributes.integrationType) + && Objects.equals( + this.name, securityMonitoringEntraIdIntegrationConfigCreateAttributes.name) + && Objects.equals( + this.settings, securityMonitoringEntraIdIntegrationConfigCreateAttributes.settings) + && Objects.equals( + this.additionalProperties, + securityMonitoringEntraIdIntegrationConfigCreateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(domain, integrationType, name, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringEntraIdIntegrationConfigCreateAttributes {\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" integrationType: ").append(toIndentedString(integrationType)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).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/SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes.java new file mode 100644 index 00000000000..0fc2619d336 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes.java @@ -0,0 +1,285 @@ +/* + * 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; + +/** Fields to update on an Entra ID entity context sync configuration. */ +@JsonPropertyOrder({ + SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes.JSON_PROPERTY_DOMAIN, + SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes.JSON_PROPERTY_ENABLED, + SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes.JSON_PROPERTY_INTEGRATION_TYPE, + SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes.JSON_PROPERTY_NAME, + SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DOMAIN = "domain"; + private String domain; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_INTEGRATION_TYPE = "integration_type"; + private SecurityMonitoringIntegrationTypeEntraId integrationType; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private Map settings = null; + + public SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes() {} + + @JsonCreator + public SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_INTEGRATION_TYPE) + SecurityMonitoringIntegrationTypeEntraId integrationType) { + this.integrationType = integrationType; + this.unparsed |= !integrationType.isValid(); + } + + public SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes domain(String domain) { + this.domain = domain; + return this; + } + + /** + * The new domain associated with the external entity source. + * + * @return domain + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DOMAIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the entity context sync should be enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes integrationType( + SecurityMonitoringIntegrationTypeEntraId integrationType) { + this.integrationType = integrationType; + this.unparsed |= !integrationType.isValid(); + return this; + } + + /** + * The source type for an Entra ID entity context sync. + * + * @return integrationType + */ + @JsonProperty(JSON_PROPERTY_INTEGRATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringIntegrationTypeEntraId getIntegrationType() { + return integrationType; + } + + public void setIntegrationType(SecurityMonitoringIntegrationTypeEntraId integrationType) { + if (!integrationType.isValid()) { + this.unparsed = true; + } + this.integrationType = integrationType; + } + + public SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The new display name for the entity context sync configuration. + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes settings( + Map settings) { + this.settings = settings; + return this; + } + + public SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes putSettingsItem( + String key, Object settingsItem) { + if (this.settings == null) { + this.settings = new HashMap<>(); + } + this.settings.put(key, settingsItem); + return this; + } + + /** + * Free-form, non-sensitive settings for the entity context sync. The accepted keys depend on the + * source type. + * + * @return settings + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getSettings() { + return settings; + } + + public void setSettings(Map settings) { + this.settings = settings; + } + + /** + * 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 SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes + */ + @JsonAnySetter + public SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes 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 SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes + securityMonitoringEntraIdIntegrationConfigUpdateAttributes = + (SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes) o; + return Objects.equals( + this.domain, securityMonitoringEntraIdIntegrationConfigUpdateAttributes.domain) + && Objects.equals( + this.enabled, securityMonitoringEntraIdIntegrationConfigUpdateAttributes.enabled) + && Objects.equals( + this.integrationType, + securityMonitoringEntraIdIntegrationConfigUpdateAttributes.integrationType) + && Objects.equals( + this.name, securityMonitoringEntraIdIntegrationConfigUpdateAttributes.name) + && Objects.equals( + this.settings, securityMonitoringEntraIdIntegrationConfigUpdateAttributes.settings) + && Objects.equals( + this.additionalProperties, + securityMonitoringEntraIdIntegrationConfigUpdateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(domain, enabled, integrationType, name, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes {\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" integrationType: ").append(toIndentedString(integrationType)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).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/SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes.java new file mode 100644 index 00000000000..69134cd8f63 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes.java @@ -0,0 +1,191 @@ +/* + * 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; + +/** The Entra ID credentials to validate against the external entity source. */ +@JsonPropertyOrder({ + SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes.JSON_PROPERTY_DOMAIN, + SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes.JSON_PROPERTY_INTEGRATION_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DOMAIN = "domain"; + private String domain; + + public static final String JSON_PROPERTY_INTEGRATION_TYPE = "integration_type"; + private SecurityMonitoringIntegrationTypeEntraId integrationType; + + public SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes() {} + + @JsonCreator + public SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_DOMAIN) String domain, + @JsonProperty(required = true, value = JSON_PROPERTY_INTEGRATION_TYPE) + SecurityMonitoringIntegrationTypeEntraId integrationType) { + this.domain = domain; + this.integrationType = integrationType; + this.unparsed |= !integrationType.isValid(); + } + + public SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes domain(String domain) { + this.domain = domain; + return this; + } + + /** + * The domain associated with the external entity source. + * + * @return domain + */ + @JsonProperty(JSON_PROPERTY_DOMAIN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes integrationType( + SecurityMonitoringIntegrationTypeEntraId integrationType) { + this.integrationType = integrationType; + this.unparsed |= !integrationType.isValid(); + return this; + } + + /** + * The source type for an Entra ID entity context sync. + * + * @return integrationType + */ + @JsonProperty(JSON_PROPERTY_INTEGRATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringIntegrationTypeEntraId getIntegrationType() { + return integrationType; + } + + public void setIntegrationType(SecurityMonitoringIntegrationTypeEntraId integrationType) { + if (!integrationType.isValid()) { + this.unparsed = true; + } + this.integrationType = integrationType; + } + + /** + * 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 SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes + */ + @JsonAnySetter + public SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes 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 SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes + securityMonitoringEntraIdIntegrationCredentialsValidateAttributes = + (SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes) o; + return Objects.equals( + this.domain, securityMonitoringEntraIdIntegrationCredentialsValidateAttributes.domain) + && Objects.equals( + this.integrationType, + securityMonitoringEntraIdIntegrationCredentialsValidateAttributes.integrationType) + && Objects.equals( + this.additionalProperties, + securityMonitoringEntraIdIntegrationCredentialsValidateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(domain, integrationType, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes {\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" integrationType: ").append(toIndentedString(integrationType)).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/SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes.java new file mode 100644 index 00000000000..9f8071b1d81 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes.java @@ -0,0 +1,295 @@ +/* + * 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; + +/** The attributes of a Google Workspace entity context sync configuration to create. */ +@JsonPropertyOrder({ + SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes.JSON_PROPERTY_DOMAIN, + SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes.JSON_PROPERTY_INTEGRATION_TYPE, + SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes.JSON_PROPERTY_NAME, + SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes.JSON_PROPERTY_SECRETS, + SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DOMAIN = "domain"; + private String domain; + + public static final String JSON_PROPERTY_INTEGRATION_TYPE = "integration_type"; + private SecurityMonitoringIntegrationTypeGoogleWorkspace integrationType; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SECRETS = "secrets"; + private SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets secrets; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private Map settings = null; + + public SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes() {} + + @JsonCreator + public SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_DOMAIN) String domain, + @JsonProperty(required = true, value = JSON_PROPERTY_INTEGRATION_TYPE) + SecurityMonitoringIntegrationTypeGoogleWorkspace integrationType, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_SECRETS) + SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets secrets) { + this.domain = domain; + this.integrationType = integrationType; + this.unparsed |= !integrationType.isValid(); + this.name = name; + this.secrets = secrets; + this.unparsed |= secrets.unparsed; + } + + public SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes domain(String domain) { + this.domain = domain; + return this; + } + + /** + * The domain associated with the external entity source. + * + * @return domain + */ + @JsonProperty(JSON_PROPERTY_DOMAIN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes integrationType( + SecurityMonitoringIntegrationTypeGoogleWorkspace integrationType) { + this.integrationType = integrationType; + this.unparsed |= !integrationType.isValid(); + return this; + } + + /** + * The source type for a Google Workspace entity context sync. + * + * @return integrationType + */ + @JsonProperty(JSON_PROPERTY_INTEGRATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringIntegrationTypeGoogleWorkspace getIntegrationType() { + return integrationType; + } + + public void setIntegrationType(SecurityMonitoringIntegrationTypeGoogleWorkspace integrationType) { + if (!integrationType.isValid()) { + this.unparsed = true; + } + this.integrationType = integrationType; + } + + public SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The display name for the entity context sync configuration. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes secrets( + SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets secrets) { + this.secrets = secrets; + this.unparsed |= secrets.unparsed; + return this; + } + + /** + * Credentials for a Google Workspace entity context sync. + * + * @return secrets + */ + @JsonProperty(JSON_PROPERTY_SECRETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets getSecrets() { + return secrets; + } + + public void setSecrets(SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets secrets) { + this.secrets = secrets; + } + + public SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes settings( + Map settings) { + this.settings = settings; + return this; + } + + public SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes putSettingsItem( + String key, Object settingsItem) { + if (this.settings == null) { + this.settings = new HashMap<>(); + } + this.settings.put(key, settingsItem); + return this; + } + + /** + * Free-form, non-sensitive settings for the entity context sync. The accepted keys depend on the + * source type. + * + * @return settings + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getSettings() { + return settings; + } + + public void setSettings(Map settings) { + this.settings = settings; + } + + /** + * 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 SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes + */ + @JsonAnySetter + public SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes 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 SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes object + * is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes + securityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes = + (SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes) o; + return Objects.equals( + this.domain, securityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes.domain) + && Objects.equals( + this.integrationType, + securityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes.integrationType) + && Objects.equals( + this.name, securityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes.name) + && Objects.equals( + this.secrets, + securityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes.secrets) + && Objects.equals( + this.settings, + securityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes.settings) + && Objects.equals( + this.additionalProperties, + securityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes + .additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(domain, integrationType, name, secrets, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes {\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" integrationType: ").append(toIndentedString(integrationType)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" secrets: ").append(toIndentedString(secrets)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).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/SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes.java new file mode 100644 index 00000000000..82d127354da --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes.java @@ -0,0 +1,321 @@ +/* + * 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; + +/** Fields to update on a Google Workspace entity context sync configuration. */ +@JsonPropertyOrder({ + SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes.JSON_PROPERTY_DOMAIN, + SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes.JSON_PROPERTY_ENABLED, + SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes.JSON_PROPERTY_INTEGRATION_TYPE, + SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes.JSON_PROPERTY_NAME, + SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes.JSON_PROPERTY_SECRETS, + SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DOMAIN = "domain"; + private String domain; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_INTEGRATION_TYPE = "integration_type"; + private SecurityMonitoringIntegrationTypeGoogleWorkspace integrationType; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SECRETS = "secrets"; + private SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets secrets; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private Map settings = null; + + public SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes() {} + + @JsonCreator + public SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_INTEGRATION_TYPE) + SecurityMonitoringIntegrationTypeGoogleWorkspace integrationType) { + this.integrationType = integrationType; + this.unparsed |= !integrationType.isValid(); + } + + public SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes domain(String domain) { + this.domain = domain; + return this; + } + + /** + * The new domain associated with the external entity source. + * + * @return domain + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DOMAIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes enabled( + Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the entity context sync should be enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes integrationType( + SecurityMonitoringIntegrationTypeGoogleWorkspace integrationType) { + this.integrationType = integrationType; + this.unparsed |= !integrationType.isValid(); + return this; + } + + /** + * The source type for a Google Workspace entity context sync. + * + * @return integrationType + */ + @JsonProperty(JSON_PROPERTY_INTEGRATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringIntegrationTypeGoogleWorkspace getIntegrationType() { + return integrationType; + } + + public void setIntegrationType(SecurityMonitoringIntegrationTypeGoogleWorkspace integrationType) { + if (!integrationType.isValid()) { + this.unparsed = true; + } + this.integrationType = integrationType; + } + + public SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The new display name for the entity context sync configuration. + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes secrets( + SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets secrets) { + this.secrets = secrets; + this.unparsed |= secrets.unparsed; + return this; + } + + /** + * Credentials for a Google Workspace entity context sync. + * + * @return secrets + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SECRETS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets getSecrets() { + return secrets; + } + + public void setSecrets(SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets secrets) { + this.secrets = secrets; + } + + public SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes settings( + Map settings) { + this.settings = settings; + return this; + } + + public SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes putSettingsItem( + String key, Object settingsItem) { + if (this.settings == null) { + this.settings = new HashMap<>(); + } + this.settings.put(key, settingsItem); + return this; + } + + /** + * Free-form, non-sensitive settings for the entity context sync. The accepted keys depend on the + * source type. + * + * @return settings + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getSettings() { + return settings; + } + + public void setSettings(Map settings) { + this.settings = settings; + } + + /** + * 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 SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes + */ + @JsonAnySetter + public SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes 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 SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes object + * is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes + securityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes = + (SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes) o; + return Objects.equals( + this.domain, securityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes.domain) + && Objects.equals( + this.enabled, + securityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes.enabled) + && Objects.equals( + this.integrationType, + securityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes.integrationType) + && Objects.equals( + this.name, securityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes.name) + && Objects.equals( + this.secrets, + securityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes.secrets) + && Objects.equals( + this.settings, + securityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes.settings) + && Objects.equals( + this.additionalProperties, + securityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes + .additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + domain, enabled, integrationType, name, secrets, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes {\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" integrationType: ").append(toIndentedString(integrationType)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" secrets: ").append(toIndentedString(secrets)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).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/SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes.java new file mode 100644 index 00000000000..b73ffe1b801 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes.java @@ -0,0 +1,231 @@ +/* + * 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; + +/** The Google Workspace credentials to validate against the external entity source. */ +@JsonPropertyOrder({ + SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes.JSON_PROPERTY_DOMAIN, + SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes + .JSON_PROPERTY_INTEGRATION_TYPE, + SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes.JSON_PROPERTY_SECRETS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DOMAIN = "domain"; + private String domain; + + public static final String JSON_PROPERTY_INTEGRATION_TYPE = "integration_type"; + private SecurityMonitoringIntegrationTypeGoogleWorkspace integrationType; + + public static final String JSON_PROPERTY_SECRETS = "secrets"; + private SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets secrets; + + public SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes() {} + + @JsonCreator + public SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_DOMAIN) String domain, + @JsonProperty(required = true, value = JSON_PROPERTY_INTEGRATION_TYPE) + SecurityMonitoringIntegrationTypeGoogleWorkspace integrationType, + @JsonProperty(required = true, value = JSON_PROPERTY_SECRETS) + SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets secrets) { + this.domain = domain; + this.integrationType = integrationType; + this.unparsed |= !integrationType.isValid(); + this.secrets = secrets; + this.unparsed |= secrets.unparsed; + } + + public SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes domain( + String domain) { + this.domain = domain; + return this; + } + + /** + * The domain associated with the external entity source. + * + * @return domain + */ + @JsonProperty(JSON_PROPERTY_DOMAIN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes integrationType( + SecurityMonitoringIntegrationTypeGoogleWorkspace integrationType) { + this.integrationType = integrationType; + this.unparsed |= !integrationType.isValid(); + return this; + } + + /** + * The source type for a Google Workspace entity context sync. + * + * @return integrationType + */ + @JsonProperty(JSON_PROPERTY_INTEGRATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringIntegrationTypeGoogleWorkspace getIntegrationType() { + return integrationType; + } + + public void setIntegrationType(SecurityMonitoringIntegrationTypeGoogleWorkspace integrationType) { + if (!integrationType.isValid()) { + this.unparsed = true; + } + this.integrationType = integrationType; + } + + public SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes secrets( + SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets secrets) { + this.secrets = secrets; + this.unparsed |= secrets.unparsed; + return this; + } + + /** + * Credentials for a Google Workspace entity context sync. + * + * @return secrets + */ + @JsonProperty(JSON_PROPERTY_SECRETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets getSecrets() { + return secrets; + } + + public void setSecrets(SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets secrets) { + this.secrets = secrets; + } + + /** + * 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 SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes + */ + @JsonAnySetter + public SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes + 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 SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes + * object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes + securityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes = + (SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes) o; + return Objects.equals( + this.domain, + securityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes.domain) + && Objects.equals( + this.integrationType, + securityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes + .integrationType) + && Objects.equals( + this.secrets, + securityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes.secrets) + && Objects.equals( + this.additionalProperties, + securityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes + .additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(domain, integrationType, secrets, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append( + "class SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes {\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" integrationType: ").append(toIndentedString(integrationType)).append("\n"); + sb.append(" secrets: ").append(toIndentedString(secrets)).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/SecurityMonitoringIntegrationConfigCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationConfigCreateAttributes.java index 4d57d06a57b..e6b32520b46 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationConfigCreateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationConfigCreateAttributes.java @@ -6,289 +6,656 @@ 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.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.JSON; +import com.datadog.api.client.UnparsedObject; 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 com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import jakarta.ws.rs.core.GenericType; +import java.io.IOException; +import java.util.Collections; import java.util.HashMap; +import java.util.HashSet; import java.util.Map; -import java.util.Objects; - -/** The attributes of the entity context sync configuration to create. */ -@JsonPropertyOrder({ - SecurityMonitoringIntegrationConfigCreateAttributes.JSON_PROPERTY_DOMAIN, - SecurityMonitoringIntegrationConfigCreateAttributes.JSON_PROPERTY_INTEGRATION_TYPE, - SecurityMonitoringIntegrationConfigCreateAttributes.JSON_PROPERTY_NAME, - SecurityMonitoringIntegrationConfigCreateAttributes.JSON_PROPERTY_SECRETS, - SecurityMonitoringIntegrationConfigCreateAttributes.JSON_PROPERTY_SETTINGS -}) +import java.util.logging.Level; +import java.util.logging.Logger; + @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class SecurityMonitoringIntegrationConfigCreateAttributes { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_DOMAIN = "domain"; - private String domain; +@JsonDeserialize( + using = + SecurityMonitoringIntegrationConfigCreateAttributes + .SecurityMonitoringIntegrationConfigCreateAttributesDeserializer.class) +@JsonSerialize( + using = + SecurityMonitoringIntegrationConfigCreateAttributes + .SecurityMonitoringIntegrationConfigCreateAttributesSerializer.class) +public class SecurityMonitoringIntegrationConfigCreateAttributes extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(SecurityMonitoringIntegrationConfigCreateAttributes.class.getName()); - public static final String JSON_PROPERTY_INTEGRATION_TYPE = "integration_type"; - private SecurityMonitoringIntegrationType integrationType; + @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_NAME = "name"; - private String name; + public static class SecurityMonitoringIntegrationConfigCreateAttributesSerializer + extends StdSerializer { + public SecurityMonitoringIntegrationConfigCreateAttributesSerializer( + Class t) { + super(t); + } - public static final String JSON_PROPERTY_SECRETS = "secrets"; - private Map secrets = null; + public SecurityMonitoringIntegrationConfigCreateAttributesSerializer() { + this(null); + } - public static final String JSON_PROPERTY_SETTINGS = "settings"; - private Map settings = null; + @Override + public void serialize( + SecurityMonitoringIntegrationConfigCreateAttributes value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } - public SecurityMonitoringIntegrationConfigCreateAttributes() {} + public static class SecurityMonitoringIntegrationConfigCreateAttributesDeserializer + extends StdDeserializer { + public SecurityMonitoringIntegrationConfigCreateAttributesDeserializer() { + this(SecurityMonitoringIntegrationConfigCreateAttributes.class); + } - @JsonCreator - public SecurityMonitoringIntegrationConfigCreateAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_DOMAIN) String domain, - @JsonProperty(required = true, value = JSON_PROPERTY_INTEGRATION_TYPE) - SecurityMonitoringIntegrationType integrationType, - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.domain = domain; - this.integrationType = integrationType; - this.unparsed |= !integrationType.isValid(); - this.name = name; - } + public SecurityMonitoringIntegrationConfigCreateAttributesDeserializer(Class vc) { + super(vc); + } - public SecurityMonitoringIntegrationConfigCreateAttributes domain(String domain) { - this.domain = domain; - return this; - } + @Override + public SecurityMonitoringIntegrationConfigCreateAttributes deserialize( + JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + Object tmp = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes.class.equals( + Integer.class) + || SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes.class.equals( + Long.class) + || SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes.class.equals( + Float.class) + || SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes.class.equals( + Double.class) + || SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes.class.equals( + Boolean.class) + || SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes.class.equals( + String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes.class.equals( + Integer.class) + || SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes.class + .equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes.class.equals( + Float.class) + || SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes.class + .equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes.class.equals( + Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes.class.equals( + String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs( + SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes) tmp) + .unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema" + + " 'SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes'", + e); + } + + // deserialize SecurityMonitoringOktaIntegrationConfigCreateAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SecurityMonitoringOktaIntegrationConfigCreateAttributes.class.equals(Integer.class) + || SecurityMonitoringOktaIntegrationConfigCreateAttributes.class.equals(Long.class) + || SecurityMonitoringOktaIntegrationConfigCreateAttributes.class.equals(Float.class) + || SecurityMonitoringOktaIntegrationConfigCreateAttributes.class.equals(Double.class) + || SecurityMonitoringOktaIntegrationConfigCreateAttributes.class.equals(Boolean.class) + || SecurityMonitoringOktaIntegrationConfigCreateAttributes.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((SecurityMonitoringOktaIntegrationConfigCreateAttributes.class.equals( + Integer.class) + || SecurityMonitoringOktaIntegrationConfigCreateAttributes.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((SecurityMonitoringOktaIntegrationConfigCreateAttributes.class.equals(Float.class) + || SecurityMonitoringOktaIntegrationConfigCreateAttributes.class.equals( + Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (SecurityMonitoringOktaIntegrationConfigCreateAttributes.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (SecurityMonitoringOktaIntegrationConfigCreateAttributes.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs(SecurityMonitoringOktaIntegrationConfigCreateAttributes.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((SecurityMonitoringOktaIntegrationConfigCreateAttributes) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema" + + " 'SecurityMonitoringOktaIntegrationConfigCreateAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'SecurityMonitoringOktaIntegrationConfigCreateAttributes'", + e); + } + + // deserialize SecurityMonitoringEntraIdIntegrationConfigCreateAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SecurityMonitoringEntraIdIntegrationConfigCreateAttributes.class.equals(Integer.class) + || SecurityMonitoringEntraIdIntegrationConfigCreateAttributes.class.equals(Long.class) + || SecurityMonitoringEntraIdIntegrationConfigCreateAttributes.class.equals(Float.class) + || SecurityMonitoringEntraIdIntegrationConfigCreateAttributes.class.equals(Double.class) + || SecurityMonitoringEntraIdIntegrationConfigCreateAttributes.class.equals( + Boolean.class) + || SecurityMonitoringEntraIdIntegrationConfigCreateAttributes.class.equals( + String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((SecurityMonitoringEntraIdIntegrationConfigCreateAttributes.class.equals( + Integer.class) + || SecurityMonitoringEntraIdIntegrationConfigCreateAttributes.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((SecurityMonitoringEntraIdIntegrationConfigCreateAttributes.class.equals( + Float.class) + || SecurityMonitoringEntraIdIntegrationConfigCreateAttributes.class.equals( + Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (SecurityMonitoringEntraIdIntegrationConfigCreateAttributes.class.equals( + Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (SecurityMonitoringEntraIdIntegrationConfigCreateAttributes.class.equals( + String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs(SecurityMonitoringEntraIdIntegrationConfigCreateAttributes.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((SecurityMonitoringEntraIdIntegrationConfigCreateAttributes) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema" + + " 'SecurityMonitoringEntraIdIntegrationConfigCreateAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'SecurityMonitoringEntraIdIntegrationConfigCreateAttributes'", + e); + } + + // deserialize SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes.class.equals( + Integer.class) + || SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes.class.equals( + Long.class) + || SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes.class.equals( + Float.class) + || SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes.class.equals( + Double.class) + || SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes.class.equals( + Boolean.class) + || SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes.class.equals( + String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes.class.equals( + Integer.class) + || SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes.class + .equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes.class.equals( + Float.class) + || SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes.class + .equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes.class.equals( + Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes.class.equals( + String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs( + SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema" + + " 'SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes'", + e); + } + + // deserialize SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes.class.equals( + Integer.class) + || SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes.class.equals( + Long.class) + || SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes.class.equals( + Float.class) + || SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes.class.equals( + Double.class) + || SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes.class.equals( + Boolean.class) + || SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes.class.equals( + String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes.class.equals( + Integer.class) + || SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes.class + .equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes.class.equals( + Float.class) + || SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes.class + .equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes.class.equals( + Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes.class.equals( + String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs( + SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema" + + " 'SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes'", + e); + } + + SecurityMonitoringIntegrationConfigCreateAttributes ret = + new SecurityMonitoringIntegrationConfigCreateAttributes(); + if (match == 1) { + ret.setActualInstance(deserialized); + } else { + Map res = + new ObjectMapper() + .readValue( + tree.traverse(jp.getCodec()).readValueAsTree().toString(), + new TypeReference>() {}); + ret.setActualInstance(new UnparsedObject(res)); + } + return ret; + } - /** - * The domain associated with the external entity source. - * - * @return domain - */ - @JsonProperty(JSON_PROPERTY_DOMAIN) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getDomain() { - return domain; + /** Handle deserialization of the 'null' value. */ + @Override + public SecurityMonitoringIntegrationConfigCreateAttributes getNullValue( + DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "SecurityMonitoringIntegrationConfigCreateAttributes cannot be null"); + } } - public void setDomain(String domain) { - this.domain = domain; - } + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); - public SecurityMonitoringIntegrationConfigCreateAttributes integrationType( - SecurityMonitoringIntegrationType integrationType) { - this.integrationType = integrationType; - this.unparsed |= !integrationType.isValid(); - return this; + public SecurityMonitoringIntegrationConfigCreateAttributes() { + super("oneOf", Boolean.FALSE); } - /** - * The type of external source that provides entities to Cloud SIEM. - * - * @return integrationType - */ - @JsonProperty(JSON_PROPERTY_INTEGRATION_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SecurityMonitoringIntegrationType getIntegrationType() { - return integrationType; + public SecurityMonitoringIntegrationConfigCreateAttributes( + SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - public void setIntegrationType(SecurityMonitoringIntegrationType integrationType) { - if (!integrationType.isValid()) { - this.unparsed = true; - } - this.integrationType = integrationType; + public SecurityMonitoringIntegrationConfigCreateAttributes( + SecurityMonitoringOktaIntegrationConfigCreateAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - public SecurityMonitoringIntegrationConfigCreateAttributes name(String name) { - this.name = name; - return this; + public SecurityMonitoringIntegrationConfigCreateAttributes( + SecurityMonitoringEntraIdIntegrationConfigCreateAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - /** - * The display name for the entity context sync configuration. - * - * @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; + public SecurityMonitoringIntegrationConfigCreateAttributes( + SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - public void setName(String name) { - this.name = name; + public SecurityMonitoringIntegrationConfigCreateAttributes( + SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - public SecurityMonitoringIntegrationConfigCreateAttributes secrets(Map secrets) { - this.secrets = secrets; - return this; + static { + schemas.put( + "SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes", + new GenericType() {}); + schemas.put( + "SecurityMonitoringOktaIntegrationConfigCreateAttributes", + new GenericType() {}); + schemas.put( + "SecurityMonitoringEntraIdIntegrationConfigCreateAttributes", + new GenericType() {}); + schemas.put( + "SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes", + new GenericType() {}); + schemas.put( + "SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes", + new GenericType() {}); + JSON.registerDescendants( + SecurityMonitoringIntegrationConfigCreateAttributes.class, + Collections.unmodifiableMap(schemas)); } - public SecurityMonitoringIntegrationConfigCreateAttributes putSecretsItem( - String key, Object secretsItem) { - if (this.secrets == null) { - this.secrets = new HashMap<>(); - } - this.secrets.put(key, secretsItem); - return this; + @Override + public Map getSchemas() { + return SecurityMonitoringIntegrationConfigCreateAttributes.schemas; } /** - * The secrets used to authenticate against the external entity source. The accepted keys depend - * on the source type (for example, admin_email for Google Workspace). Not required - * for source types that do not use secrets (for example, ENTRA_ID). + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: + * SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes, + * SecurityMonitoringOktaIntegrationConfigCreateAttributes, + * SecurityMonitoringEntraIdIntegrationConfigCreateAttributes, + * SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes, + * SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes * - * @return secrets + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a + * composed schema (allOf, anyOf, oneOf). */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SECRETS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getSecrets() { - return secrets; - } - - public void setSecrets(Map secrets) { - this.secrets = secrets; - } - - public SecurityMonitoringIntegrationConfigCreateAttributes settings( - Map settings) { - this.settings = settings; - return this; - } + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf( + SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes.class, + instance, + new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + SecurityMonitoringOktaIntegrationConfigCreateAttributes.class, + instance, + new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + SecurityMonitoringEntraIdIntegrationConfigCreateAttributes.class, + instance, + new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes.class, + instance, + new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes.class, + instance, + new HashSet>())) { + super.setActualInstance(instance); + return; + } - public SecurityMonitoringIntegrationConfigCreateAttributes putSettingsItem( - String key, Object settingsItem) { - if (this.settings == null) { - this.settings = new HashMap<>(); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - this.settings.put(key, settingsItem); - return this; + throw new RuntimeException( + "Invalid instance type. Must be" + + " SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes," + + " SecurityMonitoringOktaIntegrationConfigCreateAttributes," + + " SecurityMonitoringEntraIdIntegrationConfigCreateAttributes," + + " SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes," + + " SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes"); } /** - * Free-form, non-sensitive settings for the entity context sync. The accepted keys depend on the - * source type. + * Get the actual instance, which can be the following: + * SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes, + * SecurityMonitoringOktaIntegrationConfigCreateAttributes, + * SecurityMonitoringEntraIdIntegrationConfigCreateAttributes, + * SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes, + * SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes * - * @return settings + * @return The actual instance + * (SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes, + * SecurityMonitoringOktaIntegrationConfigCreateAttributes, + * SecurityMonitoringEntraIdIntegrationConfigCreateAttributes, + * SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes, + * SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes) */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SETTINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getSettings() { - return settings; - } - - public void setSettings(Map settings) { - this.settings = settings; + @Override + public Object getActualInstance() { + return super.getActualInstance(); } /** - * 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. + * Get the actual instance of + * `SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes`. If the actual instance is + * not `SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes`, the + * ClassCastException will be thrown. * - * @param key The arbitrary key to set - * @param value The associated value - * @return SecurityMonitoringIntegrationConfigCreateAttributes + * @return The actual instance of + * `SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes` + * @throws ClassCastException if the instance is not + * `SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes` */ - @JsonAnySetter - public SecurityMonitoringIntegrationConfigCreateAttributes putAdditionalProperty( - String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; + public SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes + getSecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes() + throws ClassCastException { + return (SecurityMonitoringGoogleWorkspaceIntegrationConfigCreateAttributes) + super.getActualInstance(); } /** - * Return the additional (undeclared) property. + * Get the actual instance of `SecurityMonitoringOktaIntegrationConfigCreateAttributes`. If the + * actual instance is not `SecurityMonitoringOktaIntegrationConfigCreateAttributes`, the + * ClassCastException will be thrown. * - * @return The additional properties + * @return The actual instance of `SecurityMonitoringOktaIntegrationConfigCreateAttributes` + * @throws ClassCastException if the instance is not + * `SecurityMonitoringOktaIntegrationConfigCreateAttributes` */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; + public SecurityMonitoringOktaIntegrationConfigCreateAttributes + getSecurityMonitoringOktaIntegrationConfigCreateAttributes() throws ClassCastException { + return (SecurityMonitoringOktaIntegrationConfigCreateAttributes) super.getActualInstance(); } /** - * Return the additional (undeclared) property with the specified name. + * Get the actual instance of `SecurityMonitoringEntraIdIntegrationConfigCreateAttributes`. If the + * actual instance is not `SecurityMonitoringEntraIdIntegrationConfigCreateAttributes`, the + * ClassCastException will be thrown. * - * @param key The arbitrary key to get - * @return The specific additional property for the given key + * @return The actual instance of `SecurityMonitoringEntraIdIntegrationConfigCreateAttributes` + * @throws ClassCastException if the instance is not + * `SecurityMonitoringEntraIdIntegrationConfigCreateAttributes` */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); + public SecurityMonitoringEntraIdIntegrationConfigCreateAttributes + getSecurityMonitoringEntraIdIntegrationConfigCreateAttributes() throws ClassCastException { + return (SecurityMonitoringEntraIdIntegrationConfigCreateAttributes) super.getActualInstance(); } /** - * Return true if this SecurityMonitoringIntegrationConfigCreateAttributes object is equal to o. + * Get the actual instance of `SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes`. If + * the actual instance is not `SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes` + * @throws ClassCastException if the instance is not + * `SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes` */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SecurityMonitoringIntegrationConfigCreateAttributes - securityMonitoringIntegrationConfigCreateAttributes = - (SecurityMonitoringIntegrationConfigCreateAttributes) o; - return Objects.equals(this.domain, securityMonitoringIntegrationConfigCreateAttributes.domain) - && Objects.equals( - this.integrationType, - securityMonitoringIntegrationConfigCreateAttributes.integrationType) - && Objects.equals(this.name, securityMonitoringIntegrationConfigCreateAttributes.name) - && Objects.equals(this.secrets, securityMonitoringIntegrationConfigCreateAttributes.secrets) - && Objects.equals( - this.settings, securityMonitoringIntegrationConfigCreateAttributes.settings) - && Objects.equals( - this.additionalProperties, - securityMonitoringIntegrationConfigCreateAttributes.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(domain, integrationType, name, secrets, settings, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SecurityMonitoringIntegrationConfigCreateAttributes {\n"); - sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); - sb.append(" integrationType: ").append(toIndentedString(integrationType)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" secrets: ").append(toIndentedString(secrets)).append("\n"); - sb.append(" settings: ").append(toIndentedString(settings)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append('}'); - return sb.toString(); + public SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes + getSecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes() + throws ClassCastException { + return (SecurityMonitoringCrowdStrikeIntegrationConfigCreateAttributes) + super.getActualInstance(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * Get the actual instance of `SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes`. If + * the actual instance is not `SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes` + * @throws ClassCastException if the instance is not + * `SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes` */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + public SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes + getSecurityMonitoringSentinelOneIntegrationConfigCreateAttributes() + throws ClassCastException { + return (SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes) + super.getActualInstance(); } } diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationConfigCrowdStrikeSecrets.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationConfigCrowdStrikeSecrets.java new file mode 100644 index 00000000000..7ef1676c6ed --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationConfigCrowdStrikeSecrets.java @@ -0,0 +1,182 @@ +/* + * 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; + +/** Credentials for a CrowdStrike entity context sync. */ +@JsonPropertyOrder({ + SecurityMonitoringIntegrationConfigCrowdStrikeSecrets.JSON_PROPERTY_CLIENT_ID, + SecurityMonitoringIntegrationConfigCrowdStrikeSecrets.JSON_PROPERTY_CLIENT_SECRET +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringIntegrationConfigCrowdStrikeSecrets { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + private String clientId; + + public static final String JSON_PROPERTY_CLIENT_SECRET = "client_secret"; + private String clientSecret; + + public SecurityMonitoringIntegrationConfigCrowdStrikeSecrets() {} + + @JsonCreator + public SecurityMonitoringIntegrationConfigCrowdStrikeSecrets( + @JsonProperty(required = true, value = JSON_PROPERTY_CLIENT_ID) String clientId, + @JsonProperty(required = true, value = JSON_PROPERTY_CLIENT_SECRET) String clientSecret) { + this.clientId = clientId; + this.clientSecret = clientSecret; + } + + public SecurityMonitoringIntegrationConfigCrowdStrikeSecrets clientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * The CrowdStrike API client ID. + * + * @return clientId + */ + @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getClientId() { + return clientId; + } + + public void setClientId(String clientId) { + this.clientId = clientId; + } + + public SecurityMonitoringIntegrationConfigCrowdStrikeSecrets clientSecret(String clientSecret) { + this.clientSecret = clientSecret; + return this; + } + + /** + * The CrowdStrike API client secret. + * + * @return clientSecret + */ + @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getClientSecret() { + return clientSecret; + } + + public void setClientSecret(String clientSecret) { + this.clientSecret = clientSecret; + } + + /** + * 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 SecurityMonitoringIntegrationConfigCrowdStrikeSecrets + */ + @JsonAnySetter + public SecurityMonitoringIntegrationConfigCrowdStrikeSecrets 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 SecurityMonitoringIntegrationConfigCrowdStrikeSecrets object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringIntegrationConfigCrowdStrikeSecrets + securityMonitoringIntegrationConfigCrowdStrikeSecrets = + (SecurityMonitoringIntegrationConfigCrowdStrikeSecrets) o; + return Objects.equals( + this.clientId, securityMonitoringIntegrationConfigCrowdStrikeSecrets.clientId) + && Objects.equals( + this.clientSecret, securityMonitoringIntegrationConfigCrowdStrikeSecrets.clientSecret) + && Objects.equals( + this.additionalProperties, + securityMonitoringIntegrationConfigCrowdStrikeSecrets.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(clientId, clientSecret, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringIntegrationConfigCrowdStrikeSecrets {\n"); + sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); + sb.append(" clientSecret: ").append(toIndentedString(clientSecret)).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/SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets.java new file mode 100644 index 00000000000..fddff27f0cf --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets.java @@ -0,0 +1,189 @@ +/* + * 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; + +/** Credentials for a Google Workspace entity context sync. */ +@JsonPropertyOrder({ + SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets.JSON_PROPERTY_ADMIN_EMAIL, + SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets.JSON_PROPERTY_SERVICE_ACCOUNT_JSON +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ADMIN_EMAIL = "admin_email"; + private String adminEmail; + + public static final String JSON_PROPERTY_SERVICE_ACCOUNT_JSON = "service_account_json"; + private SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount serviceAccountJson; + + public SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets() {} + + @JsonCreator + public SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets( + @JsonProperty(required = true, value = JSON_PROPERTY_SERVICE_ACCOUNT_JSON) + SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount serviceAccountJson) { + this.serviceAccountJson = serviceAccountJson; + this.unparsed |= serviceAccountJson.unparsed; + } + + public SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets adminEmail(String adminEmail) { + this.adminEmail = adminEmail; + return this; + } + + /** + * The admin email to impersonate for domain-wide delegation. + * + * @return adminEmail + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADMIN_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAdminEmail() { + return adminEmail; + } + + public void setAdminEmail(String adminEmail) { + this.adminEmail = adminEmail; + } + + public SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets serviceAccountJson( + SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount serviceAccountJson) { + this.serviceAccountJson = serviceAccountJson; + this.unparsed |= serviceAccountJson.unparsed; + return this; + } + + /** + * The Google Cloud service account JSON used to authenticate against the Google Workspace Admin + * SDK. Additional keys beyond those documented are preserved. + * + * @return serviceAccountJson + */ + @JsonProperty(JSON_PROPERTY_SERVICE_ACCOUNT_JSON) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount getServiceAccountJson() { + return serviceAccountJson; + } + + public void setServiceAccountJson( + SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount serviceAccountJson) { + this.serviceAccountJson = serviceAccountJson; + } + + /** + * 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 SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets + */ + @JsonAnySetter + public SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets 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 SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets + securityMonitoringIntegrationConfigGoogleWorkspaceSecrets = + (SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets) o; + return Objects.equals( + this.adminEmail, securityMonitoringIntegrationConfigGoogleWorkspaceSecrets.adminEmail) + && Objects.equals( + this.serviceAccountJson, + securityMonitoringIntegrationConfigGoogleWorkspaceSecrets.serviceAccountJson) + && Objects.equals( + this.additionalProperties, + securityMonitoringIntegrationConfigGoogleWorkspaceSecrets.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(adminEmail, serviceAccountJson, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringIntegrationConfigGoogleWorkspaceSecrets {\n"); + sb.append(" adminEmail: ").append(toIndentedString(adminEmail)).append("\n"); + sb.append(" serviceAccountJson: ").append(toIndentedString(serviceAccountJson)).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/SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount.java new file mode 100644 index 00000000000..73b59f94029 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount.java @@ -0,0 +1,250 @@ +/* + * 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; + +/** + * The Google Cloud service account JSON used to authenticate against the Google Workspace Admin + * SDK. Additional keys beyond those documented are preserved. + */ +@JsonPropertyOrder({ + SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount.JSON_PROPERTY_CLIENT_EMAIL, + SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount.JSON_PROPERTY_PRIVATE_KEY, + SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount.JSON_PROPERTY_PROJECT_ID, + SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CLIENT_EMAIL = "client_email"; + private String clientEmail; + + public static final String JSON_PROPERTY_PRIVATE_KEY = "private_key"; + private String privateKey; + + public static final String JSON_PROPERTY_PROJECT_ID = "project_id"; + private String projectId; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount() {} + + @JsonCreator + public SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount( + @JsonProperty(required = true, value = JSON_PROPERTY_CLIENT_EMAIL) String clientEmail, + @JsonProperty(required = true, value = JSON_PROPERTY_PRIVATE_KEY) String privateKey, + @JsonProperty(required = true, value = JSON_PROPERTY_PROJECT_ID) String projectId, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) String type) { + this.clientEmail = clientEmail; + this.privateKey = privateKey; + this.projectId = projectId; + this.type = type; + } + + public SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount clientEmail( + String clientEmail) { + this.clientEmail = clientEmail; + return this; + } + + /** + * The service account client email. + * + * @return clientEmail + */ + @JsonProperty(JSON_PROPERTY_CLIENT_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getClientEmail() { + return clientEmail; + } + + public void setClientEmail(String clientEmail) { + this.clientEmail = clientEmail; + } + + public SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount privateKey( + String privateKey) { + this.privateKey = privateKey; + return this; + } + + /** + * The service account private key. + * + * @return privateKey + */ + @JsonProperty(JSON_PROPERTY_PRIVATE_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPrivateKey() { + return privateKey; + } + + public void setPrivateKey(String privateKey) { + this.privateKey = privateKey; + } + + public SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount projectId( + String projectId) { + this.projectId = projectId; + return this; + } + + /** + * The Google Cloud project ID that owns the service account. + * + * @return projectId + */ + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount type(String type) { + this.type = type; + return this; + } + + /** + * The service account type. Must be service_account. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getType() { + return type; + } + + public void setType(String type) { + 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 SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount + */ + @JsonAnySetter + public SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount 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 SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount + securityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount = + (SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount) o; + return Objects.equals( + this.clientEmail, + securityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount.clientEmail) + && Objects.equals( + this.privateKey, + securityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount.privateKey) + && Objects.equals( + this.projectId, + securityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount.projectId) + && Objects.equals( + this.type, securityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount.type) + && Objects.equals( + this.additionalProperties, + securityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(clientEmail, privateKey, projectId, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringIntegrationConfigGoogleWorkspaceServiceAccount {\n"); + sb.append(" clientEmail: ").append(toIndentedString(clientEmail)).append("\n"); + sb.append(" privateKey: ").append(toIndentedString(privateKey)).append("\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).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/SecurityMonitoringIntegrationConfigOktaSecrets.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationConfigOktaSecrets.java new file mode 100644 index 00000000000..7fa2ae8e089 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationConfigOktaSecrets.java @@ -0,0 +1,147 @@ +/* + * 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; + +/** Credentials for an Okta entity context sync. */ +@JsonPropertyOrder({SecurityMonitoringIntegrationConfigOktaSecrets.JSON_PROPERTY_API_TOKEN}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringIntegrationConfigOktaSecrets { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_API_TOKEN = "api_token"; + private String apiToken; + + public SecurityMonitoringIntegrationConfigOktaSecrets() {} + + @JsonCreator + public SecurityMonitoringIntegrationConfigOktaSecrets( + @JsonProperty(required = true, value = JSON_PROPERTY_API_TOKEN) String apiToken) { + this.apiToken = apiToken; + } + + public SecurityMonitoringIntegrationConfigOktaSecrets apiToken(String apiToken) { + this.apiToken = apiToken; + return this; + } + + /** + * The Okta API token used to authenticate against the Okta API. + * + * @return apiToken + */ + @JsonProperty(JSON_PROPERTY_API_TOKEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getApiToken() { + return apiToken; + } + + public void setApiToken(String apiToken) { + this.apiToken = apiToken; + } + + /** + * 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 SecurityMonitoringIntegrationConfigOktaSecrets + */ + @JsonAnySetter + public SecurityMonitoringIntegrationConfigOktaSecrets 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 SecurityMonitoringIntegrationConfigOktaSecrets object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringIntegrationConfigOktaSecrets securityMonitoringIntegrationConfigOktaSecrets = + (SecurityMonitoringIntegrationConfigOktaSecrets) o; + return Objects.equals(this.apiToken, securityMonitoringIntegrationConfigOktaSecrets.apiToken) + && Objects.equals( + this.additionalProperties, + securityMonitoringIntegrationConfigOktaSecrets.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(apiToken, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringIntegrationConfigOktaSecrets {\n"); + sb.append(" apiToken: ").append(toIndentedString(apiToken)).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/SecurityMonitoringIntegrationConfigSentinelOneSecrets.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationConfigSentinelOneSecrets.java new file mode 100644 index 00000000000..ad12dd367c4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationConfigSentinelOneSecrets.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; + +/** Credentials for a SentinelOne entity context sync. */ +@JsonPropertyOrder({SecurityMonitoringIntegrationConfigSentinelOneSecrets.JSON_PROPERTY_API_TOKEN}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringIntegrationConfigSentinelOneSecrets { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_API_TOKEN = "api_token"; + private String apiToken; + + public SecurityMonitoringIntegrationConfigSentinelOneSecrets() {} + + @JsonCreator + public SecurityMonitoringIntegrationConfigSentinelOneSecrets( + @JsonProperty(required = true, value = JSON_PROPERTY_API_TOKEN) String apiToken) { + this.apiToken = apiToken; + } + + public SecurityMonitoringIntegrationConfigSentinelOneSecrets apiToken(String apiToken) { + this.apiToken = apiToken; + return this; + } + + /** + * The SentinelOne API token. + * + * @return apiToken + */ + @JsonProperty(JSON_PROPERTY_API_TOKEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getApiToken() { + return apiToken; + } + + public void setApiToken(String apiToken) { + this.apiToken = apiToken; + } + + /** + * 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 SecurityMonitoringIntegrationConfigSentinelOneSecrets + */ + @JsonAnySetter + public SecurityMonitoringIntegrationConfigSentinelOneSecrets 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 SecurityMonitoringIntegrationConfigSentinelOneSecrets object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringIntegrationConfigSentinelOneSecrets + securityMonitoringIntegrationConfigSentinelOneSecrets = + (SecurityMonitoringIntegrationConfigSentinelOneSecrets) o; + return Objects.equals( + this.apiToken, securityMonitoringIntegrationConfigSentinelOneSecrets.apiToken) + && Objects.equals( + this.additionalProperties, + securityMonitoringIntegrationConfigSentinelOneSecrets.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(apiToken, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringIntegrationConfigSentinelOneSecrets {\n"); + sb.append(" apiToken: ").append(toIndentedString(apiToken)).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/SecurityMonitoringIntegrationConfigUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationConfigUpdateAttributes.java index d717088c947..59d5dbd1f66 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationConfigUpdateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationConfigUpdateAttributes.java @@ -6,305 +6,656 @@ package com.datadog.api.client.v2.model; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.JSON; +import com.datadog.api.client.UnparsedObject; 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 com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import jakarta.ws.rs.core.GenericType; +import java.io.IOException; +import java.util.Collections; import java.util.HashMap; +import java.util.HashSet; import java.util.Map; -import java.util.Objects; - -/** Fields to update on the entity context sync configuration. All fields are optional. */ -@JsonPropertyOrder({ - SecurityMonitoringIntegrationConfigUpdateAttributes.JSON_PROPERTY_DOMAIN, - SecurityMonitoringIntegrationConfigUpdateAttributes.JSON_PROPERTY_ENABLED, - SecurityMonitoringIntegrationConfigUpdateAttributes.JSON_PROPERTY_INTEGRATION_TYPE, - SecurityMonitoringIntegrationConfigUpdateAttributes.JSON_PROPERTY_NAME, - SecurityMonitoringIntegrationConfigUpdateAttributes.JSON_PROPERTY_SECRETS, - SecurityMonitoringIntegrationConfigUpdateAttributes.JSON_PROPERTY_SETTINGS -}) +import java.util.logging.Level; +import java.util.logging.Logger; + @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class SecurityMonitoringIntegrationConfigUpdateAttributes { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_DOMAIN = "domain"; - private String domain; - - public static final String JSON_PROPERTY_ENABLED = "enabled"; - private Boolean enabled; - - public static final String JSON_PROPERTY_INTEGRATION_TYPE = "integration_type"; - private SecurityMonitoringIntegrationType integrationType; +@JsonDeserialize( + using = + SecurityMonitoringIntegrationConfigUpdateAttributes + .SecurityMonitoringIntegrationConfigUpdateAttributesDeserializer.class) +@JsonSerialize( + using = + SecurityMonitoringIntegrationConfigUpdateAttributes + .SecurityMonitoringIntegrationConfigUpdateAttributesSerializer.class) +public class SecurityMonitoringIntegrationConfigUpdateAttributes extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(SecurityMonitoringIntegrationConfigUpdateAttributes.class.getName()); - public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_SECRETS = "secrets"; - private Map secrets = null; + public static class SecurityMonitoringIntegrationConfigUpdateAttributesSerializer + extends StdSerializer { + public SecurityMonitoringIntegrationConfigUpdateAttributesSerializer( + Class t) { + super(t); + } - public static final String JSON_PROPERTY_SETTINGS = "settings"; - private Map settings = null; + public SecurityMonitoringIntegrationConfigUpdateAttributesSerializer() { + this(null); + } - public SecurityMonitoringIntegrationConfigUpdateAttributes domain(String domain) { - this.domain = domain; - return this; + @Override + public void serialize( + SecurityMonitoringIntegrationConfigUpdateAttributes value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } } - /** - * The new domain associated with the external entity source. - * - * @return domain - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DOMAIN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDomain() { - return domain; - } + public static class SecurityMonitoringIntegrationConfigUpdateAttributesDeserializer + extends StdDeserializer { + public SecurityMonitoringIntegrationConfigUpdateAttributesDeserializer() { + this(SecurityMonitoringIntegrationConfigUpdateAttributes.class); + } - public void setDomain(String domain) { - this.domain = domain; - } + public SecurityMonitoringIntegrationConfigUpdateAttributesDeserializer(Class vc) { + super(vc); + } - public SecurityMonitoringIntegrationConfigUpdateAttributes enabled(Boolean enabled) { - this.enabled = enabled; - return this; - } + @Override + public SecurityMonitoringIntegrationConfigUpdateAttributes deserialize( + JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + Object tmp = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes.class.equals( + Integer.class) + || SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes.class.equals( + Long.class) + || SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes.class.equals( + Float.class) + || SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes.class.equals( + Double.class) + || SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes.class.equals( + Boolean.class) + || SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes.class.equals( + String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes.class.equals( + Integer.class) + || SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes.class + .equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes.class.equals( + Float.class) + || SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes.class + .equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes.class.equals( + Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes.class.equals( + String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs( + SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes) tmp) + .unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema" + + " 'SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes'", + e); + } + + // deserialize SecurityMonitoringOktaIntegrationConfigUpdateAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SecurityMonitoringOktaIntegrationConfigUpdateAttributes.class.equals(Integer.class) + || SecurityMonitoringOktaIntegrationConfigUpdateAttributes.class.equals(Long.class) + || SecurityMonitoringOktaIntegrationConfigUpdateAttributes.class.equals(Float.class) + || SecurityMonitoringOktaIntegrationConfigUpdateAttributes.class.equals(Double.class) + || SecurityMonitoringOktaIntegrationConfigUpdateAttributes.class.equals(Boolean.class) + || SecurityMonitoringOktaIntegrationConfigUpdateAttributes.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((SecurityMonitoringOktaIntegrationConfigUpdateAttributes.class.equals( + Integer.class) + || SecurityMonitoringOktaIntegrationConfigUpdateAttributes.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((SecurityMonitoringOktaIntegrationConfigUpdateAttributes.class.equals(Float.class) + || SecurityMonitoringOktaIntegrationConfigUpdateAttributes.class.equals( + Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (SecurityMonitoringOktaIntegrationConfigUpdateAttributes.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (SecurityMonitoringOktaIntegrationConfigUpdateAttributes.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs(SecurityMonitoringOktaIntegrationConfigUpdateAttributes.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((SecurityMonitoringOktaIntegrationConfigUpdateAttributes) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema" + + " 'SecurityMonitoringOktaIntegrationConfigUpdateAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'SecurityMonitoringOktaIntegrationConfigUpdateAttributes'", + e); + } + + // deserialize SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes.class.equals(Integer.class) + || SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes.class.equals(Long.class) + || SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes.class.equals(Float.class) + || SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes.class.equals(Double.class) + || SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes.class.equals( + Boolean.class) + || SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes.class.equals( + String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes.class.equals( + Integer.class) + || SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes.class.equals( + Float.class) + || SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes.class.equals( + Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes.class.equals( + Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes.class.equals( + String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs(SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema" + + " 'SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes'", + e); + } + + // deserialize SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes.class.equals( + Integer.class) + || SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes.class.equals( + Long.class) + || SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes.class.equals( + Float.class) + || SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes.class.equals( + Double.class) + || SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes.class.equals( + Boolean.class) + || SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes.class.equals( + String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes.class.equals( + Integer.class) + || SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes.class + .equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes.class.equals( + Float.class) + || SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes.class + .equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes.class.equals( + Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes.class.equals( + String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs( + SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema" + + " 'SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes'", + e); + } + + // deserialize SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes.class.equals( + Integer.class) + || SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes.class.equals( + Long.class) + || SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes.class.equals( + Float.class) + || SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes.class.equals( + Double.class) + || SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes.class.equals( + Boolean.class) + || SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes.class.equals( + String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes.class.equals( + Integer.class) + || SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes.class + .equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes.class.equals( + Float.class) + || SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes.class + .equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes.class.equals( + Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes.class.equals( + String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs( + SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema" + + " 'SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes'", + e); + } + + SecurityMonitoringIntegrationConfigUpdateAttributes ret = + new SecurityMonitoringIntegrationConfigUpdateAttributes(); + if (match == 1) { + ret.setActualInstance(deserialized); + } else { + Map res = + new ObjectMapper() + .readValue( + tree.traverse(jp.getCodec()).readValueAsTree().toString(), + new TypeReference>() {}); + ret.setActualInstance(new UnparsedObject(res)); + } + return ret; + } - /** - * Whether the entity context sync should be enabled. - * - * @return enabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getEnabled() { - return enabled; + /** Handle deserialization of the 'null' value. */ + @Override + public SecurityMonitoringIntegrationConfigUpdateAttributes getNullValue( + DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "SecurityMonitoringIntegrationConfigUpdateAttributes cannot be null"); + } } - public void setEnabled(Boolean enabled) { - this.enabled = enabled; - } + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); - public SecurityMonitoringIntegrationConfigUpdateAttributes integrationType( - SecurityMonitoringIntegrationType integrationType) { - this.integrationType = integrationType; - this.unparsed |= !integrationType.isValid(); - return this; + public SecurityMonitoringIntegrationConfigUpdateAttributes() { + super("oneOf", Boolean.FALSE); } - /** - * The type of external source that provides entities to Cloud SIEM. - * - * @return integrationType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INTEGRATION_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SecurityMonitoringIntegrationType getIntegrationType() { - return integrationType; + public SecurityMonitoringIntegrationConfigUpdateAttributes( + SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - public void setIntegrationType(SecurityMonitoringIntegrationType integrationType) { - if (!integrationType.isValid()) { - this.unparsed = true; - } - this.integrationType = integrationType; + public SecurityMonitoringIntegrationConfigUpdateAttributes( + SecurityMonitoringOktaIntegrationConfigUpdateAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - public SecurityMonitoringIntegrationConfigUpdateAttributes name(String name) { - this.name = name; - return this; + public SecurityMonitoringIntegrationConfigUpdateAttributes( + SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - /** - * The new display name for the entity context sync configuration. - * - * @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; + public SecurityMonitoringIntegrationConfigUpdateAttributes( + SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - public void setName(String name) { - this.name = name; + public SecurityMonitoringIntegrationConfigUpdateAttributes( + SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - public SecurityMonitoringIntegrationConfigUpdateAttributes secrets(Map secrets) { - this.secrets = secrets; - return this; + static { + schemas.put( + "SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes", + new GenericType() {}); + schemas.put( + "SecurityMonitoringOktaIntegrationConfigUpdateAttributes", + new GenericType() {}); + schemas.put( + "SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes", + new GenericType() {}); + schemas.put( + "SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes", + new GenericType() {}); + schemas.put( + "SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes", + new GenericType() {}); + JSON.registerDescendants( + SecurityMonitoringIntegrationConfigUpdateAttributes.class, + Collections.unmodifiableMap(schemas)); } - public SecurityMonitoringIntegrationConfigUpdateAttributes putSecretsItem( - String key, Object secretsItem) { - if (this.secrets == null) { - this.secrets = new HashMap<>(); - } - this.secrets.put(key, secretsItem); - return this; + @Override + public Map getSchemas() { + return SecurityMonitoringIntegrationConfigUpdateAttributes.schemas; } /** - * The secrets used to authenticate against the external entity source. The accepted keys depend - * on the source type (for example, admin_email for Google Workspace). Not required - * for source types that do not use secrets (for example, ENTRA_ID). + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: + * SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes, + * SecurityMonitoringOktaIntegrationConfigUpdateAttributes, + * SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes, + * SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes, + * SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes * - * @return secrets + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a + * composed schema (allOf, anyOf, oneOf). */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SECRETS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getSecrets() { - return secrets; - } - - public void setSecrets(Map secrets) { - this.secrets = secrets; - } - - public SecurityMonitoringIntegrationConfigUpdateAttributes settings( - Map settings) { - this.settings = settings; - return this; - } + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf( + SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes.class, + instance, + new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + SecurityMonitoringOktaIntegrationConfigUpdateAttributes.class, + instance, + new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes.class, + instance, + new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes.class, + instance, + new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes.class, + instance, + new HashSet>())) { + super.setActualInstance(instance); + return; + } - public SecurityMonitoringIntegrationConfigUpdateAttributes putSettingsItem( - String key, Object settingsItem) { - if (this.settings == null) { - this.settings = new HashMap<>(); + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - this.settings.put(key, settingsItem); - return this; + throw new RuntimeException( + "Invalid instance type. Must be" + + " SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes," + + " SecurityMonitoringOktaIntegrationConfigUpdateAttributes," + + " SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes," + + " SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes," + + " SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes"); } /** - * Free-form, non-sensitive settings for the entity context sync. The accepted keys depend on the - * source type. + * Get the actual instance, which can be the following: + * SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes, + * SecurityMonitoringOktaIntegrationConfigUpdateAttributes, + * SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes, + * SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes, + * SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes * - * @return settings + * @return The actual instance + * (SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes, + * SecurityMonitoringOktaIntegrationConfigUpdateAttributes, + * SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes, + * SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes, + * SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes) */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SETTINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getSettings() { - return settings; - } - - public void setSettings(Map settings) { - this.settings = settings; + @Override + public Object getActualInstance() { + return super.getActualInstance(); } /** - * 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. + * Get the actual instance of + * `SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes`. If the actual instance is + * not `SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes`, the + * ClassCastException will be thrown. * - * @param key The arbitrary key to set - * @param value The associated value - * @return SecurityMonitoringIntegrationConfigUpdateAttributes + * @return The actual instance of + * `SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes` + * @throws ClassCastException if the instance is not + * `SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes` */ - @JsonAnySetter - public SecurityMonitoringIntegrationConfigUpdateAttributes putAdditionalProperty( - String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; + public SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes + getSecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes() + throws ClassCastException { + return (SecurityMonitoringGoogleWorkspaceIntegrationConfigUpdateAttributes) + super.getActualInstance(); } /** - * Return the additional (undeclared) property. + * Get the actual instance of `SecurityMonitoringOktaIntegrationConfigUpdateAttributes`. If the + * actual instance is not `SecurityMonitoringOktaIntegrationConfigUpdateAttributes`, the + * ClassCastException will be thrown. * - * @return The additional properties + * @return The actual instance of `SecurityMonitoringOktaIntegrationConfigUpdateAttributes` + * @throws ClassCastException if the instance is not + * `SecurityMonitoringOktaIntegrationConfigUpdateAttributes` */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; + public SecurityMonitoringOktaIntegrationConfigUpdateAttributes + getSecurityMonitoringOktaIntegrationConfigUpdateAttributes() throws ClassCastException { + return (SecurityMonitoringOktaIntegrationConfigUpdateAttributes) super.getActualInstance(); } /** - * Return the additional (undeclared) property with the specified name. + * Get the actual instance of `SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes`. If the + * actual instance is not `SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes`, the + * ClassCastException will be thrown. * - * @param key The arbitrary key to get - * @return The specific additional property for the given key + * @return The actual instance of `SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes` + * @throws ClassCastException if the instance is not + * `SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes` */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); + public SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes + getSecurityMonitoringEntraIdIntegrationConfigUpdateAttributes() throws ClassCastException { + return (SecurityMonitoringEntraIdIntegrationConfigUpdateAttributes) super.getActualInstance(); } /** - * Return true if this SecurityMonitoringIntegrationConfigUpdateAttributes object is equal to o. + * Get the actual instance of `SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes`. If + * the actual instance is not `SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes` + * @throws ClassCastException if the instance is not + * `SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes` */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SecurityMonitoringIntegrationConfigUpdateAttributes - securityMonitoringIntegrationConfigUpdateAttributes = - (SecurityMonitoringIntegrationConfigUpdateAttributes) o; - return Objects.equals(this.domain, securityMonitoringIntegrationConfigUpdateAttributes.domain) - && Objects.equals(this.enabled, securityMonitoringIntegrationConfigUpdateAttributes.enabled) - && Objects.equals( - this.integrationType, - securityMonitoringIntegrationConfigUpdateAttributes.integrationType) - && Objects.equals(this.name, securityMonitoringIntegrationConfigUpdateAttributes.name) - && Objects.equals(this.secrets, securityMonitoringIntegrationConfigUpdateAttributes.secrets) - && Objects.equals( - this.settings, securityMonitoringIntegrationConfigUpdateAttributes.settings) - && Objects.equals( - this.additionalProperties, - securityMonitoringIntegrationConfigUpdateAttributes.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash( - domain, enabled, integrationType, name, secrets, settings, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SecurityMonitoringIntegrationConfigUpdateAttributes {\n"); - sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); - sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); - sb.append(" integrationType: ").append(toIndentedString(integrationType)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" secrets: ").append(toIndentedString(secrets)).append("\n"); - sb.append(" settings: ").append(toIndentedString(settings)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append('}'); - return sb.toString(); + public SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes + getSecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes() + throws ClassCastException { + return (SecurityMonitoringCrowdStrikeIntegrationConfigUpdateAttributes) + super.getActualInstance(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * Get the actual instance of `SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes`. If + * the actual instance is not `SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes` + * @throws ClassCastException if the instance is not + * `SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes` */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + public SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes + getSecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes() + throws ClassCastException { + return (SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes) + super.getActualInstance(); } } diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationConfigUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationConfigUpdateData.java index 47a4963616c..8591bff4e45 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationConfigUpdateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationConfigUpdateData.java @@ -55,7 +55,8 @@ public SecurityMonitoringIntegrationConfigUpdateData attributes( } /** - * Fields to update on the entity context sync configuration. All fields are optional. + * Fields to update on the entity context sync configuration. All fields other than the + * integration type are optional. * * @return attributes */ diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationCredentialsValidateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationCredentialsValidateAttributes.java index 4b5ca8b67fe..e7f6e517315 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationCredentialsValidateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationCredentialsValidateAttributes.java @@ -6,226 +6,695 @@ 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.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.JSON; +import com.datadog.api.client.UnparsedObject; 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 com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import jakarta.ws.rs.core.GenericType; +import java.io.IOException; +import java.util.Collections; import java.util.HashMap; +import java.util.HashSet; import java.util.Map; -import java.util.Objects; - -/** The credentials to validate against the external entity source. */ -@JsonPropertyOrder({ - SecurityMonitoringIntegrationCredentialsValidateAttributes.JSON_PROPERTY_DOMAIN, - SecurityMonitoringIntegrationCredentialsValidateAttributes.JSON_PROPERTY_INTEGRATION_TYPE, - SecurityMonitoringIntegrationCredentialsValidateAttributes.JSON_PROPERTY_SECRETS -}) +import java.util.logging.Level; +import java.util.logging.Logger; + @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class SecurityMonitoringIntegrationCredentialsValidateAttributes { +@JsonDeserialize( + using = + SecurityMonitoringIntegrationCredentialsValidateAttributes + .SecurityMonitoringIntegrationCredentialsValidateAttributesDeserializer.class) +@JsonSerialize( + using = + SecurityMonitoringIntegrationCredentialsValidateAttributes + .SecurityMonitoringIntegrationCredentialsValidateAttributesSerializer.class) +public class SecurityMonitoringIntegrationCredentialsValidateAttributes + extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(SecurityMonitoringIntegrationCredentialsValidateAttributes.class.getName()); + @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_DOMAIN = "domain"; - private String domain; - public static final String JSON_PROPERTY_INTEGRATION_TYPE = "integration_type"; - private SecurityMonitoringIntegrationType integrationType; + public static class SecurityMonitoringIntegrationCredentialsValidateAttributesSerializer + extends StdSerializer { + public SecurityMonitoringIntegrationCredentialsValidateAttributesSerializer( + Class t) { + super(t); + } - public static final String JSON_PROPERTY_SECRETS = "secrets"; - private Map secrets = null; + public SecurityMonitoringIntegrationCredentialsValidateAttributesSerializer() { + this(null); + } - public SecurityMonitoringIntegrationCredentialsValidateAttributes() {} + @Override + public void serialize( + SecurityMonitoringIntegrationCredentialsValidateAttributes value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } - @JsonCreator - public SecurityMonitoringIntegrationCredentialsValidateAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_DOMAIN) String domain, - @JsonProperty(required = true, value = JSON_PROPERTY_INTEGRATION_TYPE) - SecurityMonitoringIntegrationType integrationType) { - this.domain = domain; - this.integrationType = integrationType; - this.unparsed |= !integrationType.isValid(); + public static class SecurityMonitoringIntegrationCredentialsValidateAttributesDeserializer + extends StdDeserializer { + public SecurityMonitoringIntegrationCredentialsValidateAttributesDeserializer() { + this(SecurityMonitoringIntegrationCredentialsValidateAttributes.class); + } + + public SecurityMonitoringIntegrationCredentialsValidateAttributesDeserializer(Class vc) { + super(vc); + } + + @Override + public SecurityMonitoringIntegrationCredentialsValidateAttributes deserialize( + JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + Object tmp = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes.class.equals( + Integer.class) + || SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes.class + .equals(Long.class) + || SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes.class + .equals(Float.class) + || SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes.class + .equals(Double.class) + || SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes.class + .equals(Boolean.class) + || SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes.class + .equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes.class + .equals(Integer.class) + || SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes + .class + .equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes.class + .equals(Float.class) + || SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes + .class + .equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes.class + .equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes.class + .equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs( + SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes + .class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes) tmp) + .unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema" + + " 'SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes'", + e); + } + + // deserialize SecurityMonitoringOktaIntegrationCredentialsValidateAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SecurityMonitoringOktaIntegrationCredentialsValidateAttributes.class.equals( + Integer.class) + || SecurityMonitoringOktaIntegrationCredentialsValidateAttributes.class.equals( + Long.class) + || SecurityMonitoringOktaIntegrationCredentialsValidateAttributes.class.equals( + Float.class) + || SecurityMonitoringOktaIntegrationCredentialsValidateAttributes.class.equals( + Double.class) + || SecurityMonitoringOktaIntegrationCredentialsValidateAttributes.class.equals( + Boolean.class) + || SecurityMonitoringOktaIntegrationCredentialsValidateAttributes.class.equals( + String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((SecurityMonitoringOktaIntegrationCredentialsValidateAttributes.class.equals( + Integer.class) + || SecurityMonitoringOktaIntegrationCredentialsValidateAttributes.class + .equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((SecurityMonitoringOktaIntegrationCredentialsValidateAttributes.class.equals( + Float.class) + || SecurityMonitoringOktaIntegrationCredentialsValidateAttributes.class + .equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (SecurityMonitoringOktaIntegrationCredentialsValidateAttributes.class.equals( + Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (SecurityMonitoringOktaIntegrationCredentialsValidateAttributes.class.equals( + String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs( + SecurityMonitoringOktaIntegrationCredentialsValidateAttributes.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((SecurityMonitoringOktaIntegrationCredentialsValidateAttributes) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema" + + " 'SecurityMonitoringOktaIntegrationCredentialsValidateAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'SecurityMonitoringOktaIntegrationCredentialsValidateAttributes'", + e); + } + + // deserialize SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes.class.equals( + Integer.class) + || SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes.class.equals( + Long.class) + || SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes.class.equals( + Float.class) + || SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes.class.equals( + Double.class) + || SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes.class.equals( + Boolean.class) + || SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes.class.equals( + String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes.class.equals( + Integer.class) + || SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes.class + .equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes.class.equals( + Float.class) + || SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes.class + .equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes.class.equals( + Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes.class.equals( + String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs( + SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema" + + " 'SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes'", + e); + } + + // deserialize SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes.class.equals( + Integer.class) + || SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes.class.equals( + Long.class) + || SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes.class.equals( + Float.class) + || SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes.class.equals( + Double.class) + || SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes.class.equals( + Boolean.class) + || SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes.class.equals( + String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes.class + .equals(Integer.class) + || SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes + .class + .equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes.class + .equals(Float.class) + || SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes + .class + .equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes.class.equals( + Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes.class.equals( + String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs( + SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes) tmp) + .unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema" + + " 'SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes'", + e); + } + + // deserialize SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes.class.equals( + Integer.class) + || SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes.class.equals( + Long.class) + || SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes.class.equals( + Float.class) + || SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes.class.equals( + Double.class) + || SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes.class.equals( + Boolean.class) + || SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes.class.equals( + String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes.class + .equals(Integer.class) + || SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes + .class + .equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes.class + .equals(Float.class) + || SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes + .class + .equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes.class.equals( + Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes.class.equals( + String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs( + SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes) tmp) + .unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema" + + " 'SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes'", + e); + } + + SecurityMonitoringIntegrationCredentialsValidateAttributes ret = + new SecurityMonitoringIntegrationCredentialsValidateAttributes(); + if (match == 1) { + ret.setActualInstance(deserialized); + } else { + Map res = + new ObjectMapper() + .readValue( + tree.traverse(jp.getCodec()).readValueAsTree().toString(), + new TypeReference>() {}); + ret.setActualInstance(new UnparsedObject(res)); + } + return ret; + } + + /** Handle deserialization of the 'null' value. */ + @Override + public SecurityMonitoringIntegrationCredentialsValidateAttributes getNullValue( + DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), + "SecurityMonitoringIntegrationCredentialsValidateAttributes cannot be null"); + } } - public SecurityMonitoringIntegrationCredentialsValidateAttributes domain(String domain) { - this.domain = domain; - return this; + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public SecurityMonitoringIntegrationCredentialsValidateAttributes() { + super("oneOf", Boolean.FALSE); } - /** - * The domain associated with the external entity source. - * - * @return domain - */ - @JsonProperty(JSON_PROPERTY_DOMAIN) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getDomain() { - return domain; + public SecurityMonitoringIntegrationCredentialsValidateAttributes( + SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - public void setDomain(String domain) { - this.domain = domain; + public SecurityMonitoringIntegrationCredentialsValidateAttributes( + SecurityMonitoringOktaIntegrationCredentialsValidateAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - public SecurityMonitoringIntegrationCredentialsValidateAttributes integrationType( - SecurityMonitoringIntegrationType integrationType) { - this.integrationType = integrationType; - this.unparsed |= !integrationType.isValid(); - return this; + public SecurityMonitoringIntegrationCredentialsValidateAttributes( + SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - /** - * The type of external source that provides entities to Cloud SIEM. - * - * @return integrationType - */ - @JsonProperty(JSON_PROPERTY_INTEGRATION_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SecurityMonitoringIntegrationType getIntegrationType() { - return integrationType; + public SecurityMonitoringIntegrationCredentialsValidateAttributes( + SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - public void setIntegrationType(SecurityMonitoringIntegrationType integrationType) { - if (!integrationType.isValid()) { - this.unparsed = true; - } - this.integrationType = integrationType; + public SecurityMonitoringIntegrationCredentialsValidateAttributes( + SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - public SecurityMonitoringIntegrationCredentialsValidateAttributes secrets( - Map secrets) { - this.secrets = secrets; - return this; + static { + schemas.put( + "SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes", + new GenericType< + SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes>() {}); + schemas.put( + "SecurityMonitoringOktaIntegrationCredentialsValidateAttributes", + new GenericType() {}); + schemas.put( + "SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes", + new GenericType() {}); + schemas.put( + "SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes", + new GenericType< + SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes>() {}); + schemas.put( + "SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes", + new GenericType< + SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes>() {}); + JSON.registerDescendants( + SecurityMonitoringIntegrationCredentialsValidateAttributes.class, + Collections.unmodifiableMap(schemas)); } - public SecurityMonitoringIntegrationCredentialsValidateAttributes putSecretsItem( - String key, Object secretsItem) { - if (this.secrets == null) { - this.secrets = new HashMap<>(); - } - this.secrets.put(key, secretsItem); - return this; + @Override + public Map getSchemas() { + return SecurityMonitoringIntegrationCredentialsValidateAttributes.schemas; } /** - * The secrets used to authenticate against the external entity source. The accepted keys depend - * on the source type (for example, admin_email for Google Workspace). Not required - * for source types that do not use secrets (for example, ENTRA_ID). + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: + * SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes, + * SecurityMonitoringOktaIntegrationCredentialsValidateAttributes, + * SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes, + * SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes, + * SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes * - * @return secrets + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a + * composed schema (allOf, anyOf, oneOf). */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SECRETS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getSecrets() { - return secrets; - } + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf( + SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes.class, + instance, + new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + SecurityMonitoringOktaIntegrationCredentialsValidateAttributes.class, + instance, + new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes.class, + instance, + new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes.class, + instance, + new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes.class, + instance, + new HashSet>())) { + super.setActualInstance(instance); + return; + } - public void setSecrets(Map secrets) { - this.secrets = secrets; + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + throw new RuntimeException( + "Invalid instance type. Must be" + + " SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes," + + " SecurityMonitoringOktaIntegrationCredentialsValidateAttributes," + + " SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes," + + " SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes," + + " SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes"); } /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. + * Get the actual instance, which can be the following: + * SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes, + * SecurityMonitoringOktaIntegrationCredentialsValidateAttributes, + * SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes, + * SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes, + * SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes + * + * @return The actual instance + * (SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes, + * SecurityMonitoringOktaIntegrationCredentialsValidateAttributes, + * SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes, + * SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes, + * SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes) */ - private Map additionalProperties; + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. + * Get the actual instance of + * `SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes`. If the actual + * instance is not `SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes`, + * the ClassCastException will be thrown. * - * @param key The arbitrary key to set - * @param value The associated value - * @return SecurityMonitoringIntegrationCredentialsValidateAttributes + * @return The actual instance of + * `SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes` + * @throws ClassCastException if the instance is not + * `SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes` */ - @JsonAnySetter - public SecurityMonitoringIntegrationCredentialsValidateAttributes putAdditionalProperty( - String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; + public SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes + getSecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes() + throws ClassCastException { + return (SecurityMonitoringGoogleWorkspaceIntegrationCredentialsValidateAttributes) + super.getActualInstance(); } /** - * Return the additional (undeclared) property. + * Get the actual instance of `SecurityMonitoringOktaIntegrationCredentialsValidateAttributes`. If + * the actual instance is not `SecurityMonitoringOktaIntegrationCredentialsValidateAttributes`, + * the ClassCastException will be thrown. * - * @return The additional properties + * @return The actual instance of `SecurityMonitoringOktaIntegrationCredentialsValidateAttributes` + * @throws ClassCastException if the instance is not + * `SecurityMonitoringOktaIntegrationCredentialsValidateAttributes` */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; + public SecurityMonitoringOktaIntegrationCredentialsValidateAttributes + getSecurityMonitoringOktaIntegrationCredentialsValidateAttributes() + throws ClassCastException { + return (SecurityMonitoringOktaIntegrationCredentialsValidateAttributes) + super.getActualInstance(); } /** - * Return the additional (undeclared) property with the specified name. + * Get the actual instance of `SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes`. + * If the actual instance is not + * `SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes`, the ClassCastException + * will be thrown. * - * @param key The arbitrary key to get - * @return The specific additional property for the given key + * @return The actual instance of + * `SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes` + * @throws ClassCastException if the instance is not + * `SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes` */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); + public SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes + getSecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes() + throws ClassCastException { + return (SecurityMonitoringEntraIdIntegrationCredentialsValidateAttributes) + super.getActualInstance(); } /** - * Return true if this SecurityMonitoringIntegrationCredentialsValidateAttributes object is equal - * to o. + * Get the actual instance of + * `SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes`. If the actual instance + * is not `SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes`, the + * ClassCastException will be thrown. + * + * @return The actual instance of + * `SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes` + * @throws ClassCastException if the instance is not + * `SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes` */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SecurityMonitoringIntegrationCredentialsValidateAttributes - securityMonitoringIntegrationCredentialsValidateAttributes = - (SecurityMonitoringIntegrationCredentialsValidateAttributes) o; - return Objects.equals( - this.domain, securityMonitoringIntegrationCredentialsValidateAttributes.domain) - && Objects.equals( - this.integrationType, - securityMonitoringIntegrationCredentialsValidateAttributes.integrationType) - && Objects.equals( - this.secrets, securityMonitoringIntegrationCredentialsValidateAttributes.secrets) - && Objects.equals( - this.additionalProperties, - securityMonitoringIntegrationCredentialsValidateAttributes.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(domain, integrationType, secrets, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SecurityMonitoringIntegrationCredentialsValidateAttributes {\n"); - sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); - sb.append(" integrationType: ").append(toIndentedString(integrationType)).append("\n"); - sb.append(" secrets: ").append(toIndentedString(secrets)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append('}'); - return sb.toString(); + public SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes + getSecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes() + throws ClassCastException { + return (SecurityMonitoringCrowdStrikeIntegrationCredentialsValidateAttributes) + super.getActualInstance(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). + * Get the actual instance of + * `SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes`. If the actual instance + * is not `SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes`, the + * ClassCastException will be thrown. + * + * @return The actual instance of + * `SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes` + * @throws ClassCastException if the instance is not + * `SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes` */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + public SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes + getSecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes() + throws ClassCastException { + return (SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes) + super.getActualInstance(); } } diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationType.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationType.java index 08d4f1ea416..78ab58d5b54 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationType.java +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationType.java @@ -24,7 +24,8 @@ public class SecurityMonitoringIntegrationType extends ModelEnum { private static final Set allowedValues = - new HashSet(Arrays.asList("GOOGLE_WORKSPACE", "OKTA", "ENTRA_ID")); + new HashSet( + Arrays.asList("GOOGLE_WORKSPACE", "OKTA", "ENTRA_ID", "CROWDSTRIKE", "SENTINELONE")); public static final SecurityMonitoringIntegrationType GOOGLE_WORKSPACE = new SecurityMonitoringIntegrationType("GOOGLE_WORKSPACE"); @@ -32,6 +33,10 @@ public class SecurityMonitoringIntegrationType extends ModelEnum { new SecurityMonitoringIntegrationType("OKTA"); public static final SecurityMonitoringIntegrationType ENTRA_ID = new SecurityMonitoringIntegrationType("ENTRA_ID"); + public static final SecurityMonitoringIntegrationType CROWDSTRIKE = + new SecurityMonitoringIntegrationType("CROWDSTRIKE"); + public static final SecurityMonitoringIntegrationType SENTINELONE = + new SecurityMonitoringIntegrationType("SENTINELONE"); SecurityMonitoringIntegrationType(String value) { super(value, allowedValues); diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationTypeCrowdStrike.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationTypeCrowdStrike.java new file mode 100644 index 00000000000..254566837de --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationTypeCrowdStrike.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 source type for a CrowdStrike entity context sync. */ +@JsonSerialize( + using = + SecurityMonitoringIntegrationTypeCrowdStrike + .SecurityMonitoringIntegrationTypeCrowdStrikeSerializer.class) +public class SecurityMonitoringIntegrationTypeCrowdStrike extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("CROWDSTRIKE")); + + public static final SecurityMonitoringIntegrationTypeCrowdStrike CROWDSTRIKE = + new SecurityMonitoringIntegrationTypeCrowdStrike("CROWDSTRIKE"); + + SecurityMonitoringIntegrationTypeCrowdStrike(String value) { + super(value, allowedValues); + } + + public static class SecurityMonitoringIntegrationTypeCrowdStrikeSerializer + extends StdSerializer { + public SecurityMonitoringIntegrationTypeCrowdStrikeSerializer( + Class t) { + super(t); + } + + public SecurityMonitoringIntegrationTypeCrowdStrikeSerializer() { + this(null); + } + + @Override + public void serialize( + SecurityMonitoringIntegrationTypeCrowdStrike value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SecurityMonitoringIntegrationTypeCrowdStrike fromValue(String value) { + return new SecurityMonitoringIntegrationTypeCrowdStrike(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationTypeEntraId.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationTypeEntraId.java new file mode 100644 index 00000000000..804f25b9e80 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationTypeEntraId.java @@ -0,0 +1,62 @@ +/* + * 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 source type for an Entra ID entity context sync. */ +@JsonSerialize( + using = + SecurityMonitoringIntegrationTypeEntraId.SecurityMonitoringIntegrationTypeEntraIdSerializer + .class) +public class SecurityMonitoringIntegrationTypeEntraId extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("ENTRA_ID")); + + public static final SecurityMonitoringIntegrationTypeEntraId ENTRA_ID = + new SecurityMonitoringIntegrationTypeEntraId("ENTRA_ID"); + + SecurityMonitoringIntegrationTypeEntraId(String value) { + super(value, allowedValues); + } + + public static class SecurityMonitoringIntegrationTypeEntraIdSerializer + extends StdSerializer { + public SecurityMonitoringIntegrationTypeEntraIdSerializer( + Class t) { + super(t); + } + + public SecurityMonitoringIntegrationTypeEntraIdSerializer() { + this(null); + } + + @Override + public void serialize( + SecurityMonitoringIntegrationTypeEntraId value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SecurityMonitoringIntegrationTypeEntraId fromValue(String value) { + return new SecurityMonitoringIntegrationTypeEntraId(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationTypeGoogleWorkspace.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationTypeGoogleWorkspace.java new file mode 100644 index 00000000000..a37fadb96f5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationTypeGoogleWorkspace.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 source type for a Google Workspace entity context sync. */ +@JsonSerialize( + using = + SecurityMonitoringIntegrationTypeGoogleWorkspace + .SecurityMonitoringIntegrationTypeGoogleWorkspaceSerializer.class) +public class SecurityMonitoringIntegrationTypeGoogleWorkspace extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("GOOGLE_WORKSPACE")); + + public static final SecurityMonitoringIntegrationTypeGoogleWorkspace GOOGLE_WORKSPACE = + new SecurityMonitoringIntegrationTypeGoogleWorkspace("GOOGLE_WORKSPACE"); + + SecurityMonitoringIntegrationTypeGoogleWorkspace(String value) { + super(value, allowedValues); + } + + public static class SecurityMonitoringIntegrationTypeGoogleWorkspaceSerializer + extends StdSerializer { + public SecurityMonitoringIntegrationTypeGoogleWorkspaceSerializer( + Class t) { + super(t); + } + + public SecurityMonitoringIntegrationTypeGoogleWorkspaceSerializer() { + this(null); + } + + @Override + public void serialize( + SecurityMonitoringIntegrationTypeGoogleWorkspace value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SecurityMonitoringIntegrationTypeGoogleWorkspace fromValue(String value) { + return new SecurityMonitoringIntegrationTypeGoogleWorkspace(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationTypeOkta.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationTypeOkta.java new file mode 100644 index 00000000000..98f863c50df --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationTypeOkta.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 source type for an Okta entity context sync. */ +@JsonSerialize( + using = + SecurityMonitoringIntegrationTypeOkta.SecurityMonitoringIntegrationTypeOktaSerializer.class) +public class SecurityMonitoringIntegrationTypeOkta extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("OKTA")); + + public static final SecurityMonitoringIntegrationTypeOkta OKTA = + new SecurityMonitoringIntegrationTypeOkta("OKTA"); + + SecurityMonitoringIntegrationTypeOkta(String value) { + super(value, allowedValues); + } + + public static class SecurityMonitoringIntegrationTypeOktaSerializer + extends StdSerializer { + public SecurityMonitoringIntegrationTypeOktaSerializer( + Class t) { + super(t); + } + + public SecurityMonitoringIntegrationTypeOktaSerializer() { + this(null); + } + + @Override + public void serialize( + SecurityMonitoringIntegrationTypeOkta value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SecurityMonitoringIntegrationTypeOkta fromValue(String value) { + return new SecurityMonitoringIntegrationTypeOkta(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationTypeSentinelOne.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationTypeSentinelOne.java new file mode 100644 index 00000000000..d0924c44224 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringIntegrationTypeSentinelOne.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 source type for a SentinelOne entity context sync. */ +@JsonSerialize( + using = + SecurityMonitoringIntegrationTypeSentinelOne + .SecurityMonitoringIntegrationTypeSentinelOneSerializer.class) +public class SecurityMonitoringIntegrationTypeSentinelOne extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("SENTINELONE")); + + public static final SecurityMonitoringIntegrationTypeSentinelOne SENTINELONE = + new SecurityMonitoringIntegrationTypeSentinelOne("SENTINELONE"); + + SecurityMonitoringIntegrationTypeSentinelOne(String value) { + super(value, allowedValues); + } + + public static class SecurityMonitoringIntegrationTypeSentinelOneSerializer + extends StdSerializer { + public SecurityMonitoringIntegrationTypeSentinelOneSerializer( + Class t) { + super(t); + } + + public SecurityMonitoringIntegrationTypeSentinelOneSerializer() { + this(null); + } + + @Override + public void serialize( + SecurityMonitoringIntegrationTypeSentinelOne value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SecurityMonitoringIntegrationTypeSentinelOne fromValue(String value) { + return new SecurityMonitoringIntegrationTypeSentinelOne(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringOktaIntegrationConfigCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringOktaIntegrationConfigCreateAttributes.java new file mode 100644 index 00000000000..a1f561b2ede --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringOktaIntegrationConfigCreateAttributes.java @@ -0,0 +1,291 @@ +/* + * 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; + +/** The attributes of an Okta entity context sync configuration to create. */ +@JsonPropertyOrder({ + SecurityMonitoringOktaIntegrationConfigCreateAttributes.JSON_PROPERTY_DOMAIN, + SecurityMonitoringOktaIntegrationConfigCreateAttributes.JSON_PROPERTY_INTEGRATION_TYPE, + SecurityMonitoringOktaIntegrationConfigCreateAttributes.JSON_PROPERTY_NAME, + SecurityMonitoringOktaIntegrationConfigCreateAttributes.JSON_PROPERTY_SECRETS, + SecurityMonitoringOktaIntegrationConfigCreateAttributes.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringOktaIntegrationConfigCreateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DOMAIN = "domain"; + private String domain; + + public static final String JSON_PROPERTY_INTEGRATION_TYPE = "integration_type"; + private SecurityMonitoringIntegrationTypeOkta integrationType; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SECRETS = "secrets"; + private SecurityMonitoringIntegrationConfigOktaSecrets secrets; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private Map settings = null; + + public SecurityMonitoringOktaIntegrationConfigCreateAttributes() {} + + @JsonCreator + public SecurityMonitoringOktaIntegrationConfigCreateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_DOMAIN) String domain, + @JsonProperty(required = true, value = JSON_PROPERTY_INTEGRATION_TYPE) + SecurityMonitoringIntegrationTypeOkta integrationType, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_SECRETS) + SecurityMonitoringIntegrationConfigOktaSecrets secrets) { + this.domain = domain; + this.integrationType = integrationType; + this.unparsed |= !integrationType.isValid(); + this.name = name; + this.secrets = secrets; + this.unparsed |= secrets.unparsed; + } + + public SecurityMonitoringOktaIntegrationConfigCreateAttributes domain(String domain) { + this.domain = domain; + return this; + } + + /** + * The domain associated with the external entity source. + * + * @return domain + */ + @JsonProperty(JSON_PROPERTY_DOMAIN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public SecurityMonitoringOktaIntegrationConfigCreateAttributes integrationType( + SecurityMonitoringIntegrationTypeOkta integrationType) { + this.integrationType = integrationType; + this.unparsed |= !integrationType.isValid(); + return this; + } + + /** + * The source type for an Okta entity context sync. + * + * @return integrationType + */ + @JsonProperty(JSON_PROPERTY_INTEGRATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringIntegrationTypeOkta getIntegrationType() { + return integrationType; + } + + public void setIntegrationType(SecurityMonitoringIntegrationTypeOkta integrationType) { + if (!integrationType.isValid()) { + this.unparsed = true; + } + this.integrationType = integrationType; + } + + public SecurityMonitoringOktaIntegrationConfigCreateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The display name for the entity context sync configuration. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public SecurityMonitoringOktaIntegrationConfigCreateAttributes secrets( + SecurityMonitoringIntegrationConfigOktaSecrets secrets) { + this.secrets = secrets; + this.unparsed |= secrets.unparsed; + return this; + } + + /** + * Credentials for an Okta entity context sync. + * + * @return secrets + */ + @JsonProperty(JSON_PROPERTY_SECRETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringIntegrationConfigOktaSecrets getSecrets() { + return secrets; + } + + public void setSecrets(SecurityMonitoringIntegrationConfigOktaSecrets secrets) { + this.secrets = secrets; + } + + public SecurityMonitoringOktaIntegrationConfigCreateAttributes settings( + Map settings) { + this.settings = settings; + return this; + } + + public SecurityMonitoringOktaIntegrationConfigCreateAttributes putSettingsItem( + String key, Object settingsItem) { + if (this.settings == null) { + this.settings = new HashMap<>(); + } + this.settings.put(key, settingsItem); + return this; + } + + /** + * Free-form, non-sensitive settings for the entity context sync. The accepted keys depend on the + * source type. + * + * @return settings + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getSettings() { + return settings; + } + + public void setSettings(Map settings) { + this.settings = settings; + } + + /** + * 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 SecurityMonitoringOktaIntegrationConfigCreateAttributes + */ + @JsonAnySetter + public SecurityMonitoringOktaIntegrationConfigCreateAttributes 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 SecurityMonitoringOktaIntegrationConfigCreateAttributes object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringOktaIntegrationConfigCreateAttributes + securityMonitoringOktaIntegrationConfigCreateAttributes = + (SecurityMonitoringOktaIntegrationConfigCreateAttributes) o; + return Objects.equals( + this.domain, securityMonitoringOktaIntegrationConfigCreateAttributes.domain) + && Objects.equals( + this.integrationType, + securityMonitoringOktaIntegrationConfigCreateAttributes.integrationType) + && Objects.equals(this.name, securityMonitoringOktaIntegrationConfigCreateAttributes.name) + && Objects.equals( + this.secrets, securityMonitoringOktaIntegrationConfigCreateAttributes.secrets) + && Objects.equals( + this.settings, securityMonitoringOktaIntegrationConfigCreateAttributes.settings) + && Objects.equals( + this.additionalProperties, + securityMonitoringOktaIntegrationConfigCreateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(domain, integrationType, name, secrets, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringOktaIntegrationConfigCreateAttributes {\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" integrationType: ").append(toIndentedString(integrationType)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" secrets: ").append(toIndentedString(secrets)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).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/SecurityMonitoringOktaIntegrationConfigUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringOktaIntegrationConfigUpdateAttributes.java new file mode 100644 index 00000000000..6ec2bec9a79 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringOktaIntegrationConfigUpdateAttributes.java @@ -0,0 +1,315 @@ +/* + * 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; + +/** Fields to update on an Okta entity context sync configuration. */ +@JsonPropertyOrder({ + SecurityMonitoringOktaIntegrationConfigUpdateAttributes.JSON_PROPERTY_DOMAIN, + SecurityMonitoringOktaIntegrationConfigUpdateAttributes.JSON_PROPERTY_ENABLED, + SecurityMonitoringOktaIntegrationConfigUpdateAttributes.JSON_PROPERTY_INTEGRATION_TYPE, + SecurityMonitoringOktaIntegrationConfigUpdateAttributes.JSON_PROPERTY_NAME, + SecurityMonitoringOktaIntegrationConfigUpdateAttributes.JSON_PROPERTY_SECRETS, + SecurityMonitoringOktaIntegrationConfigUpdateAttributes.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringOktaIntegrationConfigUpdateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DOMAIN = "domain"; + private String domain; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_INTEGRATION_TYPE = "integration_type"; + private SecurityMonitoringIntegrationTypeOkta integrationType; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SECRETS = "secrets"; + private SecurityMonitoringIntegrationConfigOktaSecrets secrets; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private Map settings = null; + + public SecurityMonitoringOktaIntegrationConfigUpdateAttributes() {} + + @JsonCreator + public SecurityMonitoringOktaIntegrationConfigUpdateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_INTEGRATION_TYPE) + SecurityMonitoringIntegrationTypeOkta integrationType) { + this.integrationType = integrationType; + this.unparsed |= !integrationType.isValid(); + } + + public SecurityMonitoringOktaIntegrationConfigUpdateAttributes domain(String domain) { + this.domain = domain; + return this; + } + + /** + * The new domain associated with the external entity source. + * + * @return domain + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DOMAIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public SecurityMonitoringOktaIntegrationConfigUpdateAttributes enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the entity context sync should be enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public SecurityMonitoringOktaIntegrationConfigUpdateAttributes integrationType( + SecurityMonitoringIntegrationTypeOkta integrationType) { + this.integrationType = integrationType; + this.unparsed |= !integrationType.isValid(); + return this; + } + + /** + * The source type for an Okta entity context sync. + * + * @return integrationType + */ + @JsonProperty(JSON_PROPERTY_INTEGRATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringIntegrationTypeOkta getIntegrationType() { + return integrationType; + } + + public void setIntegrationType(SecurityMonitoringIntegrationTypeOkta integrationType) { + if (!integrationType.isValid()) { + this.unparsed = true; + } + this.integrationType = integrationType; + } + + public SecurityMonitoringOktaIntegrationConfigUpdateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The new display name for the entity context sync configuration. + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public SecurityMonitoringOktaIntegrationConfigUpdateAttributes secrets( + SecurityMonitoringIntegrationConfigOktaSecrets secrets) { + this.secrets = secrets; + this.unparsed |= secrets.unparsed; + return this; + } + + /** + * Credentials for an Okta entity context sync. + * + * @return secrets + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SECRETS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringIntegrationConfigOktaSecrets getSecrets() { + return secrets; + } + + public void setSecrets(SecurityMonitoringIntegrationConfigOktaSecrets secrets) { + this.secrets = secrets; + } + + public SecurityMonitoringOktaIntegrationConfigUpdateAttributes settings( + Map settings) { + this.settings = settings; + return this; + } + + public SecurityMonitoringOktaIntegrationConfigUpdateAttributes putSettingsItem( + String key, Object settingsItem) { + if (this.settings == null) { + this.settings = new HashMap<>(); + } + this.settings.put(key, settingsItem); + return this; + } + + /** + * Free-form, non-sensitive settings for the entity context sync. The accepted keys depend on the + * source type. + * + * @return settings + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getSettings() { + return settings; + } + + public void setSettings(Map settings) { + this.settings = settings; + } + + /** + * 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 SecurityMonitoringOktaIntegrationConfigUpdateAttributes + */ + @JsonAnySetter + public SecurityMonitoringOktaIntegrationConfigUpdateAttributes 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 SecurityMonitoringOktaIntegrationConfigUpdateAttributes object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringOktaIntegrationConfigUpdateAttributes + securityMonitoringOktaIntegrationConfigUpdateAttributes = + (SecurityMonitoringOktaIntegrationConfigUpdateAttributes) o; + return Objects.equals( + this.domain, securityMonitoringOktaIntegrationConfigUpdateAttributes.domain) + && Objects.equals( + this.enabled, securityMonitoringOktaIntegrationConfigUpdateAttributes.enabled) + && Objects.equals( + this.integrationType, + securityMonitoringOktaIntegrationConfigUpdateAttributes.integrationType) + && Objects.equals(this.name, securityMonitoringOktaIntegrationConfigUpdateAttributes.name) + && Objects.equals( + this.secrets, securityMonitoringOktaIntegrationConfigUpdateAttributes.secrets) + && Objects.equals( + this.settings, securityMonitoringOktaIntegrationConfigUpdateAttributes.settings) + && Objects.equals( + this.additionalProperties, + securityMonitoringOktaIntegrationConfigUpdateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + domain, enabled, integrationType, name, secrets, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringOktaIntegrationConfigUpdateAttributes {\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" integrationType: ").append(toIndentedString(integrationType)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" secrets: ").append(toIndentedString(secrets)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).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/SecurityMonitoringOktaIntegrationCredentialsValidateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringOktaIntegrationCredentialsValidateAttributes.java new file mode 100644 index 00000000000..238920d9905 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringOktaIntegrationCredentialsValidateAttributes.java @@ -0,0 +1,224 @@ +/* + * 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; + +/** The Okta credentials to validate against the external entity source. */ +@JsonPropertyOrder({ + SecurityMonitoringOktaIntegrationCredentialsValidateAttributes.JSON_PROPERTY_DOMAIN, + SecurityMonitoringOktaIntegrationCredentialsValidateAttributes.JSON_PROPERTY_INTEGRATION_TYPE, + SecurityMonitoringOktaIntegrationCredentialsValidateAttributes.JSON_PROPERTY_SECRETS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringOktaIntegrationCredentialsValidateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DOMAIN = "domain"; + private String domain; + + public static final String JSON_PROPERTY_INTEGRATION_TYPE = "integration_type"; + private SecurityMonitoringIntegrationTypeOkta integrationType; + + public static final String JSON_PROPERTY_SECRETS = "secrets"; + private SecurityMonitoringIntegrationConfigOktaSecrets secrets; + + public SecurityMonitoringOktaIntegrationCredentialsValidateAttributes() {} + + @JsonCreator + public SecurityMonitoringOktaIntegrationCredentialsValidateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_DOMAIN) String domain, + @JsonProperty(required = true, value = JSON_PROPERTY_INTEGRATION_TYPE) + SecurityMonitoringIntegrationTypeOkta integrationType, + @JsonProperty(required = true, value = JSON_PROPERTY_SECRETS) + SecurityMonitoringIntegrationConfigOktaSecrets secrets) { + this.domain = domain; + this.integrationType = integrationType; + this.unparsed |= !integrationType.isValid(); + this.secrets = secrets; + this.unparsed |= secrets.unparsed; + } + + public SecurityMonitoringOktaIntegrationCredentialsValidateAttributes domain(String domain) { + this.domain = domain; + return this; + } + + /** + * The domain associated with the external entity source. + * + * @return domain + */ + @JsonProperty(JSON_PROPERTY_DOMAIN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public SecurityMonitoringOktaIntegrationCredentialsValidateAttributes integrationType( + SecurityMonitoringIntegrationTypeOkta integrationType) { + this.integrationType = integrationType; + this.unparsed |= !integrationType.isValid(); + return this; + } + + /** + * The source type for an Okta entity context sync. + * + * @return integrationType + */ + @JsonProperty(JSON_PROPERTY_INTEGRATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringIntegrationTypeOkta getIntegrationType() { + return integrationType; + } + + public void setIntegrationType(SecurityMonitoringIntegrationTypeOkta integrationType) { + if (!integrationType.isValid()) { + this.unparsed = true; + } + this.integrationType = integrationType; + } + + public SecurityMonitoringOktaIntegrationCredentialsValidateAttributes secrets( + SecurityMonitoringIntegrationConfigOktaSecrets secrets) { + this.secrets = secrets; + this.unparsed |= secrets.unparsed; + return this; + } + + /** + * Credentials for an Okta entity context sync. + * + * @return secrets + */ + @JsonProperty(JSON_PROPERTY_SECRETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringIntegrationConfigOktaSecrets getSecrets() { + return secrets; + } + + public void setSecrets(SecurityMonitoringIntegrationConfigOktaSecrets secrets) { + this.secrets = secrets; + } + + /** + * 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 SecurityMonitoringOktaIntegrationCredentialsValidateAttributes + */ + @JsonAnySetter + public SecurityMonitoringOktaIntegrationCredentialsValidateAttributes 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 SecurityMonitoringOktaIntegrationCredentialsValidateAttributes object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringOktaIntegrationCredentialsValidateAttributes + securityMonitoringOktaIntegrationCredentialsValidateAttributes = + (SecurityMonitoringOktaIntegrationCredentialsValidateAttributes) o; + return Objects.equals( + this.domain, securityMonitoringOktaIntegrationCredentialsValidateAttributes.domain) + && Objects.equals( + this.integrationType, + securityMonitoringOktaIntegrationCredentialsValidateAttributes.integrationType) + && Objects.equals( + this.secrets, securityMonitoringOktaIntegrationCredentialsValidateAttributes.secrets) + && Objects.equals( + this.additionalProperties, + securityMonitoringOktaIntegrationCredentialsValidateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(domain, integrationType, secrets, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringOktaIntegrationCredentialsValidateAttributes {\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" integrationType: ").append(toIndentedString(integrationType)).append("\n"); + sb.append(" secrets: ").append(toIndentedString(secrets)).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/SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes.java new file mode 100644 index 00000000000..22db6db5379 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes.java @@ -0,0 +1,292 @@ +/* + * 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; + +/** The attributes of a SentinelOne entity context sync configuration to create. */ +@JsonPropertyOrder({ + SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes.JSON_PROPERTY_DOMAIN, + SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes.JSON_PROPERTY_INTEGRATION_TYPE, + SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes.JSON_PROPERTY_NAME, + SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes.JSON_PROPERTY_SECRETS, + SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DOMAIN = "domain"; + private String domain; + + public static final String JSON_PROPERTY_INTEGRATION_TYPE = "integration_type"; + private SecurityMonitoringIntegrationTypeSentinelOne integrationType; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SECRETS = "secrets"; + private SecurityMonitoringIntegrationConfigSentinelOneSecrets secrets; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private Map settings = null; + + public SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes() {} + + @JsonCreator + public SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_DOMAIN) String domain, + @JsonProperty(required = true, value = JSON_PROPERTY_INTEGRATION_TYPE) + SecurityMonitoringIntegrationTypeSentinelOne integrationType, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_SECRETS) + SecurityMonitoringIntegrationConfigSentinelOneSecrets secrets) { + this.domain = domain; + this.integrationType = integrationType; + this.unparsed |= !integrationType.isValid(); + this.name = name; + this.secrets = secrets; + this.unparsed |= secrets.unparsed; + } + + public SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes domain(String domain) { + this.domain = domain; + return this; + } + + /** + * The domain associated with the external entity source. + * + * @return domain + */ + @JsonProperty(JSON_PROPERTY_DOMAIN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes integrationType( + SecurityMonitoringIntegrationTypeSentinelOne integrationType) { + this.integrationType = integrationType; + this.unparsed |= !integrationType.isValid(); + return this; + } + + /** + * The source type for a SentinelOne entity context sync. + * + * @return integrationType + */ + @JsonProperty(JSON_PROPERTY_INTEGRATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringIntegrationTypeSentinelOne getIntegrationType() { + return integrationType; + } + + public void setIntegrationType(SecurityMonitoringIntegrationTypeSentinelOne integrationType) { + if (!integrationType.isValid()) { + this.unparsed = true; + } + this.integrationType = integrationType; + } + + public SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The display name for the entity context sync configuration. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes secrets( + SecurityMonitoringIntegrationConfigSentinelOneSecrets secrets) { + this.secrets = secrets; + this.unparsed |= secrets.unparsed; + return this; + } + + /** + * Credentials for a SentinelOne entity context sync. + * + * @return secrets + */ + @JsonProperty(JSON_PROPERTY_SECRETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringIntegrationConfigSentinelOneSecrets getSecrets() { + return secrets; + } + + public void setSecrets(SecurityMonitoringIntegrationConfigSentinelOneSecrets secrets) { + this.secrets = secrets; + } + + public SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes settings( + Map settings) { + this.settings = settings; + return this; + } + + public SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes putSettingsItem( + String key, Object settingsItem) { + if (this.settings == null) { + this.settings = new HashMap<>(); + } + this.settings.put(key, settingsItem); + return this; + } + + /** + * Free-form, non-sensitive settings for the entity context sync. The accepted keys depend on the + * source type. + * + * @return settings + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getSettings() { + return settings; + } + + public void setSettings(Map settings) { + this.settings = settings; + } + + /** + * 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 SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes + */ + @JsonAnySetter + public SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes 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 SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes + securityMonitoringSentinelOneIntegrationConfigCreateAttributes = + (SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes) o; + return Objects.equals( + this.domain, securityMonitoringSentinelOneIntegrationConfigCreateAttributes.domain) + && Objects.equals( + this.integrationType, + securityMonitoringSentinelOneIntegrationConfigCreateAttributes.integrationType) + && Objects.equals( + this.name, securityMonitoringSentinelOneIntegrationConfigCreateAttributes.name) + && Objects.equals( + this.secrets, securityMonitoringSentinelOneIntegrationConfigCreateAttributes.secrets) + && Objects.equals( + this.settings, securityMonitoringSentinelOneIntegrationConfigCreateAttributes.settings) + && Objects.equals( + this.additionalProperties, + securityMonitoringSentinelOneIntegrationConfigCreateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(domain, integrationType, name, secrets, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringSentinelOneIntegrationConfigCreateAttributes {\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" integrationType: ").append(toIndentedString(integrationType)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" secrets: ").append(toIndentedString(secrets)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).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/SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes.java new file mode 100644 index 00000000000..e23f3ebb60c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes.java @@ -0,0 +1,316 @@ +/* + * 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; + +/** Fields to update on a SentinelOne entity context sync configuration. */ +@JsonPropertyOrder({ + SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes.JSON_PROPERTY_DOMAIN, + SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes.JSON_PROPERTY_ENABLED, + SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes.JSON_PROPERTY_INTEGRATION_TYPE, + SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes.JSON_PROPERTY_NAME, + SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes.JSON_PROPERTY_SECRETS, + SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DOMAIN = "domain"; + private String domain; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_INTEGRATION_TYPE = "integration_type"; + private SecurityMonitoringIntegrationTypeSentinelOne integrationType; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SECRETS = "secrets"; + private SecurityMonitoringIntegrationConfigSentinelOneSecrets secrets; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private Map settings = null; + + public SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes() {} + + @JsonCreator + public SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_INTEGRATION_TYPE) + SecurityMonitoringIntegrationTypeSentinelOne integrationType) { + this.integrationType = integrationType; + this.unparsed |= !integrationType.isValid(); + } + + public SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes domain(String domain) { + this.domain = domain; + return this; + } + + /** + * The new domain associated with the external entity source. + * + * @return domain + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DOMAIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the entity context sync should be enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes integrationType( + SecurityMonitoringIntegrationTypeSentinelOne integrationType) { + this.integrationType = integrationType; + this.unparsed |= !integrationType.isValid(); + return this; + } + + /** + * The source type for a SentinelOne entity context sync. + * + * @return integrationType + */ + @JsonProperty(JSON_PROPERTY_INTEGRATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringIntegrationTypeSentinelOne getIntegrationType() { + return integrationType; + } + + public void setIntegrationType(SecurityMonitoringIntegrationTypeSentinelOne integrationType) { + if (!integrationType.isValid()) { + this.unparsed = true; + } + this.integrationType = integrationType; + } + + public SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The new display name for the entity context sync configuration. + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes secrets( + SecurityMonitoringIntegrationConfigSentinelOneSecrets secrets) { + this.secrets = secrets; + this.unparsed |= secrets.unparsed; + return this; + } + + /** + * Credentials for a SentinelOne entity context sync. + * + * @return secrets + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SECRETS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringIntegrationConfigSentinelOneSecrets getSecrets() { + return secrets; + } + + public void setSecrets(SecurityMonitoringIntegrationConfigSentinelOneSecrets secrets) { + this.secrets = secrets; + } + + public SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes settings( + Map settings) { + this.settings = settings; + return this; + } + + public SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes putSettingsItem( + String key, Object settingsItem) { + if (this.settings == null) { + this.settings = new HashMap<>(); + } + this.settings.put(key, settingsItem); + return this; + } + + /** + * Free-form, non-sensitive settings for the entity context sync. The accepted keys depend on the + * source type. + * + * @return settings + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getSettings() { + return settings; + } + + public void setSettings(Map settings) { + this.settings = settings; + } + + /** + * 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 SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes + */ + @JsonAnySetter + public SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes 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 SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes + securityMonitoringSentinelOneIntegrationConfigUpdateAttributes = + (SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes) o; + return Objects.equals( + this.domain, securityMonitoringSentinelOneIntegrationConfigUpdateAttributes.domain) + && Objects.equals( + this.enabled, securityMonitoringSentinelOneIntegrationConfigUpdateAttributes.enabled) + && Objects.equals( + this.integrationType, + securityMonitoringSentinelOneIntegrationConfigUpdateAttributes.integrationType) + && Objects.equals( + this.name, securityMonitoringSentinelOneIntegrationConfigUpdateAttributes.name) + && Objects.equals( + this.secrets, securityMonitoringSentinelOneIntegrationConfigUpdateAttributes.secrets) + && Objects.equals( + this.settings, securityMonitoringSentinelOneIntegrationConfigUpdateAttributes.settings) + && Objects.equals( + this.additionalProperties, + securityMonitoringSentinelOneIntegrationConfigUpdateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + domain, enabled, integrationType, name, secrets, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringSentinelOneIntegrationConfigUpdateAttributes {\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" integrationType: ").append(toIndentedString(integrationType)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" secrets: ").append(toIndentedString(secrets)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).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/SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes.java new file mode 100644 index 00000000000..c9d84f3ea67 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes.java @@ -0,0 +1,229 @@ +/* + * 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; + +/** The SentinelOne credentials to validate against the external entity source. */ +@JsonPropertyOrder({ + SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes.JSON_PROPERTY_DOMAIN, + SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes + .JSON_PROPERTY_INTEGRATION_TYPE, + SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes.JSON_PROPERTY_SECRETS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DOMAIN = "domain"; + private String domain; + + public static final String JSON_PROPERTY_INTEGRATION_TYPE = "integration_type"; + private SecurityMonitoringIntegrationTypeSentinelOne integrationType; + + public static final String JSON_PROPERTY_SECRETS = "secrets"; + private SecurityMonitoringIntegrationConfigSentinelOneSecrets secrets; + + public SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes() {} + + @JsonCreator + public SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_DOMAIN) String domain, + @JsonProperty(required = true, value = JSON_PROPERTY_INTEGRATION_TYPE) + SecurityMonitoringIntegrationTypeSentinelOne integrationType, + @JsonProperty(required = true, value = JSON_PROPERTY_SECRETS) + SecurityMonitoringIntegrationConfigSentinelOneSecrets secrets) { + this.domain = domain; + this.integrationType = integrationType; + this.unparsed |= !integrationType.isValid(); + this.secrets = secrets; + this.unparsed |= secrets.unparsed; + } + + public SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes domain( + String domain) { + this.domain = domain; + return this; + } + + /** + * The domain associated with the external entity source. + * + * @return domain + */ + @JsonProperty(JSON_PROPERTY_DOMAIN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes integrationType( + SecurityMonitoringIntegrationTypeSentinelOne integrationType) { + this.integrationType = integrationType; + this.unparsed |= !integrationType.isValid(); + return this; + } + + /** + * The source type for a SentinelOne entity context sync. + * + * @return integrationType + */ + @JsonProperty(JSON_PROPERTY_INTEGRATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringIntegrationTypeSentinelOne getIntegrationType() { + return integrationType; + } + + public void setIntegrationType(SecurityMonitoringIntegrationTypeSentinelOne integrationType) { + if (!integrationType.isValid()) { + this.unparsed = true; + } + this.integrationType = integrationType; + } + + public SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes secrets( + SecurityMonitoringIntegrationConfigSentinelOneSecrets secrets) { + this.secrets = secrets; + this.unparsed |= secrets.unparsed; + return this; + } + + /** + * Credentials for a SentinelOne entity context sync. + * + * @return secrets + */ + @JsonProperty(JSON_PROPERTY_SECRETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringIntegrationConfigSentinelOneSecrets getSecrets() { + return secrets; + } + + public void setSecrets(SecurityMonitoringIntegrationConfigSentinelOneSecrets secrets) { + this.secrets = secrets; + } + + /** + * 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 SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes + */ + @JsonAnySetter + public SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes + 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 SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes + * object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes + securityMonitoringSentinelOneIntegrationCredentialsValidateAttributes = + (SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes) o; + return Objects.equals( + this.domain, + securityMonitoringSentinelOneIntegrationCredentialsValidateAttributes.domain) + && Objects.equals( + this.integrationType, + securityMonitoringSentinelOneIntegrationCredentialsValidateAttributes.integrationType) + && Objects.equals( + this.secrets, + securityMonitoringSentinelOneIntegrationCredentialsValidateAttributes.secrets) + && Objects.equals( + this.additionalProperties, + securityMonitoringSentinelOneIntegrationCredentialsValidateAttributes + .additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(domain, integrationType, secrets, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringSentinelOneIntegrationCredentialsValidateAttributes {\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" integrationType: ").append(toIndentedString(integrationType)).append("\n"); + sb.append(" secrets: ").append(toIndentedString(secrets)).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/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature b/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature index d81e8c9f2d3..c713293f463 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature @@ -1024,7 +1024,7 @@ Feature: Security Monitoring Scenario: Create an entity context sync configuration returns "Bad Request" response Given operation "CreateSecurityMonitoringIntegrationConfig" enabled And new "CreateSecurityMonitoringIntegrationConfig" request - And body with value {"data": {"attributes": {"domain": "siem-test.com", "integration_type": "GOOGLE_WORKSPACE", "name": "My GWS Integration", "secrets": {"admin_email": "test@example.com"}, "settings": {"setting1": "value1"}}, "type": "integration_config"}} + And body with value {"data": {"attributes": {"domain": "siem-test.com", "integration_type": "GOOGLE_WORKSPACE", "name": "My GWS Integration", "secrets": {"admin_email": "admin@example.com", "service_account_json": {"client_email": "svc@my-project.iam.gserviceaccount.com", "private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----", "project_id": "my-project", "type": "service_account"}}, "settings": {"setting1": "value1"}}, "type": "integration_config"}} When the request is sent Then the response status is 400 Bad Request @@ -1032,7 +1032,7 @@ Feature: Security Monitoring Scenario: Create an entity context sync configuration returns "OK" response Given operation "CreateSecurityMonitoringIntegrationConfig" enabled And new "CreateSecurityMonitoringIntegrationConfig" request - And body with value {"data": {"attributes": {"domain": "siem-test.com", "integration_type": "GOOGLE_WORKSPACE", "name": "My GWS Integration", "secrets": {"admin_email": "test@example.com"}, "settings": {"setting1": "value1"}}, "type": "integration_config"}} + And body with value {"data": {"attributes": {"domain": "siem-test.com", "integration_type": "GOOGLE_WORKSPACE", "name": "My GWS Integration", "secrets": {"admin_email": "admin@example.com", "service_account_json": {"client_email": "svc@my-project.iam.gserviceaccount.com", "private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----", "project_id": "my-project", "type": "service_account"}}, "settings": {"setting1": "value1"}}, "type": "integration_config"}} When the request is sent Then the response status is 200 OK @@ -3476,7 +3476,7 @@ Feature: Security Monitoring Given operation "UpdateSecurityMonitoringIntegrationConfig" enabled And new "UpdateSecurityMonitoringIntegrationConfig" request And request contains "integration_config_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"domain": "siem-test.com", "enabled": true, "integration_type": "GOOGLE_WORKSPACE", "name": "My GWS Integration (renamed)", "secrets": {"admin_email": "test@example.com"}, "settings": {"setting1": "value1"}}, "type": "integration_config"}} + And body with value {"data": {"attributes": {"domain": "siem-test.com", "enabled": true, "integration_type": "GOOGLE_WORKSPACE", "name": "My GWS Integration (renamed)", "secrets": {"admin_email": "admin@example.com", "service_account_json": {"client_email": "svc@my-project.iam.gserviceaccount.com", "private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----", "project_id": "my-project", "type": "service_account"}}, "settings": {"setting1": "value1"}}, "type": "integration_config"}} When the request is sent Then the response status is 400 Bad Request @@ -3485,7 +3485,7 @@ Feature: Security Monitoring Given operation "UpdateSecurityMonitoringIntegrationConfig" enabled And new "UpdateSecurityMonitoringIntegrationConfig" request And request contains "integration_config_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"domain": "siem-test.com", "enabled": true, "integration_type": "GOOGLE_WORKSPACE", "name": "My GWS Integration (renamed)", "secrets": {"admin_email": "test@example.com"}, "settings": {"setting1": "value1"}}, "type": "integration_config"}} + And body with value {"data": {"attributes": {"domain": "siem-test.com", "enabled": true, "integration_type": "GOOGLE_WORKSPACE", "name": "My GWS Integration (renamed)", "secrets": {"admin_email": "admin@example.com", "service_account_json": {"client_email": "svc@my-project.iam.gserviceaccount.com", "private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----", "project_id": "my-project", "type": "service_account"}}, "settings": {"setting1": "value1"}}, "type": "integration_config"}} When the request is sent Then the response status is 404 Not Found @@ -3494,7 +3494,7 @@ Feature: Security Monitoring Given operation "UpdateSecurityMonitoringIntegrationConfig" enabled And new "UpdateSecurityMonitoringIntegrationConfig" request And request contains "integration_config_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"domain": "siem-test.com", "enabled": true, "integration_type": "GOOGLE_WORKSPACE", "name": "My GWS Integration (renamed)", "secrets": {"admin_email": "test@example.com"}, "settings": {"setting1": "value1"}}, "type": "integration_config"}} + And body with value {"data": {"attributes": {"domain": "siem-test.com", "enabled": true, "integration_type": "GOOGLE_WORKSPACE", "name": "My GWS Integration (renamed)", "secrets": {"admin_email": "admin@example.com", "service_account_json": {"client_email": "svc@my-project.iam.gserviceaccount.com", "private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----", "project_id": "my-project", "type": "service_account"}}, "settings": {"setting1": "value1"}}, "type": "integration_config"}} When the request is sent Then the response status is 200 OK @@ -3634,7 +3634,7 @@ Feature: Security Monitoring Scenario: Validate entity context sync credentials returns "Bad Request" response Given operation "ValidateSecurityMonitoringIntegrationCredentials" enabled And new "ValidateSecurityMonitoringIntegrationCredentials" request - And body with value {"data": {"attributes": {"domain": "siem-test.com", "integration_type": "GOOGLE_WORKSPACE", "secrets": {"admin_email": "test@example.com"}}, "type": "integration_config"}} + And body with value {"data": {"attributes": {"domain": "siem-test.com", "integration_type": "GOOGLE_WORKSPACE", "secrets": {"admin_email": "admin@example.com", "service_account_json": {"client_email": "svc@my-project.iam.gserviceaccount.com", "private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----", "project_id": "my-project", "type": "service_account"}}}, "type": "integration_config"}} When the request is sent Then the response status is 400 Bad Request @@ -3642,6 +3642,6 @@ Feature: Security Monitoring Scenario: Validate entity context sync credentials returns "OK" response Given operation "ValidateSecurityMonitoringIntegrationCredentials" enabled And new "ValidateSecurityMonitoringIntegrationCredentials" request - And body with value {"data": {"attributes": {"domain": "siem-test.com", "integration_type": "GOOGLE_WORKSPACE", "secrets": {"admin_email": "test@example.com"}}, "type": "integration_config"}} + And body with value {"data": {"attributes": {"domain": "siem-test.com", "integration_type": "GOOGLE_WORKSPACE", "secrets": {"admin_email": "admin@example.com", "service_account_json": {"client_email": "svc@my-project.iam.gserviceaccount.com", "private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----", "project_id": "my-project", "type": "service_account"}}}, "type": "integration_config"}} When the request is sent Then the response status is 200 OK